> 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/costa-rica/sinpemovil.md).

# SINPEMovil

How to use SINPEMovil to submit a payin in Costa Rica.

### Payin by SINPE Móvil

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

This endpoint allows you to submit a payin through SINPE Móvil in Costa Rica. Payments are processed in Costa Rican colón (CRC) and are typically credited instantly after the customer completes the payment.

#### Headers

| Name            | Type   | Required | Constraints                                     | Description                                                                       |
| --------------- | ------ | -------- | ----------------------------------------------- | --------------------------------------------------------------------------------- |
| `Content-Type`  | string | Yes      | Fixed value: `application/json; charset=UTF-8`. | Media type of the request body.                                                   |
| `Authorization` | string | Yes      | Use `Basic Base64(app_id:security_key)`.        | HTTP Basic authentication credential generated with your App ID and security key. |

#### Request Body

<table><thead><tr><th>Name</th><th width="106.4609375">Type</th><th width="95.296875">Required</th><th width="224.921875">Constraints</th><th>Description</th></tr></thead><tbody><tr><td><code>app_id</code></td><td>string</td><td>Yes</td><td>Use the App ID assigned by Pagsmile.</td><td>Merchant application ID.</td></tr><tr><td><code>timestamp</code></td><td>string</td><td>Yes</td><td>Format: <code>yyyy-MM-dd HH:mm:ss</code>.</td><td>Date and time when the request is sent.</td></tr><tr><td><code>out_trade_no</code></td><td>string</td><td>Yes</td><td>Maximum length: 64 characters. Must be unique for the merchant application.</td><td>Merchant order number.</td></tr><tr><td><code>method</code></td><td>string</td><td>Yes</td><td>Fixed value: <code>SINPEMovil</code>.</td><td>Payment method.</td></tr><tr><td><code>order_amount</code></td><td>string</td><td>Yes</td><td>Numeric value with up to two decimal places. Channel-specific minimum and maximum amounts are not currently provided.</td><td>Payment amount in CRC.</td></tr><tr><td><code>order_currency</code></td><td>string</td><td>Yes</td><td>Fixed value: <code>CRC</code>.</td><td>Payment currency.</td></tr><tr><td><code>subject</code></td><td>string</td><td>Yes</td><td>Maximum length: 128 characters.</td><td>Payment reason or item title.</td></tr><tr><td><code>content</code></td><td>string</td><td>No</td><td>Maximum length: 255 characters.</td><td>Payment or item details.</td></tr><tr><td><code>notify_url</code></td><td>string</td><td>Yes</td><td>Provide an endpoint that can receive server-to-server notifications.</td><td>URL to which Pagsmile sends payment status notifications.</td></tr><tr><td><code>return_url</code></td><td>string</td><td>No</td><td>Provide a valid merchant URL when a return page is required.</td><td>URL to which the customer is redirected after completing the payment flow.</td></tr><tr><td><code>buyer_id</code></td><td>string</td><td>Yes</td><td>Maximum length: 128 characters.</td><td>Unique customer identifier in the merchant system.</td></tr><tr><td><code>timeout_express</code></td><td>string</td><td>No</td><td>Supports minutes (<code>m</code>), hours (<code>h</code> or <code>H</code>), days (<code>d</code> or <code>D</code>), or end of the current day (<code>c</code>). For example, <code>1c</code> means the order expires at the end of the current day.</td><td>Requested order timeout. If omitted, the system default is 90 minutes.</td></tr><tr><td><code>customer.phone</code></td><td>string</td><td>Yes</td><td>Submit the customer's phone number, including the country calling code.</td><td>Customer phone number used for the SINPE Móvil payment.</td></tr><tr><td><code>customer.identify.type</code></td><td>string</td><td>Yes</td><td>One of: <code>Persona física nacional</code>, <code>Persona física residente</code>, <code>Entidad estatal</code>, <code>Persona jurídica</code>, <code>Institución autónoma</code>, <code>Diplomático</code>, or <code>Extranjero</code>.</td><td>Customer identification type.</td></tr><tr><td><code>customer.identify.number</code></td><td>string</td><td>Yes</td><td>Maximum length: 64 characters.</td><td>Customer identification number.</td></tr></tbody></table>

#### Request Sample

```json
{
  "app_id": "163***865",
  "timestamp": "2025-09-11 10:56:13",
  "out_trade_no": "out_tr****3700",
  "method": "SINPEMovil",
  "order_amount": "300",
  "order_currency": "CRC",
  "subject": "trade pay test",
  "content": "trade pay test",
  "notify_url": "http://demo.gemini-tiger.cn/callback/success",
  "return_url": "https://www.pag.com",
  "buyer_id": "user_name",
  "timeout_express": "1c",
  "customer": {
    "identify": {
      "type": "Persona física nacional",
      "number": "0204585317"
    },
    "phone": "50684030119"
  }
}
```

#### Response Sample

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

```json
{
  "code": "10000",
  "msg": "Success",
  "prepay_id": "M0R****3DFa",
  "trade_no": "2025****953",
  "out_trade_no": "out_tr****700",
  "web_url": "",
  "trade_status": "PROCESSING",
  "reference": "8494-4884"
}
```

{% 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="warning" %}
Use your own `app_id` and the corresponding authorization credential when testing.
{% endhint %}
