General Payment Flow

Overview

The general flow for issuing an order and charging your customer:

  1. To issue an order, send a POST request to /orders/. Details such as items sold, their price, and currency used are sent over this request. Note the success_redirect, in_progress_redirect, and failure_redirect fields in the response. These fields specify where to redirect the customer in case of the order success, progress, or failure. Invalid request data will result in a code 400 error;

    Minimal request example data to issue an order:

    {
        "client": {
            "email": "test@test.com"
        },
        "products": [
            {
            "price": 0.3,
            "title": "test"
            }
        ]
    }
    

    You can choose one of the following types of response to your request:

    • Minimum (default value): includes general order information (type, ID, currency, amount, status, etc.), transaction details, links to check-out forms, api_do_url;
    • Standard: additionally includes information about order products, client details, recurring card details, brand and website details, URL for success or failed/cancelled status, address verification service details, refund details;
    • Full: see the list of fields for the full response type in the "Model" tab for POST endpoint to /orders/.

    The number of fields in the response depends on the selected response type. To select the type of response, you must specify the query parameter (?response_type=minimum, ?response_type=standard, or ?response_type=full) when creating a request. The minimum response type will be set by default if you do not specify this parameter in the request.

  2. In order to process the payment, choose one of the integration options. The customer is then redirected back to the URL specified in success_redirect, in_progress_redirect, or failure_redirect fields appropriately.

  3. Your system receives either an order.payment_success or order.payment_failure event through webhooks. You must wait for the webhook as that is the only wait to receive the correct payment status.


Order Status

Order status flow diagram
StatusDescriptions
PaidThe order has been successfully paid for
FailedThe payment attempt for an order has failed. Failed is not a final status and additional payment attempts can be performed
IssuedThe order has been issued
In progressThe payment attempt for an order is in progress
ViewedThe customer has viewed the payform
HoldThe customer's funds have been successfully blocked on their account. The merchant needs to capture or void this order. Will be automatically cancelled after 28 days if no action is taken
OverdueThe order's due date has been reached (if set), new overdue payment attempts are still allowed
ExpiredThe order's due date has been reached (if set), any overdue payment attempts will be declined.
CancelledThe order has been cancelled. This is a final status and all new payment attempts will be declined. This status is assigned if (1) a merchant has requested cancelation of the order; (2) a merchant has voided the previous hold of funds; (3) a merchant uses max_payment_attempts parameter and the customer has exceeded the allowed payment attempt tries unsuccessfully
RejectedA customer rejected to pay on the payform. This is a final status and all new payment attempts will be declined
RecievedThe order has been paid outside the gateway and the merchant has marked it as "Received"
RefundedThe payment for order has been refunded
ReversedThe payment for order has been reversed
Refund initiatedA refund has been initiated
Refund failedA refund has been failed to process
Refund reversedA refund manual cancellation has been made through the processing center
Reversal initiatedA reversal has been initiated
Reversal failedA reversal has been failed to process
ChargebackA chargeback for the payment has been received (dispute related)
RepresentationA representation for the payment has been received (dispute related)
RetrievalA retrieval for the payment has been received (dispute related)
Pre-arbitrationA pre-arbitration for the payment has been received (dispute related)
ArbitrationAn arbitration for the payment has been received (dispute related)
Pre-complianceA pre-compliance for the payment has been received (dispute related)
ComplianceA compliance for the payment has been received (dispute related)
Good faithGood faith for the payment has been received (dispute related)
Fraud adviceA fraud advice for the payment has been received (dispute related)
CreatedAn order for payout has been created
TestA test order

Optimizing Status Checks

  • Webhooks: Your system will receive a webhook notification immediately when the payment status changes. We strongly recommend waiting for the webhook to receive the correct payment status;
  • Polling: If you must poll for status updates, please follow our API Best Practices to avoid rate limiting. Do not poll immediately; start with a 5-10 second delay and use increasing intervals.