This section provides a comprehensive overview of the Charges API, including its core functionality, supported use cases, and integration details. It also offers examples of how to structure both requests and responses when interacting with the API.
I. Charge Mode:
E-com payments Allowing customers to make payments either directly (via API integration) or indirectly (through an e-com payment page.
To specify the payment method, the Charge Mode parameter is used:
1- For direct payments, set Charge Mode to DIRECT
for the direct payment the paymentMethod is required
For indirect payments, set Charge Mode to INDIRECT
for the indirect payment the customer will redirect to e-com payment pages with ecom payment method
II. Charge Token:
After initiating a charge, the customer will receive a charge token as part of the response or as a URL parameter (in the case of indirect payments). This token is required to retrieve the charge details, such as the payment status, amount, and other relevant information.
III. Status:
merchant will receive charge status on each url:
For merchant success urlstatus:
CAPTURED
For merchant error url status:
TIMED_OUT or HOST_TIMEOUT : The gateway has timed out the request to the acquirer because it did not receive a response
NOT_CAPTURED , DECLINED or FAILURE : The transaction was declined or rejected by the gateway, acquirer or issuer
UNKNOWN : The result of the transaction is unknown
CANCELED : Transaction cancelled by payer