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

  1. Create an ecommerce app integration in the Global Developer Dashboard. See Get started with the Global Developer Dashboard.
  2. Existing TransArmor® token. See Create a TransArmor token.

Create a TransArmor token

  1. Generate a PAKMS key.
  2. Send a POST request to the v1/tokens endpoint.
  3. Expand the external_token object.
  4. Enter the required information:
  • token_value—Value of the TransArmor token.
  • token_type—Type of the multi-pay token such as TransArmor.
  • exp_month—Card expiration month in 2-digit format. Format: mm
  • exp_year—Card expiration year in 2- or 4-digit format. Format: yy or yyyy
  • 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.

In the response, a multi-pay token 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",  
    "card": {  
        "last4": ""  
    }  
}

Option 1: Create a charge with an existing TransArmor token

  1. Send a POST request to the v1/charges endpoint.
  2. Enter the required information:
  • amount
  • currency
  • source
  1. Under the stored_credentials object, select SUBSEQUENT as the sequence.
    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

  1. Send a POST request to v1/orders/{orderId}/pay endpoint.
  2. Enter the required information:
    • orderId
    • source
  3. Under the stored_credentials object, select SUBSEQUENT as the sequence.
    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**********"
    }
…
}