Create a charge
Creates a new charge to collect payment from a customer.
POSThttps://api.omise.co/charges
Use this endpoint to initiate a payment. You must provide one payment method: a card token, a payment source, or a customer ID with a saved card.
For card payments, first tokenize the card using Omise.js on the client side, then pass the token to this endpoint. For alternative payment methods (PromptPay, TrueMoney, etc.), create a source first and pass the source ID.
When `capture` is set to `false`, the charge is only authorized and must be captured separately within 7 days.
Conditional Requirements
Provide exactly one payment method:
card, source, or customer.Parameters
amountintegerrequired
Charge amount in smallest currency unit (e.g., satang for THB, cents for USD)
currencystringrequired
Three-letter ISO 4217 currency code
thbjpyusdsgdmyr
cardstringconditional
Card token (tokn_test_...) or card ID. Required if source and customer are not provided.
sourcestringconditional
Payment source token for alternative payment methods (PromptPay, TrueMoney, etc.).
customerstringconditional
Customer ID (cust_test_...) with a saved default card.
return_uriuriconditional
URL to redirect customer after 3-D Secure authentication or redirect-based payment completion. Required for 3DS and redirect flows.
capturebooleanoptional
Whether to immediately capture the charge. Set to false for pre-authorization.
truefalse
descriptionstringoptional
Merchant-facing transaction description for your records.
metadataobjectoptional
Custom key-value pairs to store additional information about the charge.
ipstringoptional
Customer IP address for fraud detection and risk analysis.
expires_atdate-timeoptional
ISO 8601 timestamp when the charge should expire if not completed.