Stax ACH Token Import

This method takes a Stax customer ID and payment method token and latches it to the Stax Bill customer. The payment method remains in the Stax vault but is usable through Stax Bill. Once imported, the payment method can be employed in the usual way with the Stax Bill generated payment method ID.

Example

curl -X POST "https://secure.fusebill.com/v1/paymentMethodImport/StaxAch \ 
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}" \ 
-d "{customerId:{customerId}, staxCustomerId:{ID}, staxCardId:{ID}}"
//Json Payload 
 string jsonData ="{customerId:{customerId}, staxCustomerId:{ID}, staxCardId:{ID}}" 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/paymentMethodImport/Stax "); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "POST"; 
//Add the json data to request 
using (var streamWriter = new StreamWriter(request.GetRequestStream())) 
{ 
  streamWriter.Write(jsonData); 
  streamWriter.Flush(); 
  streamWriter.Close(); 
} 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
{ 
  result = streamReader.ReadToEnd(); 
}
#Import library Requests 
import requests 
#Import library json 
import json 
#Define your payload parameters  
payload = {"customerid":{CustomerID}," staxCustomerId ":{ID}",  staxCardId ": "{ID}"} 
#Define your header parameters 
headers = {'Authorization' : 'Basic {API Key}', 'Content-Type' : 'application/json'} 
#Pass in your header and payload and store your response object 
r = requests.post('https://secure.fusebill.com/v1/paymentMethodImport/Stax',data=json.dumps(payload), headers=headers) 
print(r.content)
{
  "customerId":21314
  "staxCustomerId":"597374124"
  "staxCardId":"fy8sdk"
}
Body Params
integer
required

The Stax Bill generated customer ID.

string
required

The ID uniquely identifying the customer in Stax.

string
required

The ID of the Stax card.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json