Configuring Payment
This feature in Carts API allows users to add, update, and delete payment details. The cart maintains the state of each payment—pending, authorized, captured, and failed—as provided by the user, but it doesn’t store tokens, which are expected from the System Integrator (SI).
Prerequisites
The following prerequisites must be completed sequentially to configure a payment.
- Create a cart.
- Add an item to the cart.
Payments Initialization
The cart displays authorized amounts and allows updates or removals of payments. Payments can be purged or held when the cart changes such as, price changes. The cart also verifies the authorized payment amount against the cart total.
The following code sample provides an example of the structure of payment information and status in the response:
As the cart can contain multiple payments, they are shown as a collection. The authorized amount is the sum of all payments with the AUTHORIZED state added to the cart as in the following example:
Examples
Adding payments with the CAPTURED
status to the cart
Use the create a payment endpoint to add a CAPTURED
payment method to the cart as in the following example:
Adding payments with the AUTHORIZED
status to the cart
Use the create a payment endpoint to add AUHTORIZED
payments to the cart as in the following example:
Was this page helpful?