Confirm payments

Confirm Tap to Pay payments on your backend with notifications.

The app can be closed, lose the network or be tampered with. For backend integrations, subscribe to Tap to Pay events and use the captured order status to confirm payment.

Create the listener directly in your back office on app.paygreen.fr, or with the API (see Listeners).

🚧

Tap to Pay has its own events

A listener on payment_order.authorized or payment_order.successed does not receive Tap to Pay payments. Subscribe to the payment_order.tap_to_pay.* events below.


Payment Order events

EventWhen
payment_order.tap_to_pay.pendingThe Payment Order was created.
payment_order.tap_to_pay.authorizedThe payment is authorized and still awaits capture.
payment_order.tap_to_pay.successedThe payment is captured. Use this event to confirm a successful payment.
payment_order.tap_to_pay.refusedThe card was declined. The Payment Order is closed.
payment_order.tap_to_pay.canceledThe payment was canceled.
payment_order.tap_to_pay.expiredThe Payment Order expired before being paid.
payment_order.tap_to_pay.errorThe payment failed.
payment_order.tap_to_pay.refundedThe payment was refunded.
Transaction and operation events

Transactions:

  • transaction.tap_to_pay.pending
  • transaction.tap_to_pay.authorized
  • transaction.tap_to_pay.captured
  • transaction.tap_to_pay.refused
  • transaction.tap_to_pay.canceled
  • transaction.tap_to_pay.expired
  • transaction.tap_to_pay.error
  • transaction.tap_to_pay.refunded
  • transaction.tap_to_pay.partly_refunded

Operations:

  • operation.tap_to_pay.pending
  • operation.tap_to_pay.authorized
  • operation.tap_to_pay.captured
  • operation.tap_to_pay.refused
  • operation.tap_to_pay.canceled
  • operation.tap_to_pay.expired
  • operation.tap_to_pay.error
  • operation.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 collectPayment() reports PAYMENT_RESULT_UNKNOWN, keep the purchase pending and query the same order on your backend or from the app.

const { id, status } = await LemonwayTerminal.getPaymentOrder({ id: orderId, objectSecret });

The SDK sends the configured public key and the order’s object_secret. Keep the order secret in secure storage and out of logs. The returned status omits the payment_order. prefix.

StatusWhat to do
successedComplete the purchase.
refused, canceled, expiredThe order is closed. Use a new order if the customer tries again.
pending, authorized, or any other statusKeep the existing purchase unresolved and check again.

The order status comes from the API and reflects updates as they arrive. Poll with a bounded delay. If reads fail or the status stays unresolved, keep the order and reconcile it before any new charge.

See Notifications for the event payload, signature header and retries.


Did this page help you?