> 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/submit-a-payin/india/creditcard.md).

# CreditCard

## Payin by CreditCard

This endpoint allows you to submit a payin by CreditCard in India.

CreditCard payins in India require card tokenization before submitting the payin request.

{% hint style="info" %}
CreditCard payins in India support refund.
{% endhint %}

***

## Step 1: Tokenize Card

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

Use this endpoint to tokenize the card information. The returned `token` is required when submitting the CreditCard payin.

## Request Body

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

## Request Sample

```json
{
  "app_id": "162************43",
  "format": "JSON",
  "version": "2.0",
  "timestamp": "2026-06-15 14:18:10",
  "card": {
    "card_no": "48************88",
    "issuer": "visa",
    "holder": {
      "name": "user name"
    },
    "cvv": "***",
    "valid_thru_year": "2039",
    "valid_thru_month": "12"
  }
}
```

## Response

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

***

## Step 2: Submit a Payin

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

Use the `token` returned from Step 1 to submit a CreditCard payin.

## Request Body

| Parameter         | Type   | Required | Constraints                     | Description                                                 |
| ----------------- | ------ | -------- | ------------------------------- | ----------------------------------------------------------- |
| app\_id           | string | Yes      | -                               | The merchant application ID assigned by Pagsmile.           |
| out\_trade\_no    | string | Yes      | Must be unique                  | The merchant-side order ID.                                 |
| method            | string | Yes      | Fixed value: `CreditCard`       | Payment method.                                             |
| order\_amount     | string | Yes      | Supports up to 2 decimal places | Payment amount.                                             |
| order\_currency   | string | Yes      | Fixed value: `INR`              | Payment currency.                                           |
| token             | string | Yes      | -                               | The card token returned from the tokenization request.      |
| subject           | string | Yes      | -                               | Order title or product name.                                |
| content           | string | No       | -                               | Order description.                                          |
| trade\_type       | string | Yes      | Fixed value: `API`              | Trade type.                                                 |
| notify\_url       | string | No       | Valid URL                       | The URL used to receive asynchronous payment notifications. |
| return\_url       | string | No       | Valid URL                       | The URL to redirect the customer after payment.             |
| buyer\_id         | string | No       | -                               | The unique customer ID in the merchant system.              |
| timestamp         | string | Yes      | Format: `yyyy-MM-dd HH:mm:ss`   | Request timestamp.                                          |
| timeout\_express  | string | No       | Example: `12300m`               | Payment timeout period.                                     |
| customer.name     | string | Yes      | -                               | Customer name.                                              |
| customer.email    | string | Yes      | Valid email address             | Customer email address.                                     |
| customer.phone    | string | Yes      | Valid phone number              | Customer phone number.                                      |
| address.zip\_code | string | Yes      | -                               | Customer ZIP code.                                          |

## Request Sample

```json
{
  "app_id": "162************43",
  "out_trade_no": "out_tr********800",
  "method": "CreditCard",
  "order_amount": "1.04",
  "order_currency": "INR",
  "token": "psct_794********38",
  "subject": "trade pay test",
  "content": "trade pay test content",
  "trade_type": "API",
  "notify_url": "http://demo.gemini-tiger.cn/callback/success",
  "return_url": "https://www.pag.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

```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.razorpay.com/********pLrQ6E",
  "trade_status": "PROCESSING",
  "check_url": "https://api.razorpay.com/********pLrQ6E"
}
```
