Payments are wrappers around blockchain transactions, which enable your app, the Pi blockchain, and the Pi Servers to be all synchronized when the Pioneer submits a blockchain transaction to pay for something in your app.
They abstract away the technicalities involved when interacting with the Pi blockchain and enable you, the developer of the app, to have full confidence that the Pioneer has actually made the transaction.
After a payment is created, it goes through 3 major phases:
The diagram below outlines the steps involved in a Pioneer to App payment.

Phase I - Payment creation and Server-Side Approval
createPayment: Your app’s frontend creates the payment. The Payment Flow UI opens, but cannot be interacted with until the payment is approved by your server.
Steps 4a and 4b on the Pi Payment Flow Diagram.
At this stage, the payment dialog becomes interactive and enables the Pioneer to (4a) confirm the transaction, sign it, and submit it to the Pi blockchain and (4b) the blockchain completes the transaction and returns the transaction information to the Pi App Platform.
You do not have anything to do at this stage; everything is handled by the Pi Apps Platform and the Pi Wallet.
After the blockchain transaction is submitted, the payment flow will not close. You need to acknowledge the payment through Server-Side completion before your app is visible to the Pioneer again (as explained in Phase III below).
Server-Side Completion: Your app’s server acknowledges the payment with the Pi Servers through the /complete API endpoint. This enables you to check whether the blockchain transaction has actually happened, and to let the Pi Server know that you’re aware of it.
##App Payment Security
Do not complete any payment within your app until the payment has completed and had a paymentDTO returned from the /complete API endpoint of the Server-Side Completion. A malicious user can run a hacked version of the SDK to pretend they have made a payment without making the actual payment. Therefore, if the API call to /payment/{ transaction_id }/complete returns a non-200 error code, do not mark the payment complete or paid with your app.