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

# Pagoefectivo

## Payin by Pagoefectivo

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

This endpoint allows you to submit a payin by Pagoefectivo in Peru.

#### Headers

| Name                                            | Type   | Description                                |
| ----------------------------------------------- | ------ | ------------------------------------------ |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json; chartset=UTF-8           |
| Authorization<mark style="color:red;">\*</mark> | string | Basic Base($app\_*id:$security\_*&#x6B;ey) |

#### Request Body

| Name                                              | Type   | Description                                                                                                                                                                             |
| ------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| app\_id<mark style="color:red;">\*</mark>         | string | <p>Created app's ID at dashboard.<br>Max. 32 chars.</p>                                                                                                                                 |
| out\_trade\_no<mark style="color:red;">\*</mark>  | string | ID given by the merchant in their system - Max. 64 chars -                                                                                                                              |
| method<mark style="color:red;">\*</mark>          | string | Fixed value: `PagoEfectivo`.                                                                                                                                                            |
| order\_amount<mark style="color:red;">\*</mark>   | string | <p>Payment amount.</p><p>The typical limit is 1–19,000 PEN.</p><p>Limits may vary by bank. See details <a href="https://docs.pagsmile.com/payin/data/payment-method#peru">here</a>.</p> |
| subject<mark style="color:red;">\*</mark>         | string | <p>Payment reason or item title.<br>Max. 128 chars.</p>                                                                                                                                 |
| order\_currency<mark style="color:red;">\*</mark> | string | Fixed value: `PEN`.                                                                                                                                                                     |
| content                                           | string | <p>Payment reason detail or item detail.<br>Max. 255 chars.</p>                                                                                                                         |
| notify\_url<mark style="color:red;">\*</mark>     | string | Where Pagsmile will send notification to.                                                                                                                                               |
| return\_url                                       | string | Redirect to Merchant's url when user finished checkout                                                                                                                                  |
| buyer\_id<mark style="color:red;">\*</mark>       | string | Merchant user's ID.                                                                                                                                                                     |
| timestamp<mark style="color:red;">\*</mark>       | string | <p>Format: <code>yyyy-MM-dd HH:mm:ss</code>.<br>Max. 19 chars.</p>                                                                                                                      |
| customer.email<mark style="color:red;">\*</mark>  | string | User's email                                                                                                                                                                            |

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

```
{
	"code": "10000",
	"msg": "Success",
	"prepay_id": "bkFkZWl****c48F65",
	"trade_no": "2026****6522",
	"out_trade_no": "out_no_11***291",
	"web_url": "",
	"pay_url": "https://partners.safetypay.com/tokenId=c7c****64&currency=PEN",
	"trade_status": "PROCESSING",
	"reference": "37***26",
	"instruction": "[\"[{\\\"location_id\\\":\\\"8510\\\",\\\"location_name\\\":\\\"PagoEfectivo\\\",\\\"payment_instructions\\\":[{\\\"name\\\":\\\"TransactionID\\\",\\\"value\\\":\\\"42**58\\\"},{\\\"name\\\":\\\"PaymentReference\\\",\\\"value\\\":\\\"378***126\\\",\\\"display_label\\\":\\\"Código CIP\\\"},{\\\"name\\\":\\\"AgreementCode\\\",\\\"value\\\":\\\"PAGOEFECTIVO\\\",\\\"display_label\\\":\\\"Institución/Empresa\\\"},{\\\"name\\\":\\\"PaymentInstructionsURL\\\",\\\"value\\\":\\\"https://partners.safetypay.com/v2/PagoEfectivo/proxyout?tokenId=c7*******c64&currency=PEN\\\"}],\\\"howto_pay_steps\\\":[{\\\"step_number\\\":1,\\\"step_instruction\\\":\\\"Revisa tu correo electrónico para ver las instrucciones de pago.\\\"},{\\\"step_number\\\":2,\\\"step_instruction\\\":\\\"Ingresa al App o Web del banco asociado a PagoEfectivo y selecciona la opción [Pago de Servicios].\\\"},{\\\"step_number\\\":3,\\\"step_instruction\\\":\\\"Busca y selecciona la institución/empresa [PAGOEFECTIVO].\\\"},{\\\"step_number\\\":4,\\\"step_instruction\\\":\\\"Selecciona [PAGOEFECTIVO Soles] e ingresa tu [código CIP 378*****26].\\\"},{\\\"step_number\\\":5,\\\"step_instruction\\\":\\\"Selecciona la cuenta de cargo o Tarjeta de Crédito/Debito.\\\"},{\\\"step_number\\\":6,\\\"step_instruction\\\":\\\"Autoriza el pago y ¡Listo!\\\"}],\\\"status\\\":1}]\"]"
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**User payment tips**

* Redirect users to the link in pay\_url to complete the payment.
  {% endhint %}

## Example

```
curl --location --request POST 'https://gateway.pagsmile.com/trade/pay' \
--header 'Authorization: Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_id": "162************38",
    "out_trade_no": "out_no_142404850147916",
    "method": "PagoEfectivo",
    "order_amount": "1",
    "subject": "trade pay test",
    "order_currency": "PEN",
    "content": "trade pay test conent",
    "notify_url": "http://merchant/callback/success",
    "return_url": "https://www.merchant.com",
    "buyer_id": "22081022323",
    "timestamp": "2026-06-09 10:33:21",
    "customer": {
        "email": "test@pagsmile.com"
    }
}'
```

![User payment page](/files/zZDCLq0BKChj66gnLsdS)

{% hint style="info" %}
Note: **162\*\*\*\*\*\*\*\*\*\*\*\*38** is pagsmile's test app id for sandbox, and **MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==** is authorization token associated with the test app id.
{% endhint %}

{% hint style="danger" %}
Please use your own **app\_id** and generate your own **authorization token** when testing.
{% endhint %}
