> 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/mexico/creditcard.md).

# Credit Card

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

{% hint style="info" %}
Mexico CreditCard supports Visa, Mastercard, and the local CARNET card scheme.
{% endhint %}

{% hint style="info" %}
There is currently no fixed payment amount limit for Mexico CreditCard. The actual limit depends on the payer's card limit.
{% endhint %}

{% hint style="info" %}
Mexico CreditCard supports refund. Only full refund is supported for Mexico. The refund period is 120 days.
{% endhint %}

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

#### Request Body

| Parameter       | Type   | Required | Constraints                                                                                                  | Description                                                     |
| --------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
| app\_id         | string | Required | Max length: 32                                                                                               | The merchant application ID assigned by Pagsmile.               |
| 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 | No fixed limit. The actual limit depends on the payer's card limit.                                          | Payment amount.                                                 |
| order\_currency | string | Required | Fixed value: `MXN`                                                                                           | Payment currency.                                               |
| subject         | string | Required | Max length: 128                                                                                              | Payment subject or order title.                                 |
| content         | string | Optional | Max length: 255                                                                                              | Payment content or order description.                           |
| notify\_url     | string | Required | Valid URL                                                                                                    | The URL to receive payment notifications.                       |
| return\_url     | string | Required | Valid URL                                                                                                    | The URL to redirect the user after payment.                     |
| buyer\_id       | string | Required | Max length: 64                                                                                               | Merchant-side user ID.                                          |
| timestamp       | string | Required | Format: `yyyy-MM-dd HH:mm:ss`; max length: 19                                                                | Request timestamp.                                              |
| token           | string | Required | Card token returned by the [card tokenization API](https://docs.pagsmile.com/reference/payin/tools/tokenize) | The tokenized card information used to submit the card payment. |
| trade\_type     | string | Required | Fixed value: `API`                                                                                           | Trade type.                                                     |
| customer.name   | string | Required | -                                                                                                            | Customer's name.                                                |
| customer.email  | string | Required | Valid email                                                                                                  | Customer's email address.                                       |

####

#### Request Sample

```json
{
  "app_id": "161***301",
  "out_trade_no": "out_trade_no_98***83",
  "method": "CreditCard",
  "order_amount": "1",
  "order_currency": "MXN",
  "subject": "trade pay test",
  "content": "trade pay test content",
  "notify_url": "http://merchant/callback/success",
  "return_url": "https://www.merchant.com",
  "buyer_id": "testbuyerid",
  "timestamp": "2022-01-01 03:54:01",
  "token": "psct_95****266",
  "trade_type": "API",
  "customer": {
    "name": "test one",
    "email": "Test_name@gmail.com"
  }
}
```

#### Response Sample

```json
{
  "code": "10000",
  "msg": "Success",
  "sub_code": "200",
  "sub_msg": "OK",
  "prepay_id": "RGpsVD***a78c",
  "trade_no": "2026***04548",
  "out_trade_no": "out_trade_no_90***83",
  "web_url": "",
  "trade_status": "PROCESSING",
  "check_url": "https://auth.testcase.com?token=c17422****Fa78c"
}
```

{% hint style="info" %}
If `check_url` is returned, redirect the user to the `check_url` to continue the payment authentication.
{% endhint %}

### Refund

Mexico CreditCard supports refund.

| Country  | Refund Period | Refund Type      |
| -------- | ------------- | ---------------- |
| Mexico   | 120 days      | Full refund only |
| Colombia | 120 days      | Not specified    |
| Chile    | 120 days      | Not specified    |
| Ecuador  | 180 days      | Not specified    |

{% hint style="info" %}
For Mexico CreditCard, only full refund is supported.&#x20;
{% endhint %}
