# Payment APIs

## Start a payment flow

<mark style="color:green;">`POST`</mark> `/payment/ready`

This API returns the payment URL for the Excoinz ExPay Payment Page.

**Headers**

| Name            | Value                 |
| --------------- | --------------------- |
| Content-Type    | `application/json`    |
| EXCOINZ\_SECRET | `Bearer <secret key>` |

**Body**

<table><thead><tr><th width="228">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>string</td><td>The Merchant client ID.</td></tr><tr><td><code>item_name</code></td><td>string</td><td>The name of the product to display on the checkout.</td></tr><tr><td><code>item_img_url</code></td><td>string</td><td>The URL of the product image to display on the checkout.</td></tr><tr><td><code>partner_order_id</code></td><td>string</td><td>Merchant billing ID to prevent duplicate requests. Payment will not process payments for duplicate IDs.</td></tr><tr><td><code>partner_user_id</code></td><td>string</td><td>Merchant user identifier for statistics.</td></tr><tr><td><code>amount</code></td><td>string</td><td>Please enter the amount you want to charge</td></tr><tr><td><code>locale</code></td><td>string</td><td>Supports three types of values: "en", "cn", "ko"</td></tr></tbody></table>

**Response**

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

```json
{
  redirect_url:'https://pay.excoinz.com/payment?locale=en&t=yourtoken'
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "code": -101,
  "message":"Invalid Client ID"
}
```

{% endtab %}
{% endtabs %}

Error Code

<table data-full-width="false"><thead><tr><th width="112">Status</th><th width="120">Error Code</th><th width="158">Message</th><th>Solution</th></tr></thead><tbody><tr><td>400</td><td>-101</td><td>Invalid Client ID</td><td>Double-check the client key value.</td></tr></tbody></table>


---

# 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://payment.excoinz.com/core-api/payment-apis.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.
