Skip to main content
Version: 2019-05-29 (Current)

Charge API

The Charge API allows you to create and manage payment charges for all payment methods supported by Omise.

Endpointsโ€‹

Common Use Casesโ€‹

  • One-time payments: Create charges for immediate payment
  • Pre-authorization: Authorize funds and capture later
  • Recurring billing: Create charges for saved payment methods
  • Multi-currency: Process charges in different currencies

Charge Failure Codesโ€‹

When a charge fails, the failure_code attribute indicates the reason. Here are all possible failure codes:

Payment Failure Codesโ€‹

CodeMessageDescription
confirmed_amount_mismatch"final amount from payment channel does not match original amount charged"Amount mismatch with payment provider
expired_card"card is expired"Card has expired
failed_fraud_check"fraud check failed"Card flagged as fraudulent
failed_processing"processing failed"General payment processing failure
insufficient_balance"insufficient balance"Insufficient funds in account
insufficient_fund"insufficient funds"Card has reached credit limit or insufficient funds
invalid_account"invalid account"Valid account for payment method not found
invalid_account_number"invalid account number"Account number is invalid
invalid_security_code"invalid security code"CVV/CVC code is incorrect
payment_cancelled"payment cancelled"Payment cancelled by payer
payment_rejected"payment rejected"Payment rejected by issuer
stolen_or_lost_card"stolen or lost card"Card reported stolen or lost
timeout"timeout"Payment provider did not respond in time

Operation Failure Codesโ€‹

CodeMessageDescription
failed_capture"capture failed"Charge capture unsuccessful
failed_void"void failed"Charge void operation unsuccessful
failed_reverse"reverse failed"Charge reversal unsuccessful
failed_refund"refund failed"Refund processing error
expired_charge"charge expired"Authorization window exceeded

3D Secure Failure Codesโ€‹

CodeMessageDescription
3ds_authentication_failed"3D Secure authentication failed"Customer failed 3D Secure verification
3ds_rejected"3D Secure rejected"3D Secure rejected by issuer

Charge Status Valuesโ€‹

StatusDescription
successfulPayment completed successfully
pendingAwaiting customer action (e.g., scan QR code, complete 3DS)
failedPayment failed (check failure_code for reason)
reversedUncaptured charge reversed
expiredCharge expired before completion
  • Tokens - Tokenize payment methods before creating charges
  • Sources - Alternative payment methods
  • Customers - Save payment methods for recurring charges
  • Refunds - Refund charged amounts
  • Error Handling - Complete API error reference