Handling Pending statuses
The Pending status group indicates transactions that are in progress. We recommend handling these statuses in one of the following ways:
Handling payment result notifications
If a transaction is assigned one of the Pending group statuses, Payture sends the Merchant a notification depending on the payment scenario:
- EngineBlockPending , EngineChargePending , EngineRefundPending , EngineUnblockPending , CustomerRefundPending .
Then, once the final status is received, Payture sends the Merchant a notification with the payment result:
- EnginePaySuccess , EngineBlockSuccess , EngineChargeSuccess , EngineRefundSuccess , EngineUnblockSuccess , CustomerRefundSuccess — on success;
- EnginePayFail , EngineBlockFail , EngineChargeFail , EngineRefundFail , EngineUnblockFail , CustomerRefundFail — if the payment fails or the payment time limit (72 hours) expires;
Using status requests
If the Merchant uses the GetState status request to get the payment result, we recommend the following scheme:
- The Merchant starts requesting the status 15 seconds after redirecting the user to the payment page:
- every 3 seconds during the first 30 seconds;
- every 5 seconds during the next 120 seconds;
- at longer intervals after that.
Sample
GetStateresponse:
<GetState
Success="True"
OrderId="1234567890"
Forwarded="False"
State="PendingRefund"
Amount="1000"
MerchantContract="MerchantPayture"
Status="PendingRefund"
TimeToPendingStatusChange="2024-01-01T00:00:00+03:00"
/>- The status is requested until the Charged or Rejected status is received. In this case, the order can have the following statuses:
- Pending — awaiting payment by the Customer;
- Charged — the payment was successful;
- Rejected — the payment failed or the payment time limit (72 hours) expired.
The GetState method is described in the Payture API, Payture InPay and Payture eWallet sections.
We recommend sending the next status request after the time specified in the TimeToPendingStatusChange parameter (yyyy-mm-ddThh:mm:ss+UTC).
Note: if a final state is not received for api/Charge, api/Refund or api/Unblock requests, Payture will block all subsequent attempts to perform a post-authorization action until the previous attempt is finalized.
Note: if you perform an Unblock/Charge/Refund operation on an order that has a Pending group status, the Payture payment gateway returns the ILLEGAL_ORDER_STATE error.
