Confirm payments
Confirm Tap to Pay payments on your backend with notifications.
The app can be closed, lose the network or be tampered with. Only your backend can confirm that a Tap to Pay payment went through: subscribe a listener to the Tap to Pay events.
Create the listener directly in your back office on app.paygreen.fr, or with the API (see Listeners).
Tap to Pay has its own eventsA listener on
payment_order.authorizedorpayment_order.successeddoes not receive Tap to Pay payments. Subscribe to thepayment_order.tap_to_pay.*events below.
Payment Order events
| Event | When |
|---|---|
payment_order.tap_to_pay.pending | The Payment Order was created. |
payment_order.tap_to_pay.authorized | The payment is authorized. We recommend you listen to it. |
payment_order.tap_to_pay.successed | The payment is captured. |
payment_order.tap_to_pay.refused | The card was declined. The Payment Order is closed. |
payment_order.tap_to_pay.canceled | The payment was canceled. |
payment_order.tap_to_pay.expired | The Payment Order expired before being paid. |
payment_order.tap_to_pay.error | The payment failed. |
payment_order.tap_to_pay.refunded | The payment was refunded. |
Transaction and operation events
Transactions:
transaction.tap_to_pay.pendingtransaction.tap_to_pay.authorizedtransaction.tap_to_pay.capturedtransaction.tap_to_pay.refusedtransaction.tap_to_pay.canceledtransaction.tap_to_pay.expiredtransaction.tap_to_pay.errortransaction.tap_to_pay.refundedtransaction.tap_to_pay.partly_refunded
Operations:
operation.tap_to_pay.pendingoperation.tap_to_pay.authorizedoperation.tap_to_pay.capturedoperation.tap_to_pay.refusedoperation.tap_to_pay.canceledoperation.tap_to_pay.expiredoperation.tap_to_pay.erroroperation.tap_to_pay.refund
A listener can mix standard and Tap to Pay events, for example payment_order.authorized and payment_order.tap_to_pay.authorized if you also take online payments.
Check the Payment Order
When in doubt, for example after a NETWORK_ERROR during collectPayment(), read the Payment Order from your backend before charging the customer again. Its status tells you whether the payment went through.
See Notifications for the payload, the signature header and retries.
Updated 11 days ago