| Requires the role: | Merchant |
| POST | /merchants/{merchantKey}/tokens | Creates a card or check token from the PnRef. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| MerchantKey | path | integer | Yes | The key of the merchant. |
| CustomerKey | model | integer | No | The customer key. |
| PnRef | model | integer | Yes | The PnRef to create a token from. |
| TokenFormat | model | TokenFormat? | No | The token format for this cardAllowable Values
|
| Name | Value | |
|---|---|---|
| Uid | 1 | |
| Integer | 2 | |
| CardFormat | 3 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CardToken | model | CardTokenDetail | No | The card token. |
| CheckToken | model | CheckTokenDetail | No | The check token. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| MerchantKey | model | int? | No | The merchant key. |
| CustomerKey | model | int? | No | The customer key. |
| CardNumber | model | string | No | The card number. |
| ExpirationDate | model | string | No | The expiration date, formatted as MMYY. |
| CardType | model | string | No | The card type. |
| NameOnCard | model | string | No | The name on the card. |
| StreetAddress | model | string | No | The street address for the card. |
| PostalCode | model | string | No | The postal code for the card. |
| Token | model | string | No | The token for the card. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| MerchantKey | model | int? | No | The merchant key. |
| CustomerKey | model | int? | No | The customer key. |
| AccountNumber | model | string | No | The account number. |
| RoutingNumber | model | string | No | The routing number. |
| NameOnCheck | model | string | No | The name on the check. |
| AccountType | model | CheckAccountType? | No | The account type, checking or savings.Allowable Values
|
| CheckType | model | CheckType? | No | The check type, personal or business.Allowable Values
|
| Token | model | string | No | The token for this check. |
| Name | Value | |
|---|---|---|
| Checking | 1 | |
| Savings | 2 |
| Name | Value | |
|---|---|---|
| Personal | 1 | |
| Business | 2 |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /merchants/{merchantKey}/tokens HTTP/1.1
Host: syntch.simpay.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
MerchantKey: 0,
CustomerKey: 0,
PnRef: 0,
TokenFormat: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
CardToken:
{
MerchantKey: 0,
CustomerKey: 0,
CardNumber: String,
ExpirationDate: String,
CardType: String,
NameOnCard: String,
StreetAddress: String,
PostalCode: String,
Token: String
},
CheckToken:
{
MerchantKey: 0,
CustomerKey: 0,
AccountNumber: String,
RoutingNumber: String,
NameOnCheck: String,
AccountType: 0,
CheckType: 0,
Token: String
}
}