Create a gift card token

North America—United States and Canada

A gift card is a prepaid payment card used for purchases at participating restaurants, stores, or online retailers, available in various denominations. Depending on the issuer’s terms, you can redeem these cards for services, merchandise, or cash.

Clover native gift cards managed through the Fiserv payment gateway, are integrated into the Clover point of sale (POS) system for seamless transactions. Physical gift cards have a 4-8 digit security card value (SCV), while virtual gift cards use a promo code.

To process secure gift card payment, you require a single-pay Clover gift card token, which is a unique code that indicates gift card details and metadata.

Prerequisites

  1. Gift card number.
  2. OAuth API token or access_token.

Steps

  1. Use the OAuth API token or access_token to generate an Ecommerce API key or apiAccessKey.
  2. Send a POST request to the /v1/tokens endpoint. See Create a gift card token endpoint.
  3. Enter information in the following fields:
FieldDescriptionRequired/Optional
numberGift card number.
Length: One of the following: 6-digit, 13-digit, 16-digit, or 19-digit
Format: Numeric only
Required.
apikeyEcommerce API key or apiAccessKey generated in step 1.Required.
security_codeSecurity card value (SCV) associated with a Clover gift card.
Length: 4-8 characters
Optional.

A single-pay Clover gift card token (cToken) is returned in the response. The token is alphanumeric and begins with clv_. Example: clv_1TSTSECWntExtCdPXnbFjkgN

Request and Response example—Single-pay gift card token

Request a single-pay gift gift card token using a Clover gift card number and secure code value (SCV).

curl --request POST \
     --url 'https://token-sandbox.dev.clover.com/v1/tokens' \
     --header 'apikey: 12cda345c6c78e90a120a345df67890e' 
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "gift_card": {
    "card_number": "98765432100",
    "security_code": "785577",
  }
}
{  
    "id": "clv_1TSTSExxxxxxxxxPXnbFjkgN",  
    "object": "token",  
    "giftCard": {  
        "last4": "2100"  
    }  
}

Use the single-pay gift card token with the following endpoints: