Custom charge with Ecwid billing

POST https://app.ecwid.com/api/v3/{storeId}/billing/transactions

Required access scopes

Your app must have the following access scopes to make this request: charge

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

Query params

Some query params are required.

Name
Type
Description

amount

number

Charge amount that can be rounded to two decimal points, for example, 24.99. Maximum charge amount in one request is equal to 500 USD. Maximum charge amount in one day for one store is equal to 5000 USD. Required

currency

string

Charge currency. You can charge in any available currency, even if a store uses another one.

One of: USD, EUR, MXN, INR, GBP, AUD. Required

description

string

Describe what functionality is covered by the charge. Limit: 255 characters. Required

idempotencyKey

string

Generate a unique UUID key to guarantee there is no double charge. Required

metadata

json

A JSON object for reference. For example, pass an ID of a bought product.

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

Defines if this was a duplicate request and Ecwid didn't execute it (true). If false, the billing system accepted UUID and successfully completed the transaction.

Last updated

Was this helpful?