For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Welcome
    • Getting Started
    • Business Hub
    • Afterpay Migration
  • Platforms
    • Platforms Quickstart
    • Adobe Commerce (Magento)
    • Adyen
    • BigCommerce
    • Ecwid
    • PrestaShop
    • Salesforce Commerce Cloud
    • Shopify
    • Stripe
    • Wix
    • WooCommerce
  • Afterpay Messaging
    • Getting Started
    • Placement
    • Implementation
    • Migration
    • Older Messaging Information and Links
    • Launch Afterpay Info Modal Anywhere
  • API Development
    • API Quickstart
      • Create a Checkout
      • Immediate Capture
      • Deferred Capture
      • Create a Refund
    • Test Environments
    • Certification
    • Disputes
    • Webhook Signature Generation
  • SDK
    • SDK Migration Guide
    • iOS SDK
    • Android SDK
    • React Native SDK
  • Marketing
    • Shop Directory
    • Brand Assets
LogoLogo
On this page
  • Implement immediate capture
  • Considerations
API DevelopmentAPI Quickstart

Immediate capture

Was this page helpful?
Previous

Deferred Capture

Next
Built with

Immediate capture provides a simplified and efficient payment process. It’s ideal for merchants who want to finalize and settle payments immediately upon order confirmation, or who want to minimize complexity. It combines the following actions into a single API call:

  • Completing payment approval.
  • Starting the customer’s payment plan.
  • Settling the full order value into the merchant’s bank account.
ActionEndpointPurpose
Capture Full Payment/v2/payments/captureCapture order payment and confirm the order.

Implement immediate capture

  1. Create a checkout. If the customer confirms their order with Afterpay, they’re returned to your website with an order token and the SUCCESS status.
  2. Use the order token to call the Capture Full Payment endpoint. Once the capture completes, you’ll receive a Payment object with a status of APPROVED or DECLINED.
    • If Afterpay approves the payment, present the customer with an order confirmation page. The full payment is captured.
    • If Afterpay declines the payment (for example, if the customer’s credit card details are incorrect), present the customer with suggested corrections or alternative payment methods at checkout.

Considerations

  • Immediate capture is supported by all platforms.
  • You must call the Capture Full Payment endpoint within 180 minutes of receiving the token from the Create Checkout call.
  • The Capture Full Payment call is idempotent. It’s safe to retry requests within 24 hours using the same unique requestId.
  • Express checkout requires additional data. See Express Checkout Integration to learn more.