Use existing TransArmor tokens
North America—United States and Canada
Use your existing TransArmor token with the create a charge and pay for an order endpoints.
Prerequisites
- Create an ecommerce app integration in the Global Developer Dashboard. See Get started with the Global Developer Dashboard.
- Existing TransArmor® token. See Create a TransArmor token.
Create a TransArmor token
- Generate a PAKMS key.
- Send a POST request to the v1/tokens endpoint.
- Expand the
external_token
object. - Enter values in the required fields.
Field | Description | Require/Optional |
---|---|---|
token_value | Value of the TransArmor token. | Required |
token_type | Type of the multi-pay token such as TransArmor. | Required |
exp_month | Card expiration month in 2-digit format. Format: mm | Required |
exp_year | Card expiration year in 2- or 4-digit format. Format: yy or yyyy | Required |
apikey | Public Ecommerce API key associated with a specific merchant and developer app. Use Retrieve an Ecommerce API key or PAKMS key to generate this key. | Required |
In the response, a <<mul returns. This token is alphanumeric and begins with clv_. Example: clv_1ABCDefgHI23jKL4m5nOPqR
Request and response example—Create a multi-pay Clover token
curl --request POST \
--url 'https://token-sandbox.dev.clover.com/v1/tokens' \
--header 'apikey: xxx'
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"external_token": {
"transarmor_token_attribute": {
"exp_month": "12",
"exp_year": "2027"
},
"token_value": 1234567890,
"token_type": "TRANSARMOR"
}
}
'
{
"id": "clv_1ABCDefgHI23jKL4m5nOPqR",
"object": "token",
"": {
"last4": ""
}
}
Option 1: Create a charge with an existing TransArmor token
- Send a POST request to the v1/charges endpoint.
- Enter values in the following required parameters:
amount
currency
source
- Under the
stored_credentials
object, select SUBSEQUENT as thesequence
.
The response returns a multi-pay TransArmor token. You can use this token for recurring and multi-pay transactions.
Request and response example—Create a charge with a TA token
curl --request POST \
--url 'https://scl-sandbox.dev.clover.com/v1/charges' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ab86****-****-****-****-*****9867833' \
--header 'Content-Type: application/json' \
--header 'x-forwarded-for: {client_ip}' \
--data '{
"ecomind":"ecom"
"amount": 122,
"currency": "USD",
"capture": false,
"source": "clv_1ABCDefgHI23jKL4m5nOPqR",
"stored_credentials": {
"initiator": "MERCHANT",
"sequence": "SUBSEQUENT",
"is_scheduled": false
}'
{
"id": "3NHSD5ESJE0JE",
…
"saved_credentials_on_file": {
"tokenType": "TRANSARMOR",
"value": "122754**********"
}
…
}
Option 2: Pay for an order with an existing TransArmor token
- Send a POST request to v1/orders/{orderId}/pay endpoint.
- Enter values in the following required parameters:
orderId
source
- Under the
stored_credentials
object, select SUBSEQUENT as thesequence
.
In the response, a multi-pay TransArmor token returns. You can use this token for recurring and multi-pay transactions.
Request and response example—Pay for an order with a TA token
curl --location 'https://scl-sandbox.dev.clover.com/v1/orders/3NHSD5ESJE0JE/pay' \
--header 'Authorization: Bearer ab86****-****-****-****-*****9867833' \
--header 'X-Clover-Merchant-Id: A2J94abcde851' \
--header 'Content-Type: application/json' \
--data '{
"source": "clv_1ABCDefgHI23jKL4m5nOPqR",
"stored_credentials": {
"initiator": "MERCHANT",
"sequence": "FIRST",
"is_scheduled": false
}
}'
{
"id": "3NHSD5ESJE0JE",
…
"saved_credentials_on_file": {
"tokenType": "TRANSARMOR",
"value": "122754**********"
}
…
}
Updated 12 days ago