Payment API Flow

This payment API flow illustrates the payment process using the bank transfer method through a Payment Service Provider (PSP) and Lexupay. The process includes two main options: using webhooks and using polling.

Payment Flow Diagram

Below is an illustrative diagram of the payment flow:

Detailed Payment Flow Explanation

Steps

  1. Customer Checkout
    1. The customer selects the bank transfer payment method during checkout.
    2. The customer sends a checkout request to the PSP.
  2. PSP Creates Payment
    1. The PSP sends a request to create a payment to Lexupay.
  3. Lexupay Returns Payment ID
    1. Lexupay returns the payment ID to the PSP.

Payment Option with Webhook

Steps:

  1. The customer selects the bank transfer payment method and sends a request to the PSP.
  2. The PSP sends a request to create a payment to Lexupay.
  3. Lexupay returns the payment ID to the PSP.
  4. Lexupay sends a webhook event to the PSP with bank transfer instructions.
  5. The PSP displays bank transfer instructions to the customer.
  6. The customer completes the bank transfer.
  7. Lexupay verifies the bank transfer.
  8. Lexupay sends a webhook event to the PSP with the successful payment status.
  9. The PSP informs the customer that the checkout is complete.

Payment Option with Polling

Steps:

  1. The customer selects the bank transfer payment method and sends a request to the PSP.
  2. The PSP sends a request to create a payment to Lexupay.
  3. Lexupay returns the payment ID to the PSP.
  4. The PSP polls Lexupay to retrieve bank transfer instructions.
  5. Lexupay returns bank transfer instructions to the PSP.
  6. The PSP displays bank transfer instructions to the customer.
  7. The customer completes the bank transfer.
  8. Lexupay verifies the bank transfer.
  9. The PSP polls Lexupay to retrieve the payment status.
  10. Lexupay returns the successful payment status to the PSP.
  11. The PSP informs the customer that the checkout is complete.

Notes

  • Webhook: A method where Lexupay sends direct notifications to the PSP when there is a change in the payment status.
  • Polling: A method where the PSP periodically checks with Lexupay to get the latest payment status.