Recurring Payments Service Customer Token
Customer Token Controller
customerKey
api-key-value
GET //rest/v2/customers/{customerKey}/tokens HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
"code": 200,
"emvUrl": "text",
"exchange-id": "ID_38839393-3938383-484848484",
"gatewayUrl": "text",
"links": [
{
"href": "/rest/v2/transactions?id=846512",
"id": 846512,
"rel": "transaction"
}
],
"page": {
"first": false,
"last": false,
"number": 4,
"number-of-elements": 102,
"size": 4,
"sort": {
"field": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"total-elements": 102,
"total-pages": 4
},
"payload": {
"payloadType": "text"
},
"signature": "text",
"status": "SUCCESS",
"urls": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"vaultUrl": "text"
}
Plan must have a customer-key from a previously related customer. Use url https://gateway-sb.clearent.net/rest/v2/tokens You can POST application/xml or application/json to the service. Make sure you include a valid api-key in the header.
customerKey
api-key-value
Street address associated with the card
123 example street
zip code of street address assoicated with the card
123445
Type of card
VISA
Possible values: Customer Identifier
custID-dkke-8383-ek999
true if this is the default card for the customer
true
description of card
joint debit
Expire date of the card
0932
last 4 digits of card number
5678
Token that represents to card number
11000383833939380000
POST //rest/v2/customers/{customerKey}/tokens HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 229
{
"avs-address": "123 example street",
"avs-zip": 123445,
"card-type": "VISA",
"customer-key": "custID-dkke-8383-ek999",
"default": true,
"description": "joint debit",
"exp-date": "0932",
"last-four-digits": 5678,
"token-id": 11000383833939380000
}
{
"avs-address": "123 example street",
"avs-zip": 123445,
"card-type": "VISA",
"customer-key": "custID-dkke-8383-ek999",
"default": true,
"description": "joint debit",
"exp-date": "0932",
"last-four-digits": 5678,
"token-id": 11000383833939380000
}
You can do an HTTP PUT on the field you want to modify. There are only 3 modifiable fields on a token; customer-key, status (ACTIVE, INACTIVE, DELETED), description. Anything else you want to modify with a token, you will need to delete and re-add. First, you will need to add the token-id, that was returned on the creation of the token, to the end of the URL: https://gateway-sb.clearent.net/rest/v2/tokens/TOKEN-ID-HERE
customerKey
api-key-value
Street address associated with the card
123 example street
zip code of street address assoicated with the card
123445
Type of card
VISA
Possible values: Customer Identifier
custID-dkke-8383-ek999
true if this is the default card for the customer
true
description of card
joint debit
Expire date of the card
0932
last 4 digits of card number
5678
Token that represents to card number
11000383833939380000
PUT //rest/v2/customers/{customerKey}/tokens HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 229
{
"avs-address": "123 example street",
"avs-zip": 123445,
"card-type": "VISA",
"customer-key": "custID-dkke-8383-ek999",
"default": true,
"description": "joint debit",
"exp-date": "0932",
"last-four-digits": 5678,
"token-id": 11000383833939380000
}
{
"avs-address": "123 example street",
"avs-zip": 123445,
"card-type": "VISA",
"customer-key": "custID-dkke-8383-ek999",
"default": true,
"description": "joint debit",
"exp-date": "0932",
"last-four-digits": 5678,
"token-id": 11000383833939380000
}
Was this helpful?