> For the complete documentation index, see [llms.txt](https://docs.50spays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.50spays.com/tr/payin/payin-p2p-redirect.md). Agents can also search and read this documentation through its [MCP server](https://docs.50spays.com/~gitbook/mcp).

# PayIn P2P Redirect

## Create Incoming P2P Payment

<mark style="color:green;">`POST`</mark> /api/merchant/redirect/payin/p2p

This method is used to create deposit orders.

**Body**

| Name                    | Type                                                   | Description                                                                                                                                                                                                               |
| ----------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| method                  | string <mark style="color:red;">**(required)**</mark>  | <p>Payment method:<br><strong><code>bank\_account, iban</code></strong><code>,</code><strong><code>card, card\_transgran, sbp, sbp\_transgran, m10, m10\_qr, sim, alipay, wechat, cliq, instapay, pix</code></strong></p> |
| amount                  | number <mark style="color:red;">**(required)**</mark>  | Payment amount                                                                                                                                                                                                            |
| currencyId              | string <mark style="color:red;">**(required)**</mark>  | <p>Payment currency (for fiat, use the ISO 4217 3-letter code):<br><code>RUB, USD, EUR, UAH, AZN, KRW ...</code></p>                                                                                                      |
| bankId                  | integer                                                | <p>Bank identifier in our system. If specified, the account details will be issued for that specific bank.<br><sub><mark style="color:red;">required for KRW VA</mark></sub></p>                                          |
| merchantOrderId         | string <mark style="color:red;">**(required)**</mark>  | Unique order ID in the merchant’s system                                                                                                                                                                                  |
| callbackUrl             | string <mark style="color:red;">**(required)**</mark>  | Callback URL where order status updates will be sent                                                                                                                                                                      |
| successRedirectURL      | string                                                 | URL for user redirecting to the Merchant page in case of success                                                                                                                                                          |
| failedRedirectURL       | string                                                 | URL for user redirecting to the Merchant page in case of failure                                                                                                                                                          |
| comment                 | string                                                 | Payment comment                                                                                                                                                                                                           |
| payerInfo               | object <mark style="color:red;">**(required)**</mark>  | Information about the payer                                                                                                                                                                                               |
| payerInfo.ip            | string                                                 | IP address                                                                                                                                                                                                                |
| payerInfo.userId        | string <mark style="color:red;">**(required)**</mark>  | Unique user ID in the merchant’s system                                                                                                                                                                                   |
| payerInfo.registeredAt  | integer <mark style="color:red;">**(required)**</mark> | UNIX timestamp of user registration in the merchant’s system                                                                                                                                                              |
| payerInfo.email         | string                                                 | User email                                                                                                                                                                                                                |
| payerInfo.phone         | string                                                 | User phone                                                                                                                                                                                                                |
| payerInfo.userFirstName | string                                                 | <p>User first name<br><sub><mark style="color:red;">required for KRW VA and TRY, BRL</mark></sub></p>                                                                                                                     |
| payerInfo.userLastName  | string                                                 | <p>User last name<br><sub><mark style="color:red;">required for KRW VA and TRY, BRL</mark></sub></p>                                                                                                                      |
| payerInfo.accountNumber | string                                                 | <p>The customer’s account number from which the transfer will be made.<br><sub><mark style="color:red;">required for SYP</mark></sub></p>                                                                                 |
| payerInfo.taxId         | string                                                 | <p>Recipient's tax ID<br><sub><mark style="color:red;"><strong>required for BRL pix</strong></mark></sub></p>                                                                                                             |

**Example Request Body**

{% tabs %}
{% tab title="KRW bank\_account" %}

```json
{
    "method": "bank_account",
    "amount": 10000,
    "currencyId": "KRW",
    "merchantOrderId": "32",
    "bankId": 316,
    "callbackUrl": "https://webhook.site/c7e3b35d-3e0b-42e7-a46b-e51b98e865c4",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "ip": "176.221.227.145",
        "userId": "krw16",
        "email": "jack@email.com",
        "phone": "+995555555555",
        "registeredAt": 1695057185,
        "userFirstName": "Jack",
        "userLastName": "Hoverton",
  }
}
```

{% endtab %}

{% tab title="TRY iban" %}

```json
{
    "method": "iban",
    "amount": 2073,
    "currencyId": "TRY",
    "ttl": 5000,
    "merchantOrderId": "32",
    "callbackUrl": "https://webhook.site/c7e3b35d-3e0b-42e7-a46b-e51b98e865c4",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "userId": "1",
        "userFirstName": "Jack",
        "userLastName": "Hoverton",
        "email": "jack@email.com",
        "registeredAt": 1695057185
  }
}
```

{% endtab %}

{% tab title="RUB card" %}

```json
{
    "method": "card",
    "amount": 30074,
    "currencyId": "RUB",
    "ttl": 5000,
    "merchantOrderId": "32",
    "callbackUrl": "https://webhook.site/c7e3b35d-3e0b-42e7-a46b-e51b98e865c4",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "userId": "1",
        "userFirstName": "Jack",
        "userLastName": "Hoverton",
        "email": "jack@email.com",
        "registeredAt": 1695057185
  }
}
```

{% endtab %}

{% tab title="CNY Alipay" %}

```
{
    "method": "alipay",
    "amount": 556,
    "currencyId": "CNY",
    "ttl": 5000,
    "merchantOrderId": "32",
    "callbackUrl": "https://webhook.site/c7e3b35d-3e0b-42e7-a46b-e51b98e865c4",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "userId": "1",
        "userFirstName": "Jack",
        "userLastName": "Hoverton",
        "registeredAt": 1695057185
  }
}
```

{% endtab %}

{% tab title="JPY bank\_account" %}

```json
{
    "method": "bank_account",
    "amount": 25070,
    "currencyId": "JPY",
    "merchantOrderId": "32",
    "callbackUrl": "https://alektest.free.beeceptor.com/webhook",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "userId": "user12",
        "registeredAt": 1695057185,
        "userFirstName": "山田",
        "userLastName": "太郎"
    }
}
```

{% endtab %}

{% tab title="BRL PIX" %}

```json
{
    "method": "pix",
    "amount": 100,
    "currencyId": "BRL",
    "merchantOrderId": "32",
    "callbackUrl": "https://webhook.site/c7e3b35d-3e0b-42e7-a46b-e51b98e865c4",
    "successRedirectURL": "https://webhook.site/?success=1",
    "failedRedirectURL": "https://webhook.site/?error=1",
    "payerInfo": {
        "ip": "176.221.227.145",
        "userId": "user12",
        "email": "jack@email.com",
        "registeredAt": 1695057185,
        "userFirstName": "Jack",
        "userLastName": "Hoverton",
  }
}
```

{% endtab %}
{% endtabs %}

**Response**

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

```json
{
    "ok": true,
    "order": {
        "orderUid": "e2f657da-a776-4fd0-b9bd-5ed1fd75bd7b",
        "amountRequested": 10000,
        "currencyIdRequested": "KRW",
        "paymentUrl": "https://....."
    }
}
```

| Name                | Type   | Description                                                                         |
| ------------------- | ------ | ----------------------------------------------------------------------------------- |
| orderUid            | string | Order UID in our system                                                             |
| paymentUrl          | string | The customer must be redirected to this payment URL to proceed with the transaction |
| amountRequested     | number | Amount the client should send                                                       |
| currencyIdRequested | string | <p>Payment currency:<br><code>RUB, USD, EUR, UAH, AZN ...</code></p>                |
| {% endtab %}        |        |                                                                                     |

{% tab title="4xx/5xx" %}
{% code fullWidth="true" %}

```json
{
    "ok": false,
    "code": 402,
    "message": "human readable error message"
}
```

{% endcode %}

[**All Error Codes**](https://docs.50spays.com/tr/reference/error-codes.md)
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.50spays.com/tr/payin/payin-p2p-redirect.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
