> For the complete documentation index, see [llms.txt](https://docs.pagsmile.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagsmile.com/reference/payin/vault/india/creditcard.md).

# CreditCard

This page describes how to submit an India CreditCard payment with a vault token.

For India CreditCard vault payments, merchants need to tokenize the customer's card first, create a vault token with the returned card token, and then submit the Payin request with the vault token.

## Step 1: Tokenize the Card

Tokenize the customer's card information and obtain a card token.

### Endpoint

<mark style="color:green;">`POST`</mark> `https://security-test.pagsmile.com/card/tokenize`

### Request Body

| Parameter               | Type   | Requirement | Constraints                                  | Description                                       |
| ----------------------- | ------ | ----------- | -------------------------------------------- | ------------------------------------------------- |
| app\_id                 | string | Required    | Max 32 chars.                                | The merchant application ID assigned by Pagsmile. |
| format                  | string | Required    | Fixed value: `JSON`.                         | Request format.                                   |
| version                 | string | Required    | Fixed value: `2.0`.                          | API version.                                      |
| timestamp               | string | Required    | Format: `yyyy-MM-dd HH:mm:ss`. Max 19 chars. | Request timestamp.                                |
| card.card\_no           | string | Required    | -                                            | Card number.                                      |
| card.issuer             | string | Required    | Example: `visa`.                             | Card issuer.                                      |
| card.holder.name        | string | Required    | -                                            | Cardholder name.                                  |
| card.cvv                | string | Required    | -                                            | Card CVV.                                         |
| card.valid\_thru\_year  | string | Required    | Format: `yyyy`.                              | Card expiration year.                             |
| card.valid\_thru\_month | string | Required    | Format: `MM`.                                | Card expiration month.                            |

### Request Sample

```curl
curl --location --request POST 'https://security-test.pagsmile.com/card/tokenize' \
--header 'Authorization: Basic Base64(app_id:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
  "app_id": "162************43",
  "format": "JSON",
  "version": "2.0",
  "timestamp": "2026-06-15 14:18:10",
  "card": {
    "card_no": "48************8",
    "issuer": "visa",
    "holder": {
      "name": "user name"
    },
    "cvv": "123",
    "valid_thru_year": "2039",
    "valid_thru_month": "12"
  }
}'
```

### Response

{% tabs %}
{% tab title="200 success" %}

```json
{
  "code": "10000",
  "msg": "Success",
  "token": "psct_cc7***a83"
}
```

{% endtab %}
{% endtabs %}

## Step 2: Create a Vault Token

Use the card token returned from Step 1 to create a vault token.

### Endpoint

<mark style="color:green;">`POST`</mark> `https://gateway-test.pagsmile.com/vault/create`

### Request Body

| Parameter               | Type   | Requirement | Constraints                                  | Description                                                  |
| ----------------------- | ------ | ----------- | -------------------------------------------- | ------------------------------------------------------------ |
| app\_id                 | string | Required    | Max 32 chars.                                | The merchant application ID assigned by Pagsmile.            |
| timestamp               | string | Required    | Format: `yyyy-MM-dd HH:mm:ss`. Max 19 chars. | Request timestamp.                                           |
| version                 | string | Optional    | Fixed value: `2.0`, if provided.             | API version. Use the value provided by Pagsmile if required. |
| type                    | string | Required    | Fixed value: `Card`.                         | Payment type.                                                |
| card\_token.region      | string | Required    | Fixed value: `IND`.                          | Card token region.                                           |
| card\_token.method      | string | Required    | Fixed value: `CreditCard`.                   | Card token payment method.                                   |
| card\_token.uid         | string | Required    | Merchant-generated user ID.                  | The unique user ID generated by the merchant.                |
| card\_token.token       | string | Required    | Returned from Step 1.                        | The card token returned from Step 1.                         |
| card\_token.notify\_url | string | Required    | Valid URL.                                   | The URL used to receive asynchronous notifications.          |

### Request Sample

```curl
curl --location --request POST 'https://gateway-test.pagsmile.com/vault/create' \
--header 'Authorization: Basic Base64(app_id:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
  "app_id": "162************43",
  "timestamp": "2026-06-15 15:49:33",
  "version": "",
  "type": "Card",
  "card_token": {
    "region": "IND",
    "method": "CreditCard",
    "uid": "uid043003",
    "token": "psct_cc****a83",
    "notify_url": "http://merchant/callback/success"
  }
}'
```

### Response

{% tabs %}
{% tab title="200 success" %}

```json
{
  "code": "10000",
  "msg": "Success",
  "token": "card_794****38",
  "type": "Card",
  "timestamp": "2026-06-15 07:49:35"
}
```

{% endtab %}
{% endtabs %}

## Step 3: Submit Payin with Vault Token

Use the vault token returned from Step 2 to submit the India CreditCard Payin request.&#x20;

{% hint style="info" %}
For India CreditCard vault payments, capture is not completed immediately after order creation. It usually takes around 36 hours from order creation to capture. The actual capture time may be delayed when banks are under high processing pressure.
{% endhint %}

### Endpoint

<mark style="color:green;">`POST`</mark> `https://gateway-test.pagsmile.com/trade/pay`

### Request Body

| Parameter         | Type   | Requirement | Constraints                                  | Description                                                 |
| ----------------- | ------ | ----------- | -------------------------------------------- | ----------------------------------------------------------- |
| app\_id           | string | Optional    | Max 32 chars.                                | The merchant application ID assigned by Pagsmile.           |
| out\_trade\_no    | string | Optional    | Max 64 chars.                                | The unique order number generated by the merchant.          |
| method            | string | Optional    | Fixed value: `CreditCard`.                   | Payment method.                                             |
| order\_amount     | string | Optional    | Range: `0.1–9999999`.                        | The order amount.                                           |
| order\_currency   | string | Optional    | Fixed value: `INR`.                          | Order currency.                                             |
| vault\_token      | string | Optional    | Returned from Create Vault.                  | The vault token returned from Step 2.                       |
| subject           | string | Optional    | Max 128 chars.                               | The order subject.                                          |
| content           | string | Optional    | Max 255 chars.                               | The order description.                                      |
| trade\_type       | string | Optional    | Fixed value: `API`.                          | Trade type.                                                 |
| notify\_url       | string | Optional    | Valid URL.                                   | The URL used to receive asynchronous payment notifications. |
| return\_url       | string | Optional    | Valid URL.                                   | The URL to redirect the customer after payment.             |
| buyer\_id         | string | Optional    | Merchant-generated user ID.                  | The unique customer ID generated by the merchant.           |
| timestamp         | string | Optional    | Format: `yyyy-MM-dd HH:mm:ss`. Max 19 chars. | Request timestamp.                                          |
| timeout\_express  | string | Optional    | -                                            | Payment expiration time.                                    |
| customer.name     | string | Required    | -                                            | Customer's name.                                            |
| customer.email    | string | Required    | Valid email address.                         | Customer's email address.                                   |
| customer.phone    | string | Required    | -                                            | Customer's phone number.                                    |
| address.zip\_code | string | Required    | -                                            | Customer's ZIP code.                                        |

### Request Sample

```curl
curl --location --request POST 'https://gateway-test.pagsmile.com/trade/pay' \
--header 'Authorization: Basic Base64(app_id:security_key)' \
--header 'Content-Type: application/json' \
--data-raw '{
  "app_id": "162************43",
  "out_trade_no": "out_tr***800",
  "method": "CreditCard",
  "order_amount": "1.04",
  "order_currency": "INR",
  "vault_token": "card_794***38",
  "subject": "trade pay test",
  "content": "trade pay test content",
  "trade_type": "API",
  "notify_url": "http://merchant/callback/success",
  "return_url": "https://www.merchant.com",
  "buyer_id": "5201005",
  "timestamp": "2026-06-15 15:49:34",
  "timeout_express": "12300m",
  "customer": {
    "name": "test user",
    "email": "test001@example.com",
    "phone": "91***49"
  },
  "address": {
    "zip_code": "303503"
  }
}'
```

### Response

{% tabs %}
{% tab title="200 success" %}

```json
{
  "code": "10000",
  "msg": "Success",
  "sub_code": "200",
  "sub_msg": "",
  "prepay_id": "NDd***B0c4",
  "trade_no": "2026***28",
  "out_trade_no": "out_tr***300",
  "web_url": "",
  "pay_url": "https://api.razorpa***pLrQ6E",
  "trade_status": "PROCESSING",
  "check_url": "https://api.razo***pLrQ6E"
}
```

{% endtab %}
{% endtabs %}

## Refund

Refund is supported for this payment method.
