| Requires the role: | Merchant |
| POST | /merchants/{merchantKey}/tokens/cards | Creates a card token for the merchant. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| MerchantKey | path | integer | Yes | The key of the merchant. |
| CustomerKey | model | integer | No | The customer key. |
| CardNumber | model | string | Yes | The card number. |
| ExpirationDate | model | string | Yes | The expiration date, formatted as MMYY. |
| 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. |
| 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 |
|---|---|---|---|---|
| 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. |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /merchants/{merchantKey}/tokens/cards HTTP/1.1
Host: syntch.simpay.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"MerchantKey":0,"CustomerKey":0,"CardNumber":"String","ExpirationDate":"String","NameOnCard":"String","StreetAddress":"String","PostalCode":"String","TokenFormat":"0"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"MerchantKey":0,"CustomerKey":0,"CardNumber":"String","ExpirationDate":"String","CardType":"String","NameOnCard":"String","StreetAddress":"String","PostalCode":"String","Token":"String"}