Ecwid Billing charge request

📘

Access scope required: charge

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

Mandatory fields are in bold.

FieldTypeDescription
amountnumberThe amount user will be charged. Could be rounded to hundredths
currencystringAccepted currencies: USD, RUB, EUR, MXN, INR, GBP, AUD. You can charge in any currency from the list, even if it's different from the one used in store owner's subscription to Ecwid plans or apps.
descriptionstringDescribe why the charge is made. Max: 255 characters.
idempotencyKeystringUUID key that guarantees there is no double charge, must be unique for each transaction
metadataarrayA JSON object for reference, for example, for passing an ID of a bought product

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescriptionCode (optional)
400Charge amount is not rounded to hundredths or less than 0CHARGE_AMOUNT_INVALID
400Invalid currency code usedCHARGE_CURRENCY_INVALID
400Description is empty or exceeds 255 characters limitCHARGE_DESCRIPTION_INVALID
400Invalid UUID keyCHARGE_IDEMPOTENCY_KEY_INVALID
400The same UUID key was used for another request with different parametersCHARGE_IDEMPOTENCY_KEY_NOT_UNIQUE
402The card couldn't be chargedCHARGE_DECLINED
402No chargeable payment method is connected with the storeCHARGE_PAYMENT_SOURCE_MISSING
402Charge limit exceededCHARGE_LIMIT_EXCEEDED
403Token doesn't exist or the charge scope is missingCHARGE_LIMIT_EXCEEDED

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
errorCodestringError code

Charge limits:

— Per transaction: $500
— Per owner ID in a day: $5000

Language