Not logged in
Log In Now
This resource provides access to query, create, or modify customer records.
https://api.swervepay.com/v/2.0/{accountSid}/customers
customerList
of individual customer
records.Parameter | Max Length | Description |
---|---|---|
accountRefId | 256 | Account Number from the calling system |
afterId | 12 | Include results with customerId greater than this value |
beforeId | 12 | Include results with customerId less than this value |
count | 4 | The number of results to return (default 10, max 1000) |
customerEmail | 255 | |
customerFirstName | 255 | First Name |
customerId | 12 | Customer unique identifier |
customerLastName | 255 | Last Name |
customerPhoneNumber | 14 | Mobile Number |
customerRefId | 256 | Customer Reference Id from the calling system |
maxId | 12 | Include results with customerId less than or equal to this value |
minId | 12 | Include results with customerId greater or equal to this value |
name | 255 | First and/or last name |
sort | 15 | Response list sort order Valid Values: "customerId_asc", "customerId_desc", "name_asc" customerId_asc: (Default) Sort by customerId in ascending order customerId_desc: Sort by customerId in descending order name_asc: Results sorted by customerLastName, customerFirstName. |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
Parameter | Max Length | Description |
---|---|---|
accountRefId | 256 | Account Number from the calling system |
customerAddress1 | 255 | Address Line 1 |
customerAddress2 | 255 | Address Line 2 |
customerCity | 255 | City |
customerCompany | 255 | Company |
customerEmail | 255 | |
customerFaxNumber | 14 | Fax Number |
customerFirstName | 32 | First Name |
customerId | 12 | Customer unique identifier |
customerLastName | 50 | Last Name |
customerPhoneNumber | 14 | Mobile Number |
customerRefId | 256 | Customer Reference Id from the calling system |
customerSecondaryNumber | 14 | Secondary Number |
customerState | 2 | 2-letter state abbreviation |
customerZip | 10 | ZIP code |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
curl -XGET "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers?minId=200000026176&count=3" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75"
{
"customerList" : [
{
"accountRefId" : "5678",
"customerAddress1" : "1053 Gerald L. Bates Drive",
"customerAddress2" : "Apartment 3B",
"customerCity" : "Boston",
"customerCompany" : "Clemens Markets",
"customerEmail" : "EricPScott@teleworm.us",
"customerFaxNumber" : null,
"customerFirstName" : "Eric",
"customerId" : "200000026176",
"customerLastName" : "Scott",
"customerPhoneNumber" : "(617) 631-7886",
"customerRefId" : "9012",
"customerSecondaryNumber" : "(617) 682-5782",
"customerState" : "MA",
"customerZip" : "02107",
"systemCustomerRefId" : "1234"
},
{
"accountRefId" : null,
"customerAddress1" : "2528 Wilson Street",
"customerAddress2" : null,
"customerCity" : "Encintas",
"customerCompany" : "Garden Master",
"customerEmail" : "RyanSAnderson@rhyta.com",
"customerFaxNumber" : null,
"customerFirstName" : "Ryan",
"customerId" : "200000026177",
"customerLastName" : "Anderson",
"customerPhoneNumber" : "(809) 706-7073",
"customerRefId" : "33333333333333333",
"customerSecondaryNumber" : null,
"customerState" : "CA",
"customerZip" : "92024",
"systemCustomerRefId" : "9999"
},
{
"accountRefId" : null,
"customerAddress1" : "2860 Bates Brothers Road",
"customerAddress2" : null,
"customerCity" : "Westerville",
"customerCompany" : null,
"customerEmail" : "RebeccaDSimmons@dayrep.com",
"customerFaxNumber" : "(614) 220-1731",
"customerFirstName" : "Rebecca",
"customerId" : "200000026178",
"customerLastName" : "Simmons",
"customerPhoneNumber" : "(614) 384-2578",
"customerRefId" : null,
"customerSecondaryNumber" : "(614) 220-1730",
"customerState" : "OH",
"customerZip" : "43081",
"systemCustomerRefId" : null
}
],
"metadata" : {
"customerList" : {
"idField" : "customerId",
"maxId" : "200000026178",
"minId" : "200000026176",
"more" : 1,
"recordCount" : 3,
"sort" : "customerId_asc"
}
}
}
Parameter | Required | Max Length | Description |
---|---|---|---|
accountRefId | 256 | Account Number from the calling system | |
customerAddress1 | 255 | Address Line 1 | |
customerAddress2 | 255 | Address Line 2 | |
customerCity | 255 | City | |
customerCompany | 255 | Company | |
customerEmail | 255 | ||
customerFaxNumber | 14 | Fax Number | |
customerFirstName | Required | 255 | First Name |
customerLastName | Required | 255 | Last Name |
customerPhoneNumber | 14 | Mobile Number | |
customerRefId | 256 | Customer Reference Id from the calling system | |
customerSecondaryNumber | 14 | Secondary Number | |
customerState | 2 | 2-letter state abbreviation | |
customerZip | 10 | ZIP code | |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
Parameter | Max Length | Description |
---|---|---|
accountRefId | 256 | Account Number from the calling system |
customerAddress1 | 255 | Address Line 1 |
customerAddress2 | 255 | Address Line 2 |
customerCity | 255 | City |
customerCompany | 255 | Company |
customerEmail | 255 | |
customerFaxNumber | 14 | Fax Number |
customerFirstName | 32 | First Name |
customerId | 12 | Customer unique identifier |
customerLastName | 50 | Last Name |
customerPhoneNumber | 14 | Mobile Number |
customerRefId | 256 | Customer Reference Id from the calling system |
customerSecondaryNumber | 14 | Secondary Number |
customerState | 2 | 2-letter state abbreviation |
customerZip | 10 | ZIP code |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
curl -D - -XPOST "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75" \
-d "customerFirstName=Vanessa" \
-d "customerLastName=Shepard" \
-d "customerCompany=Record Town" \
-d "customerPhoneNumber=(971) 236-3550" \
-d "customerSecondaryNumber=(971) 236-3592" \
-d "customerEmail=VanessaMShepard@rhyta.com" \
-d "customerAddress1=2223 Hope Street" \
-d "customerCity=Portland" \
-d "customerState=OR" \
-d "customerZip=97220" \
-d "systemCustomerRefId=1234" \
-d "accountRefId=5678" \
-d "customerRefId=9012"
{
"customer" : {
"accountRefId" : "5678",
"customerAddress1" : "2223 Hope Street",
"customerAddress2" : null,
"customerCity" : "Portland",
"customerCompany" : "Record Town",
"customerEmail" : "VanessaMShepard@rhyta.com",
"customerFaxNumber" : null,
"customerFirstName" : "Vanessa",
"customerId" : "200000026191",
"customerLastName" : "Shepard",
"customerPhoneNumber" : "(971) 236-3550",
"customerRefId" : "9012",
"customerSecondaryNumber" : "(971) 236-3592",
"customerState" : "OR",
"customerZip" : "97220",
"systemCustomerRefId" : "1234"
},
"metadata" : {}
}
https://api.swervepay.com/v/2.0/{accountSid}/customers/{customerId}
{customerId}
provided in the request URL.Parameter | Max Length | Description |
---|---|---|
accountRefId | 256 | Account Number from the calling system |
customerAddress1 | 255 | Address Line 1 |
customerAddress2 | 255 | Address Line 2 |
customerCity | 255 | City |
customerCompany | 255 | Company |
customerEmail | 255 | |
customerFaxNumber | 14 | Fax Number |
customerFirstName | 32 | First Name |
customerId | 12 | Customer unique identifier |
customerLastName | 50 | Last Name |
customerPhoneNumber | 14 | Mobile Number |
customerRefId | 256 | Customer Reference Id from the calling system |
customerSecondaryNumber | 14 | Secondary Number |
customerState | 2 | 2-letter state abbreviation |
customerZip | 10 | ZIP code |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
curl -D - -XGET "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers/200000026191" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75"
{
"customer" : {
"accountRefId" : "5678",
"customerAddress1" : "2223 Hope Street",
"customerAddress2" : null,
"customerCity" : "Portland",
"customerCompany" : "Record Town",
"customerEmail" : "VanessaMShepard@rhyta.com",
"customerFaxNumber" : null,
"customerFirstName" : "Vanessa",
"customerId" : "200000026191",
"customerLastName" : "Shepard",
"customerPhoneNumber" : "(971) 236-3550",
"customerRefId" : "9012",
"customerSecondaryNumber" : "(971) 236-3592",
"customerState" : "OR",
"customerZip" : "97220",
"systemCustomerRefId" : "1234"
},
"metadata" : {}
}
Parameter | Required | Max Length | Description |
---|---|---|---|
accountRefId | 256 | Account Number from the calling system | |
customerAddress1 | 255 | Address Line 1 | |
customerAddress2 | 255 | Address Line 2 | |
customerCity | 255 | City | |
customerCompany | 255 | Company | |
customerEmail | 255 | ||
customerFaxNumber | 14 | Fax Number | |
customerFirstName | Conditional | 255 | First Name |
customerLastName | Conditional | 255 | Last Name |
customerPhoneNumber | 14 | Mobile Number | |
customerRefId | 256 | Customer Reference Id from the calling system | |
customerSecondaryNumber | 14 | Secondary Number | |
customerState | 2 | 2-letter state abbreviation | |
customerZip | 10 | ZIP code | |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
Parameter | Max Length | Description |
---|---|---|
accountRefId | 256 | Account Number from the calling system |
customerAddress1 | 255 | Address Line 1 |
customerAddress2 | 255 | Address Line 2 |
customerCity | 255 | City |
customerCompany | 255 | Company |
customerEmail | 255 | |
customerFaxNumber | 14 | Fax Number |
customerFirstName | 32 | First Name |
customerId | 12 | Customer unique identifier |
customerLastName | 50 | Last Name |
customerPhoneNumber | 14 | Mobile Number |
customerRefId | 256 | Customer Reference Id from the calling system |
customerSecondaryNumber | 14 | Secondary Number |
customerState | 2 | 2-letter state abbreviation |
customerZip | 10 | ZIP code |
systemCustomerRefId | 256 | System Customer Reference Id from the calling system |
curl -D - -XPUT "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers/200000026191" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75" \
-d "customerPhoneNumber=9175257899" \
-d "customerEmail=vshepard@recordtownllc.com"
{
"customer" : {
"accountRefId" : "5678",
"customerAddress1" : "2223 Hope Street",
"customerAddress2" : null,
"customerCity" : "Portland",
"customerCompany" : "Record Town",
"customerEmail" : "vshepard@recordtownllc.com",
"customerFaxNumber" : null,
"customerFirstName" : "Vanessa",
"customerId" : "200000026191",
"customerLastName" : "Shepard",
"customerPhoneNumber" : "(917) 525-7899",
"customerRefId" : "9012",
"customerSecondaryNumber" : "(971) 236-3592",
"customerState" : "OR",
"customerZip" : "97220",
"systemCustomerRefId" : "1234"
},
"metadata" : {}
}
https://api.swervepay.com/v/2.0/{accountSid}/customers/{customerId}/tokens
tokenList
of details of all available Customer
tokens ordered from most recently to least recently used (in other words, the first item in the
tokenList
will be the payment option most recently used in a payment from the
customer).Parameter | Max Length | Description |
---|---|---|
accountNumber | 19 | Masked credit card account number or ACH bank account number |
achAccountHolderType | 8 | ACH account holder type, if applicable Valid Values: "personal", "business" |
achAccountType | 8 | ACH account type, if applicable Valid Values: "checking", "savings" |
billAddress1 | 255 | Address Line 1 |
billAddress2 | 255 | Address Line 2 |
billCity | 255 | City |
billCompany | 255 | Company |
billEmail | 255 | |
billFaxNumber | 14 | Fax Number |
billFirstName | 32 | First Name |
billLastName | 50 | Last Name |
billPhoneNumber | 14 | Mobile Number |
billSecondaryNumber | 14 | Secondary Number |
billState | 2 | 2-letter state abbreviation |
billZip | 10 | ZIP code |
cardExpirationDate | 4 | Credit card expiration date (MMYY), if applicable |
issuer | 5 | Card issuer (e.g. AMEX, DC, DISC, JCB, MC, VISA) or non-credit card transaction source (e.g. ACH, CASH, CHECK) |
routingNumber | 9 | ACH routing number, if applicable |
tokenId | 12 | Token Id |
curl -D - -XGET "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers/200000027190/tokens" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75"
{
"metadata" : {
"tokenList" : {
"idField" : "tokenId",
"maxId" : "30211",
"minId" : "30188",
"more" : 0,
"recordCount" : 2,
"sort" : "latestTransactionId_desc"
}
},
"tokenList" : [
{
"accountNumber" : "4716xxxxxxxx0331",
"billAddress1" : "181 Woodbridge Lane",
"billAddress2" : null,
"billCity" : "Detroit",
"billCompany" : null,
"billEmail" : "PatriciaKSteele@rhyta.com",
"billFaxNumber" : null,
"billFirstName" : "Patricia",
"billLastName" : "Steele",
"billPhoneNumber" : "(313) 456-6415",
"billSecondaryNumber" : null,
"billState" : "MI",
"billZip" : "48202",
"cardExpirationDate" : "0418",
"issuer" : "VISA",
"latestTransactionId" : "100000034001",
"routingNumber" : null,
"timestamp" : "2013-12-06 22:35:13",
"tokenId" : "30211"
},
{
"accountNumber" : "6011xxxxxxxx2006",
"billAddress1" : "181 Woodbridge Lane",
"billAddress2" : null,
"billCity" : "Detroit",
"billCompany" : null,
"billEmail" : "PatriciaKSteele@rhyta.com",
"billFaxNumber" : null,
"billFirstName" : "Patricia",
"billLastName" : "Steele",
"billPhoneNumber" : "(313) 456-6415",
"billSecondaryNumber" : null,
"billState" : "MI",
"billZip" : "48202",
"cardExpirationDate" : "1016",
"issuer" : "DISC",
"latestTransactionId" : "100000033972",
"routingNumber" : null,
"timestamp" : "2013-11-29 22:58:41",
"tokenId" : "30188"
}
]
}
https://api.swervepay.com/v/2.0/{accountSid}/customers/{customerId}/tokens/{tokenId}
{customerId}
and excluding the old {tokenId}
which will effectively generate a new token for usage going forward.{tokenId}
provided in the request URL. No response parameters will be
returned; a successful token deactivation will be denoted by an HTTP 200 status.curl -D - -XDELETE "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers/200000026191/tokens/29369" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75"
{
"metadata" : {}
}
Parameter | Max Length | Description |
---|---|---|
accountNumber | 19 | Masked credit card account number or ACH bank account number |
achAccountHolderType | 8 | ACH account holder type, if applicable Valid Values: "personal", "business" |
achAccountType | 8 | ACH account type, if applicable Valid Values: "checking", "savings" |
billAddress1 | 255 | Address Line 1 |
billAddress2 | 255 | Address Line 2 |
billCity | 255 | City |
billCompany | 255 | Company |
billEmail | 255 | |
billFaxNumber | 14 | Fax Number |
billFirstName | 32 | First Name |
billLastName | 50 | Last Name |
billPhoneNumber | 14 | Mobile Number |
billSecondaryNumber | 14 | Secondary Number |
billState | 2 | 2-letter state abbreviation |
billZip | 10 | ZIP code |
cardExpirationDate | 4 | Credit card expiration date (MMYY), if applicable |
issuer | 5 | Card issuer (e.g. AMEX, DC, DISC, JCB, MC, VISA) or non-credit card transaction source (e.g. ACH, CASH, CHECK) |
routingNumber | 9 | ACH routing number, if applicable |
tokenId | 12 | Token Id |
curl -D - -XGET "https://api.swervepay.com/v/2.0/098f6bcd4621d373cade4e832627b4f6/customers/200000026191/tokens/29369" \
-H "Accept: application/json" \
-u "myusername:221b368d7f5f597867f525971f28ff75"
{
"metadata" : {},
"token" : {
"accountNumber" : "4916xxxxxxxx4477",
"billAddress1" : "2223 Hope Street",
"billAddress2" : null,
"billCity" : "Portland",
"billCompany" : "Record Town",
"billEmail" : "vshepard@recordtownllc.com",
"billFaxNumber" : null,
"billFirstName" : "Vanessa",
"billLastName" : "Shepard",
"billPhoneNumber" : "(917) 525-7899",
"billSecondaryNumber" : "(971) 236-3592",
"billState" : "OR",
"billZip" : "97220",
"cardExpirationDate" : "0718",
"issuer" : "VISA",
"routingNumber" : null,
"tokenId" : "29369"
}
}
https://api.swervepay.com/v/2.0/{accountSid}/customers/{customerId}/transactions
customerId
record.customerId
parameter. The customerId
parameter passed to the transactions resource
will automatically be pulled from the {customerId}
provided in the request
URL.{customerId}
parameter with this request will be automatically
overridden by the {customerId}
provided in the request
URL.
customerId
parameter. The customerId
parameter passed to the transactions resource
will automatically be pulled from the {customerId}
provided in the request
URL.{customerId}
parameter with this request will be automatically
overridden by the {customerId}
provided in the request
URL.