In order to know the current status of the payment, invoke the Retrieve Payment API call.
A payment flow executes a number of steps in which you invoke all required API requests that are needed to complete the payment.
Regardless of the payment flow you choose to implement Authorize-Capture/ Charge, PaymentsOS requires that you always create a payment object first. The payment object provides a single reference to all the transactions that make up a payment. The payment object will allow you to trace those steps back to the original payment based on the payment id.
Notice that the status object reflects the latest status of the payment, while the related resource object allows you to backtrace each of the transactions.
Payment Status vs Transaction Status
The status field in the payment object is an overall (composite) status that reflects the status of the payment flow or operation as a whole. If you completed a Capture, for instance, then the payment will have a status of 'Captured'.
Each transaction in the payment flow, in contrast, will have its own status indicating whether the transaction is pending, or whether it succeeded or failed.
If a capture creation event returned as Pending, you should wait for an update notification that indicates rather the request succeeded or not.
Whenever the Capture will finally be completed, the Capture transaction status will become Succeed, while the payment status will be changed to 'Captured'.
More information on retrieving the transaction status can be found in PaymentsOS documentation in the following link.
For more information regarding Webhooks please refer to the following article What is a Webhook?