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

# Credit Card

How to use CreditCard to submit a payin in Turkmenistan.

### Payin by CreditCard

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

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

| Payment detail  | Description                                                                                           |
| --------------- | ----------------------------------------------------------------------------------------------------- |
| Processing time | Instant                                                                                               |
| Refunds         | Supported                                                                                             |
| Amount limit    | The permitted amount is subject to the cardholder's available card limit and the card issuer's rules. |

{% hint style="info" %}
If the response contains a `check_url`, redirect the customer to the complete URL to finish the 3DS authentication flow.
{% endhint %}

#### Headers

| Name            | Type   | Required | Description                                               |
| --------------- | ------ | -------- | --------------------------------------------------------- |
| `Content-Type`  | string | Yes      | Fixed value: `application/json; charset=UTF-8`.           |
| `Authorization` | string | Yes      | Basic authentication using `Base64(app_id:security_key)`. |

#### Request Body

| Name             | Type    | Required    | Constraints                                                                                                                            | Description                                                                                                                                        |
| ---------------- | ------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `app_id`         | string  | Yes         | Use the App ID assigned by Pagsmile.                                                                                                   | Merchant application ID.                                                                                                                           |
| `out_trade_no`   | string  | Yes         | Maximum length: 64 characters. Must be unique for the merchant application.                                                            | Merchant order number.                                                                                                                             |
| `method`         | string  | Yes         | Fixed value: `CreditCard`.                                                                                                             | Payment method.                                                                                                                                    |
| `region`         | string  | Conditional | ISO 3166-1 alpha-3 country code. Examples: `TKM`.                                                                                      | Country or region of the payment. Required when using a Global App.See [Country Code](https://docs.pagsmile.com/reference/payin/data/country-code) |
| `order_amount`   | decimal | Yes         | Supports up to 2 decimal places. The permitted amount is subject to the cardholder's available card limit and the card issuer's rules. | Payment amount in TMT.                                                                                                                             |
| `order_currency` | string  | Yes         | Fixed value: `TMT`.                                                                                                                    | Payment currency.                                                                                                                                  |
| `subject`        | string  | Yes         | Maximum length: 128 characters.                                                                                                        | Payment subject or order title.                                                                                                                    |
| `content`        | string  | No          | Maximum length: 255 characters.                                                                                                        | Payment description.                                                                                                                               |
| `notify_url`     | string  | Yes         | Must be a valid URL. HTTPS is recommended.                                                                                             | Merchant endpoint that receives asynchronous payment notifications.                                                                                |
| `buyer_id`       | string  | Yes         | Maximum length: 128 characters.                                                                                                        | Merchant-side customer ID.                                                                                                                         |
| `timestamp`      | string  | Yes         | Format: `yyyy-MM-dd HH:mm:ss`.                                                                                                         | Time at which the request is sent.                                                                                                                 |
| `token`          | string  | Yes         | Must be an unused `psct_` token generated within the previous hour.                                                                    | One-time card token generated through the [Tokenization API](https://docs.pagsmile.com/reference/payin/pci-direct-integration/tokenize).           |
| `customer.email` | string  | No          | Maximum length: 64 characters. Must be a valid email address when provided.                                                            | Cardholder's email address.                                                                                                                        |

{% hint style="warning" %}
The card token expires one hour after it is generated and becomes invalid immediately after it is used. Generate a new token immediately before each payment request.
{% endhint %}

#### Responses

{% tabs %}
{% tab title="200: Submit successfully" %}

```json
{
  "code": "10000",
  "msg": "Success",
  "sub_code": "200",
  "sub_msg": "",
  "prepay_id": "UXNud****a9FcD",
  "trade_no": "2026****104",
  "out_trade_no": "out_trade_no_952****33",
  "web_url": "",
  "pay_url": "https://authentication-devices.sandbox.checkout.com/sess***tagfq",
  "trade_status": "PROCESSING",
  "check_url": "https://authentication-devices.sandbox.checkout.com/sess***tagfq"
}
```

{% endtab %}

{% tab title="400: Duplicate out\_trade\_no" %}

```json
{
  "code": "40002",
  "msg": "Business Failed",
  "sub_code": "duplicate-out_trade_no",
  "sub_msg": "out_trade_no is duplicate"
}
```

{% endtab %}
{% endtabs %}

### Example Request

####

```json
{
  "app_id": "178****022",
  "out_trade_no": "out_trade_no_9525***833",
  "order_currency": "TMT",
  "method": "CreditCard",
  "region": "TKM",
  "order_amount": "123",
  "subject": "pagsmile test",
  "content": "pagsmile test",
  "timestamp": "2026-09-28 18:50:42",
  "notify_url": "https://merchant.example.com/payment/notify",
  "buyer_id": "buyer52023",
  "token": "psct_9c9c****1604c59",
  "timeout_express": "15d",
  "customer": {
    "email": "customer@example.com"
  }
}
```

### Complete 3DS Authentication

When `check_url` is returned:

1. Redirect the customer's browser to the complete `check_url` returned by Pagsmile.
2. Do not construct or modify the URL or its query parameters.
3. Allow the customer to complete the 3DS authentication flow.
4. Use the payment notification or the Payin Detail API to determine the final payment status.

{% hint style="warning" %}
A response with `code=10000` confirms that the payment request was accepted. `trade_status=PROCESSING` is not a final successful payment status. Wait for the asynchronous payment notification or query the Payin Detail API before delivering goods or services.
{% endhint %}
