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

# PSE

How to use PSE to submit a payin in Colombia.

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

This endpoint allows you to submit a payin by PSE in Colombia.

#### Headers

| Name                                            | Type   | Description                                                                   |
| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | string | `application/json; charset=UTF-8`                                             |
| Authorization<mark style="color:red;">\*</mark> | string | Basic authentication using the Base64-encoded value of `app_id:security_key`. |

#### Request Body

{% hint style="info" %}
The `beneficiary` object and all fields within it are optional.
{% endhint %}

| Name                                                       | Type   | Description                                                                                                                                |
| ---------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| app\_id<mark style="color:red;">\*</mark>                  | string | App ID assigned to the merchant application. Maximum length: 32 characters.                                                                |
| out\_trade\_no<mark style="color:red;">\*</mark>           | string | Unique merchant order number. Maximum length: 64 characters.                                                                               |
| timestamp<mark style="color:red;">\*</mark>                | string | Request time in `yyyy-MM-dd HH:mm:ss` format. Maximum length: 19 characters.                                                               |
| notify\_url<mark style="color:red;">\*</mark>              | string | URL to which Pagsmile sends the asynchronous payment result notification.                                                                  |
| method<mark style="color:red;">\*</mark>                   | string | Fixed value: `PSE`.                                                                                                                        |
| order\_amount<mark style="color:red;">\*</mark>            | string | Payment amount. See the Colombia payment method limits.                                                                                    |
| order\_currency<mark style="color:red;">\*</mark>          | string | Fixed value: `COP`.                                                                                                                        |
| buyer\_id<mark style="color:red;">\*</mark>                | string | Merchant-defined identifier of the payer.                                                                                                  |
| subject<mark style="color:red;">\*</mark>                  | string | Payment reason or item title. Maximum length: 128 characters.                                                                              |
| content                                                    | string | Payment reason details or item details. Maximum length: 255 characters.                                                                    |
| return\_url                                                | string | URL to which the payer is redirected after checkout. This redirect does not apply to pages controlled by the payment provider.             |
| bank<mark style="color:red;">\*</mark>                     | string | PSE bank ID. Use the [Supported Bank List Query API](https://docs.pagsmile.com/payin/tools/supported-bank-list-query) to obtain the value. |
| customer.name<mark style="color:red;">\*</mark>            | string | Payer's full name.                                                                                                                         |
| customer.identify.type<mark style="color:red;">\*</mark>   | string | Payer's identification type. Available values: `NIT`, `CC`, or `CE`.                                                                       |
| customer.identify.number<mark style="color:red;">\*</mark> | string | Payer's identification number. `NIT`: 10 digits; `CC`: 6–10 digits; `CE`: 5–12 characters.                                                 |
| customer.email<mark style="color:red;">\*</mark>           | string | Payer's email address.                                                                                                                     |
| customer.phone<mark style="color:red;">\*</mark>           | string | Payer's phone number, including the Colombia country code `57`.                                                                            |
| address.line1<mark style="color:red;">\*</mark>            | string | Payer's street address.                                                                                                                    |
| beneficiary.entity\_type                                   | string | Optional. Beneficiary entity type. Available values: `individual` or `company`.                                                            |
| beneficiary.identification.type                            | string | Optional. Beneficiary identification type, for example, `NIT`.                                                                             |
| beneficiary.identification.number                          | string | Optional. Beneficiary identification number. Maximum length: 64 characters.                                                                |
| beneficiary.name                                           | string | Optional. Beneficiary's full legal name.                                                                                                   |
| beneficiary.industry.type                                  | string | Optional. Industry classification system. Available values: `CIIU`, `MCC`, `CNAE`, `SCIAN`, or `GB/T`.                                     |
| beneficiary.industry.code                                  | string | Optional. Industry code under the classification system specified by `beneficiary.industry.type`.                                          |

#### Request Sample

```json
{
  "app_id": "162************38",
  "out_trade_no": "202610270354005",
  "method": "PSE",
  "order_amount": "3000",
  "order_currency": "COP",
  "subject": "trade pay test",
  "content": "trade pay test content",
  "notify_url": "https://merchant.example.com/callback/success",
  "return_url": "https://merchant.example.com/payment/result",
  "buyer_id": "buyer_0101_0001",
  "timestamp": "2026-10-27 03:54:01",
  "timeout_express": "1c",
  "bank": "1040",
  "customer": {
    "identify": {
      "type": "NIT",
      "number": "1234123121"
    },
    "name": "Test User Name",
    "email": "test@example.com",
    "phone": "57468****068"
  },
  "address": {
    "line1": "test address line1"
  },
  "beneficiary": {
    "entity_type": "individual",
    "identification": {
      "type": "NIT",
      "number": "900123456"
    },
    "name": "Comercial Ejemplo S.A.S.",
    "industry": {
      "type": "GB/T",
      "code": "4711"
    }
  }
}
```

#### Response

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

```json
{
  "code": "10000",
  "msg": "Success",
  "trade_no": "2026********0083",
  "out_trade_no": "202610270354005",
  "web_url": "",
  "pay_url": "https://checkout.pagsmile.com/checkout?prepay_id=********",
  "trade_status": "PROCESSING"
}
```

{% 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 %}

{% hint style="danger" %}
Use your own `app_id` and generate the corresponding authorization value when testing.
{% endhint %}
