At the center of the API is the Payment entity. A payment represents a financial transfer order and includes key details such as the amount and currency. It is composed of the following sub-entities:
Payment Method – The type and details of the method used to complete the payment (e.g., credit card, digital wallet).
Billing – The billing address and contact information associated with the payment method.
Shipping – The delivery address and contact information for where the purchased items will be sent.
Product Items – The individual products or services being purchased, including details such as name, quantity, unit price, and goods type. Providing accurate product information increases the likelihood of payment approval.
Previous Failures – Information about previous failed payment attempts with other providers. Providing this context can help improve approval rates when retrying payments.
A payment moves through several statuses as it is processed. The diagram below shows the full state machine with the possible transitions across states:
Pending – The payment has been created but not yet processed.
Authorized – The consumer’s payment method has been validated and funds have been reserved, but not yet transferred.
Captured – The payment has been successfully processed and funds have been transferred from the consumer to the merchant’s account.
Voided (or Reversed) – A payment is canceled before money movement is complete. Consumer might see a temporary hold, but it will drop off without a debit.
Refunded – A previously captured payment is returned to the consumer.