Process Flow

This section describes the high-level steps in the PayWeb3 payment process — from the merchant's initial request to PayGate through to the final response and customer redirection.

Payment Flow Steps

Step 1: Merchant Sends Payment Request
The merchant starts the process by submitting a detailed request to PayWeb. This includes transaction information and optional callback URLs.

Step 2: PayWeb Returns a PAY_REQUEST_ID
PayWeb immediately responds with a unique PAY_REQUEST_ID. This ID must be included in the next step.

Step 3: Client is Redirected to PayWeb
The merchant redirects the client to PayWeb and includes the PAY_REQUEST_ID.
PayWeb displays a menu of available payment methods (if applicable) and processes the transaction via the selected provider.

Step 4: PayWeb Sends Response to NOTIFY_URL (Optional)
If the merchant has included a NOTIFY_URL in the original request, PayWeb will post the transaction response to this URL before redirecting the client.

Step 5: Merchant Acknowledges Receipt
The merchant must respond with OK upon receiving the notification post to confirm it was received successfully.

Step 6: Client is Redirected to RETURN_URL
After notifying the merchant (if applicable), PayWeb redirects the client to the RETURN_URL provided in the original request.

Step 7: Merchant Queries Transaction (Optional)
Merchants can query PayWeb by submitting the PAY_REQUEST_ID to retrieve detailed transaction data.

Step 8: PayWeb Returns Full Transaction Response
PayWeb replies to the merchant’s query with all available response details.

Step 9: Asynchronous Payment Completion (If Applicable)
Some payment methods (e.g., bank transfer or delayed payment options) may require time to complete.
Once PayWeb receives confirmation from the provider, it will post the final transaction status to the NOTIFY_URL.


📘

To ensure proper notification handling, merchants must respond with ok to the PayWeb POST to the NOTIFY_URL.


Payment Flow Overview

The diagram below illustrates how a payment is processed using PayWeb3 — from the initial request to PayGate, through customer interaction, to final transaction confirmation. It covers both synchronous and asynchronous flows, including optional notification and query steps.

sequenceDiagram
  participant Merchant
  participant Client
  participant PayWeb
  participant PaymentProvider

  Merchant->>PayWeb: Submit payment request
  PayWeb-->>Merchant: Return PAY_REQUEST_ID
  Merchant->>Client: Redirect to PayWeb with PAY_REQUEST_ID
  Client->>PayWeb: Access payment page

  alt Multiple payment methods available
    PayWeb->>Client: Display payment menu
    Client->>PayWeb: Select payment method
  end

  PayWeb->>PaymentProvider: Initiate transaction

  opt NOTIFY_URL provided
    PayWeb->>Merchant: POST transaction response
    Merchant-->>PayWeb: OK
  end

  PayWeb->>Client: Redirect to RETURN_URL
  Client->>Merchant: Access return page

  opt Merchant queries transaction
    Merchant->>PayWeb: Query PAY_REQUEST_ID
    PayWeb-->>Merchant: Return transaction details
  end

  opt Asynchronous completion
    PaymentProvider->>PayWeb: Notify payment completed
    PayWeb->>Merchant: POST final transaction result
    Merchant-->>PayWeb: OK
  end