# Request payment based on fiat

<mark style="color:green;">`POST`</mark> `/pay/request-pay-sdk-fiat`

This endpoint is designed to initiate the payment request process within PayPangea's ecosystem. By making a POST request to this endpoint, developers can obtain the unique token necessary to proceed with a payment operation. This token is then used to authenticate and facilitate payment transactions through an iframe or a separate webpage, ensuring a seamless and secure payment flow.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <API_KEY>` |

**Body**

<table><thead><tr><th width="210">Name</th><th>Type</th><th width="278">Description</th><th>Required</th></tr></thead><tbody><tr><td>amount</td><td>string</td><td>requested amount in currency</td><td>YES</td></tr><tr><td>token</td><td>string</td><td>Name of the crypto token you want to be paid in</td><td>YES</td></tr><tr><td>currency</td><td>string</td><td>3 letter fiat currency symbol (USD, EUR, INR, ...)</td><td>YES</td></tr><tr><td>chain</td><td>string</td><td>Name of the chain that will be used for transaction</td><td>YES</td></tr><tr><td>title</td><td>string</td><td>Name of the request to be shown to user</td><td>OPTIONAL</td></tr><tr><td>text</td><td>string</td><td>Description of the request</td><td>OPTIONAL</td></tr><tr><td>successredirectURL</td><td>string</td><td>Redirection URL if payemnt was success</td><td>OPTIONAL</td></tr><tr><td>failredirectURL</td><td>string</td><td>Redirection URL if payment failed</td><td>OPTIONAL</td></tr><tr><td>webhookURL</td><td>string</td><td>Webhook URL for notifications</td><td>OPTIONAL</td></tr><tr><td>merchantid</td><td>string</td><td>Uniques ID of payment request set my merchant</td><td>OPTIONAL</td></tr></tbody></table>

**Response**

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

```json
{
  "status": 1,
  "tkn": <token>
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "code": 400,
  "message": <error message>
}
```

{% endtab %}
{% endtabs %}

Once you obtain the token, follow the instructions on this page:

{% content-ref url="/pages/GXJGW0ZE6I3l0cv4BziQ" %}
[Collecting Payments](/crypto-payments/api-integration/collecting-payments.md)
{% endcontent-ref %}


---

# Agent Instructions: 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://docs.paypangea.com/crypto-payments/api-integration/request-payment-based-on-fiat.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.
