Skip to content

NextAction

What the customer must do before the payment can finish.

  • redirect_to_url: a mobile payment confirmed with redirect: "if_required" needs the customer to go elsewhere to finish it.
  • enter_otp: O’mari has sent the customer an SMS code. The element now asks for it; call confirmMobilePayment() again with the same element.
  • scan_code: the customer pays in the InnBucks or PayGo app, by scanning qrImageUrl or typing code. After confirmScanPayment() the scan element shows both. retrieveTransaction() returns it too while the payment is unfinished, so a reloaded page can show the same code.
  • card_checkout: the customer pays in the provider’s hosted card form. startCardCheckout() returns this once only, so keep it for a reload.
export type NextAction = {
type: "redirect_to_url";
redirectToUrl: {
url: string;
};
} | {
type: "enter_otp";
} | {
type: "scan_code";
scanCode: ScanCode;
} | {
type: "card_checkout";
cardCheckout: CardCheckout;
};