> 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/hpp-integration/order-creation-deposit.md).

# Order creation (deposit)

In addition to the POST request to create an order (H2H integration), you can use a GET request. The response to a GET request for creating an order will be a page with the order payment details.

\
To create an order, specify the following parameters in the GET request:

**apiKey** - the API key you created for your brand;

**amount** - the order amount and order currency;

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

**clientId** - a unique user ID in your system;

**externalId** - a unique order ID in your system;

**clientInstitution (string)** (only for the PMC\_S2P\_XSBP, PMC\_S2P\_WALLET and PMC\_S2P\_FPX methods) - the name of the bank/app whose details you would like to receive for payment (you can find a list of available apps in the "Bank Directory" section);

**clientAccount** (string, optional) (only for the PMC\_S2P\_WALLET method) - the client's phone number in the national domestic format (for Egypt, it starts with 01; for PKR it starts with 03).

**clientName** (optional) (only for the PMC\_S2P\_ACCOUNT method) - your client's official name;

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

**redirectUrl** (optional) - the link your client will be redirected to after successfully paying for the order by clicking the button on the checkout page;

**failureUrl** (optional) - the link your client will be redirected to if the order payment fails when clicking the button on the checkout page;

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

\
**Example of a request to create an order**

{% code overflow="wrap" %}

```json
https://checkout.piqpay.codes/hpp?apiKey=<API_KEY>&currency=ARS&amount=5000&paymentMethod=PMC_S2P_ACCOUNT&clientId=123456789&externalId=123456789
```

{% endcode %}

After clicking the link, your client will be redirected to a page with payment details.

\
To send a GET request to create an order, you can use the following form by adding it to the order creation page:

{% code overflow="wrap" %}

```html
<form target="_blank" action={`checkout.piqpay.com/hpp/`} method="get">
    <input type="hidden" name="amount" value="100"/>
    <input type="hidden" name="currency" value="RUB" />
    <input type="hidden" name="paymentMethod" value="PMC_S2P_SBP">
    <input type="hidden" name="clientId" value="<your_client_id>" />
    <input type="hidden" name="clientName" value="<your_client_account>" />
    <input type="hidden" name="apiKey" value="<your_api_key>" />
    <input type="hidden" name="externalId" value="<your_order_id>" />
    <input type="hidden" name="redirectUrl" value="<your_redirect_url>" />
    <input type="submit" value="Pay"/>
</form>
```

{% endcode %}


---

# 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/hpp-integration/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.
