> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/api-reference/rest-api/application/custom-charge-with-ecwid-billing.md). Agents can also search and read this documentation through its [MCP server](https://docs.ecwid.com/~gitbook/mcp).

# Custom charge with Ecwid billing

<mark style="color:blue;">`POST`</mark> `https://app.ecwid.com/api/v3/{storeId}/billing/transactions`&#x20;

### Required access scopes

Your app must have the following **access scopes** to make this request: `charge`&#x20;

### Path params

All path params are required.

| Param   | Type   | Description     |
| ------- | ------ | --------------- |
| storeId | number | Ecwid store ID. |

### Request JSON

Some params are **required**.

<table data-full-width="false"><thead><tr><th width="187">Name</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>number</td><td>Charge amount that can be rounded to two decimal points, for example, <code>24.99</code>.<br><br>Maximum charge amount <em>in one request</em> is equal to <code>500</code> USD.<br>Maximum charge amount <em>in one day for one store</em> is equal to <code>5000</code> USD.<br><br><strong>Required</strong></td></tr><tr><td>currency</td><td>string</td><td><p>Charge currency. You can charge in any available currency, even if a store uses another one.</p><p><br>One of: <code>USD</code>, <code>EUR</code>, <code>MXN</code>, <code>INR</code>, <code>GBP</code>, <code>AUD</code>. <br><br><strong>Required</strong></p></td></tr><tr><td>description</td><td>string</td><td>Describe what functionality is covered by the charge. Limit: 255 characters.<br><br><strong>Required</strong></td></tr><tr><td>idempotencyKey</td><td>string</td><td>Generate a unique UUID key to guarantee there is no double charge.<br><br><strong>Required</strong></td></tr><tr><td>metadata</td><td>json</td><td>A JSON object for reference. For example, pass an ID of a bought product.</td></tr></tbody></table>

### Response JSON

A JSON object with the following fields:

| Name                | Type    | Description                                                                                                                                                                                                 |
| ------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| transactionId       | string  | Internal ID of the transaction. Use it to identify a specific charge in case of any issues.                                                                                                                 |
| idempotencyKeyInUse | boolean | <p>Defines if this was a duplicate request and Ecwid didn't execute it (<code>true</code>).<br><br>If <code>false</code>, the billing system accepted UUID and successfully completed the transaction. </p> |


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecwid.com/api-reference/rest-api/application/custom-charge-with-ecwid-billing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
