> For the complete documentation index, see [llms.txt](https://ton-play-1.gitbook.io/ton-play-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ton-play-1.gitbook.io/ton-play-1/payment-solution/pay-in.md).

# Pay-in

Choose what you want to sell to your users:

* mark it with `orderId` (this is the payment identifier in your system that will help you to detect incoming transactions) &#x20;
* set up the price in $TON for the item&#x20;

When the user makes payments, you'll get an event and $TON to the same webhook and wallet you added while creating the merchant request.&#x20;

{% hint style="success" %}
[**PaymentKey**](/ton-play-1/payment-solution/get-started.md) is required for this request.
{% endhint %}

{% hint style="info" %}
In order to make pay-in over third party payment system, you should add specific parameter `ps` into request. \
\
Available values for `ps` parameter: \[WALLETBOT]\
\
After request completion you will get optional payment deeplink in response body path: \
\
`.optional.$paymentSystemName`
{% endhint %}

## Get payments from users

<mark style="color:green;">`POST`</mark> `https://tpay.tonplay.io/pay/in/v1/new`

#### Query Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| ps   | String | PaymentSystemName |

#### Headers

| Name                                           | Type   | Description                    |
| ---------------------------------------------- | ------ | ------------------------------ |
| X-Auth-Tpay<mark style="color:red;">\*</mark>  | String | PaymentKey                     |
| Content-Type<mark style="color:red;">\*</mark> | String | <p>application/</p><p>json</p> |

#### Request Body

| Name                                      | Type   | Description                                                                   |
| ----------------------------------------- | ------ | ----------------------------------------------------------------------------- |
| orderId<mark style="color:red;">\*</mark> | String | *external order id in the merchant’s system (*&#x61;ny of your forma&#x74;*)* |
| amount<mark style="color:red;">\*</mark>  | String | *value in $TON*                                                               |
| telegramUserId                            | String | required for ps=WALLETBOT                                                     |

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

```json
{
    "tonkeeper": "https://app.tonkeeper.com/transfer/EQCSP1xhpNpQmIIYDwbMs2lZmy6ep496v3JfIy__DTH6ZqJ2?amount=100000000&text=de6b3add-d40f-4a00-a435-8673ed3e46d6-1685970727",
    "tonhub": "https://tonhub.com/transfer/EQCSP1xhpNpQmIIYDwbMs2lZmy6ep496v3JfIy__DTH6ZqJ2?amount=100000000&text=de6b3add-d40f-4a00-a435-8673ed3e46d6-1685970727",
    "optional": {
        "walletbot": "https://t.me/wallet?startattach=wpay_order-orderId__7635063330045953"
    }
}
```

{% endtab %}
{% endtabs %}
