State of the payment
The payment status functionality allows the point of sale to determine whether the payment was successfully paid or not.
It’s necessary to authorize the status with a token. You’ll need to settle the token for the status in
scope=payment-all. For further information about getting the access token, see the How Do I Integrate the Payment Gateway? article.
When is appropriate time to make the payment status request?
We recommend to make payment status request in two cases.
The first case is return to the point of sale (
return_url) after payment‘ s made. There is a GET parameter
return_url that contain
id of the payment from which the customer is being redirecting.
You need to find id of order in your database that is connected to the
id of payment and make payment status request. When a result is returned you will save the current status of the payment to the order in your database and show appropriate message to the customer.
The second case is after receive of http notification about payment status change. Anytime the payment status has change (except
PAYMENT_METHOD_CHOSEN statuses) we will send you asynchronous http notification about payment status change to your
notification_url sent via payment create request. The HTTP notification contains also GET parameter
?id=. You need to make a payment status request with use of payment
id value and the current status of payment update in your database.
The point of sale should receive HTTP notification with
http200status. If another different response is returned back to payment gateway the HTTP notification is marked as not delivered and the payment gateway system try to send HTTP notification again (with maximum of 20 attemps).
The payment status request can be done at any time but it is sufficient to make payment status request after redirect to
return_url and after every receive of the HTTP notification (