> For the complete documentation index, see [llms.txt](https://piqpay.gitbook.io/merchant-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piqpay.gitbook.io/merchant-integration/h2h-host-to-host-integration/rub/order-creation-deposit.md).

# Order creation (deposit)

The following methods are available for creating orders in RUB:&#x20;

| Name             | Method         | Type |
| ---------------- | -------------- | ---- |
| SBP              | PMC\_S2P\_SBP  | H2H  |
| CARD             | PMC\_S2P\_CARD | H2H  |
| SBP Сross-border | PMC\_S2P\_XSBP | H2H  |

{% hint style="info" %}
In the DEV (test) environment, you can test creating orders using the PMC\_S2P\_SBP, PMC\_S2P\_XSBP, and PMC\_S2P\_CARD.&#x20;

You can also test receiving callbacks for orders with the CREATED, CANCELLED, EXPIRED, and COMPLETED statuses.
{% endhint %}

To create an order using these methods, you need to send a POST request with the following parameters in the body.

**Request Body Fields**

**apiKey (string)** - the API key you created for your brand (the Secret Key is specified in the request header as Bearer token);

**amount (object)** - the order amount, type: integer, and the order currency, type: string (example amount: 1000 RUB = 100000 minorAmount);

**paymentMethod (string)** - the order payment method (you can find a list of available methods in the "Methods: Order and Withdrawal" section);

**clientId (string)** - the unique user ID in your system;

**externalId (string)** - the unique order ID in your system;

**clientInstitution (string)** (only for the PMC\_S2P\_XSBP method) - the name of the bank for the cross-border transfer (SBERBANK, TINKOFFBANK, VTB, or ALFABANK) via PMC\_S2P\_XSBP method only;

**callbackUrl (string, optional)** - the URL to which callbacks (notifications) will be sent when an order is created and its status changes;

**redirectUrl (string, optional)** - the link your client will be redirected to after successful payment of the order by clicking the button on the checkout page;

**failureUrl (string, optional)** - the link your client will be redirected to in the event of an order payment failure by clicking the button on the checkout page;

**cancelUrl (string, optional)** - the link your client will be redirected to if the order is canceled by clicking the button on the checkout page.

{% hint style="info" %}
On the checkout page, the "Back to Store" button links to:

the link in the redirectUrl field if the order is successful;

the link in the cancelUrl field if the order is canceled by the user or from the backoffice;

the link in the failureUrl field if an error occurred while creating the order.

On the checkout page, the "Exit" button always links to the link in the redirectUrl.

If the redirectUrl field is not specified in the request, the "Back to Store" and "Exit" buttons will not appear on the checkout page, regardless of the order status.

If the redirectUrl field is not specified in the order body, neither the cancelUrl nor failureUrl fields need to be specified.
{% endhint %}

After successfully creating the order, you will receive a response to the API request with a link to the payment page (the link is in the checkoutUrl field). You need to redirect your client to this page to pay for the order.&#x20;

If you get an error after sending an API request, please check it in the "[API error](/merchant-integration/additional-information/api-errors.md)" section.

{% hint style="info" %}
Additionally, when using the XSBP, SBP, and CARD methods, we return payment details (in the “requisites” field) in the response of the order creation request. You can use these details to display on your side/website to avoid redirecting the client to our checkout page.
{% endhint %}

{% hint style="info" %}
Partial payment of an RUB orders is available for the SBP, CARD and XSBP methods.
{% endhint %}

\
**Example of a request to create an order using the PMC\_S2P\_SBP method**

```json
POST https://eha.piqpay.codes/v1/orders
Authorization: Bearer ${secretKey}

{"apiKey": "<API_KEY>",
"amount": {
"currency": "RUB",
"minorAmount": 50000
},
"paymentMethod": "PMC_S2P_SBP",
"clientId": "123456789",
"externalId": "123456789",
"redirectUrl": "https://example.com/redirect",
"callbackUrl": "https://example.com/callback",
"failureUrl": "https://example.com/failure",
"cancelUrl": "https://example.com/cancel"}
```

\
**Example of a request to create an order using the PMC\_S2P\_CARD method**

```json
POST https://eha.piqpay.codes/v1/orders
Authorization: Bearer ${secretKey}

{"apiKey": "<API_KEY>",
"amount": {
"currency": "RUB",
"minorAmount": 50000
},
"paymentMethod": "PMC_S2P_CARD",
"clientId": "123456789",
"externalId": "123456789",
"redirectUrl": "https://example.com/redirect",
"callbackUrl": "https://example.com/callback",
"failureUrl": "https://example.com/failure",
"cancelUrl": "https://example.com/cancel"}
```

**Example of a request to create an order using the PMC\_S2P\_XSBP method**

```json
POST https://eha.piqpay.codes/v1/orders
Authorization: Bearer ${secretKey}

{"apiKey": "<API_KEY>",
"amount": {
"currency": "RUB",
"minorAmount": 50000
},
"paymentMethod": "PMC_S2P_XSBP",
"clientId": "123456789",
"externalId": "123456789",
"clientInstitution": "<BANK_NAME>",
"redirectUrl": "https://example.com/redirect",
"callbackUrl": "https://example.com/callback",
"failureUrl": "https://example.com/failure",
"cancelUrl": "https://example.com/cancel"}

```

After sending an API deposit request, you will receive a response from our server (example below).&#x20;

Once your deposit is paid by customer, you will receive a callback with the COMPLETED status (see the "Callback" section).

<details>

<summary>Response example to an order creation request</summary>

```json
{"order": {
        "id": "90b75e64-b029-4d75-a129-22ffcc9be54d",
        "createdAt": "2026-02-05T14:21:28.129Z",
        "merchant": {
            "id": "8481fd2a-16f3-45cf-8eb0-7de1285d518a",
            "name": "NewNik",
            "picture": null
        },
        "store": {
            "id": "d8440d52-25a5-4e8e-907d-3d73dd3763a8",
            "name": "Best",
            "country": "RU","picture": null
        },
        "externalId": "123456789",
        "clientId": "123456789",
        "amount": {
            "minorAmount": 500000,
            "currency": "RUB"
        },
        "paymentFlow": "INTERNAL",
        "paymentMethod": {
            "code": "PMC_S2P_SBP",
            "instructions": [
                "PHONE",
                "LEGAL_NAME"
            ]
        },
        "institution": "TINKOFFBANK",
        "readyForPaymentAt": null,
        "processingSince": null,
        "reason": null,
        "state": "READY_FOR_PAYMENT",
        "expiringAt": "2026-02-05T14:26:28.129Z",
        "redirectUrl": null,
        "failureUrl": null,
        "cancelUrl": null,
        "paymentUrl": null,
        "paymentQr": null,
        "paymentDeepLinks": null,
        "paymentCountry": null,
        "checkoutUrl": "https://checkout.piqpay.codes/90b75e64-b029-4d75-a129-fcc9be54d",
        "adjustment": null,
        "clientFlow": "REGULAR",
        "adjustedAt": null,
        "endClient": {
            "name": null,
            "account": null,
            "email": null,
            "phone": null,
            "institution": null,
            "billingAddress": null
        },
        "receiptConfig": null
    },
    "services": null,
    "requisites": null}
```

<br>

</details>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://piqpay.gitbook.io/merchant-integration/h2h-host-to-host-integration/rub/order-creation-deposit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
