Making a Credit with a Customer Token {#tms-cust-tkn-credit-intro}
==================================================================

This section describes how to make a credit with a customer token.

Endpoint
--------

**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/credits `{#tms-cust-tkn-credit-intro_restcust-test}  
**Production:** `POST ``https://api.cybersource.com``/pts/v2/credits`  
**Production in India:** `POST ``https://api.in.cybersource.com``/pts/v2/credits`{#tms-cust-tkn-credit-intro_restcust-prod-india}  
**Production in Saudi Arabia:** `POST ``https://api.sa.cybersource.com``/pts/v2/credits `{#tms-cust-tkn-credit-intro_restcust-prod-ksa}  
**Test in Saudi Arabia:** `POST ``https://apitest.sa.cybersource.com``/pts/v2/credits `{#tms-cust-tkn-credit-intro_restcust-test-ksa}

Required Fields for Making a Credit with a Customer Token {#tms-cust-tkn-credit-reqfields}
==========================================================================================

[clientReferenceInformation.code](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-code.md "")
:

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:
Set the value to `INR`.
:   `Vero` supports Brazilian real (BRL) currency only.

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

paymentInformation.customer.id
:
Set to the ID of the customer token you want to use.

Related Information {#tms-cust-tkn-credit-reqfields_section_jpc_xzz_sxb}
------------------------------------------------------------------------

* [API field reference guide for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/api-fields-about-guide.md "")
  {#tms-cust-tkn-credit-reqfields_ul_kpc_xzz_sxb}

REST Example: Making a Credit with a Customer Token {#tms-cust-tkn-credit-ex-rest}
==================================================================================

Request

```
{
  "clientReferenceInformation": {
    "code": "12345678"
  },
    "paymentInformation": {
        "customer": {
            "id": "F45FB3E443AC3C57E053A2598D0A9CFF"
        }
    },
    "orderInformation": {
        "amountDetails": {
            "currency": "USD",
            "totalAmount": "10.00"
        }
    }
}
```

{#tms-cust-tkn-credit-ex-rest_codeblock_ond_y3n_lwb}  
Response to a Successful Request

```
{
  "_links": {
    "void": {
      "method": "POST",
      "href": "/pts/v2/credits/7055967677826132904951/voids"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/credits/7055967677826132904951"
    }
  },
  "clientReferenceInformation": {
    "code": "12345678"
  },
  "creditAmountDetails": {
    "currency": "USD",
    "creditAmount": "10.00"
  },
  "id": "7055967677826132904951",
  "orderInformation": {
    "amountDetails": {
      "currency": "USD"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "instrumentIdentifier": {
      "id": "7030000000014831523",
      "state": "ACTIVE"
    },
    "shippingAddress": {
      "id": "F45FD8DE51B99E9CE053A2598D0AFDFA"
    },
    "paymentInstrument": {
      "id": "F45FE45E7993C7DBE053A2598D0AED19"
    },
    "card": {
      "type": "001"
    },
    "customer": {
      "id": "F45FB3E443AC3C57E053A2598D0A9CFF"
    }
  },
  "processorInformation": {
    "paymentAccountReferenceNumber": "V0010013019326121538313096266",
    "approvalCode": "888888",
    "responseCode": "100"
  },
  "reconciliationId": "67444961BRIL0BB8",
  "status": "PENDING",
  "submitTimeUtc": "2024-01-18T16:52:48Z"
}
```

{#tms-cust-tkn-credit-ex-rest_codeblock_qnd_y3n_lwb}
