> 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/colombia/credit-card.md).

# Credit Card

### Payin by CreditCard

Colombia CreditCard supports Direct Integration. The payment flow includes two steps:

1. Tokenize the card information through the Card Tokenize API.
2. Use the returned card token to submit a payin through the Submit a Payin API.

{% hint style="info" %}
Colombia CreditCard supports refund.
{% endhint %}

### Step 1: Tokenize Card

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

Use this API to tokenize the card information. The returned `token` will be used in Step 2.

#### Request Body

| Parameter               | Type   | Required | Constraints                   | Description                                       |
| ----------------------- | ------ | -------- | ----------------------------- | ------------------------------------------------- |
| app\_id                 | string | Required | Max length: 32                | 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` | Request timestamp.                                |
| card                    | object | Required | -                             | Card information.                                 |
| card.card\_no           | string | Required | -                             | Card number.                                      |
| card.issuer             | string | Required | Example: `visa`               | Card issuer.                                      |
| card.holder             | object | Required | -                             | Cardholder information.                           |
| 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

```json
{
  "app_id": "163***05",
  "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 Sample

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

### Step 2: Submit Payin with Token

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

Use the `token` returned in Step 1 to submit the payin.

#### Request Body

| Parameter                | Type   | Required | Constraints                     | Description                                       |
| ------------------------ | ------ | -------- | ------------------------------- | ------------------------------------------------- |
| app\_id                  | string | Required | Max length: 32                  | The merchant application ID assigned by Pagsmile. |
| timestamp                | string | Required | Format: `yyyy-MM-dd HH:mm:ss`   | Request timestamp.                                |
| out\_trade\_no           | string | Required | Max length: 64                  | Merchant order number. Must be unique.            |
| method                   | string | Required | Fixed value: `CreditCard`       | Payment method.                                   |
| order\_amount            | string | Required | Supports up to 2 decimal places | Payment amount.                                   |
| order\_currency          | string | Required | Fixed value: `COP`              | Payment currency.                                 |
| subject                  | string | Required | Max length: 128                 | Payment subject or order title.                   |
| content                  | string | Required | Max length: 255                 | Payment content or order description.             |
| trade\_type              | string | Required | Fixed value: `API`              | Trade type.                                       |
| notify\_url              | string | Required | Valid URL                       | The URL to receive payment notifications.         |
| return\_url              | string | Required | Valid URL                       | The URL to redirect the customer after payment.   |
| buyer\_id                | string | Required | Max length: 64                  | Merchant-side customer ID.                        |
| timeout\_express         | string | Optional | -                               | Payment expiration time.                          |
| token                    | string | Required | -                               | The card token returned by the Card Tokenize API. |
| issuer                   | string | Required | Example: `visa`                 | Card issuer.                                      |
| customer                 | object | Required | -                               | Customer information.                             |
| customer.identify        | object | Required | -                               | Customer identification information.              |
| customer.identify.type   | string | Required | Example: `CC`                   | Customer identification type.                     |
| customer.identify.number | string | Required | -                               | Customer identification number.                   |
| customer.email           | string | Required | Valid email; max length: 64     | Customer email address.                           |

#### Request Sample

```json
{
  "app_id": "163***305",
  "timestamp": "2026-07-14 13:04:25",
  "out_trade_no": "out_tra***500",
  "method": "CreditCard",
  "order_amount": "1100",
  "order_currency": "COP",
  "subject": "descriptor-PAGSMIL*Hype games",
  "content": "trade pay conent",
  "trade_type": "API",
  "notify_url": "https://www.xcloudgame.com/",
  "return_url": "https://www.xcloudgame.com/",
  "buyer_id": "20260714001",
  "timeout_express": "1c",
  "token": "psct_dd***3",
  "issuer": "visa",
  "customer": {
    "identify": {
      "type": "CC",
      "number": "27***22"
    },
    "email": "TEST@gmail.com"
  }
}
```

#### Response Sample

```json
{
  "code": "10000",
  "msg": "Success",
  "sub_code": "200",
  "sub_msg": "",
  "prepay_id": "Qjd***665e9ac",
  "trade_no": "2026****97",
  "out_trade_no": "out_tr***500",
  "web_url": "",
  "trade_status": "PROCESSING",
  "check_url": "https://checkout.y.uno/payment?session=58***59e&3ds=true"
}
```

{% hint style="info" %}
If `check_url` is returned, redirect the customer to the `check_url` to complete the required authentication process.
{% endhint %}
