Redirect buyer for payment approval

DocsLimited

Last updated: Oct 6th, 8:12am

  1. After you create the order, extract the payer-action link from the links array in the Create order response.
  2. Set your Afterpay payment button to open this URL when clicked. This sends the buyer to Afterpay's hosted payment page.
  3. The buyer logs into their Afterpay account and reviews the payment schedule (Pay-in-4 instalments or monthly payments).
    • If the buyer approves the payment:
      1. Upon approval, PayPal automatically captures the full payment amount immediately.
      2. The buyer is redirected to your return_url.
      3. The CHECKOUT.ORDER.COMPLETED webhook is triggered, confirming both approval and capture in a single event.
    • If the buyer cancels or an error occurs:
      1. The buyer is redirected to your cancel_url.
      2. Order status remains PAYER_ACTION_REQUIRED.