Invincible Pay
Checkout

Introduction

What is Checkout API?

The Checkout API takes your buyer straight to Interac. You send us the buyer and the amount, and we return a direct INTERAC link for that exact payment, with no InvinciblePay page in between.

For a hosted page that you can share with a customer by email, SMS or invoice, use Payment Links.

Changes from the Previous Version

This version of the Checkout API is not backward compatible. If you integrated with Checkout before, update your integration as below.

  • No hosted page. paymentUrl is now the Interac link itself, not an InvinciblePay /c/... page. Old /c/... links no longer open.
  • Existing checkouts are now payment links. Checkouts made with the previous version that were paid or still in progress keep their ID and are found with GET /v1/payment-links/{payment_link_id}, not GET /v1/checkout. Their webhooks are now paymentLink... events. All other old checkouts were deleted.
  • Removed request fields: expiresIn, redirectUrlSuccess and redirectUrlFailure. They are ignored if sent, without an error. Every checkout now lasts 48 hours, and there is no redirect.
  • Stricter externalId: at most 200 characters instead of 255, and only the characters listed under Repeating a Call. Hyphens are refused.
  • Removed statuses: awaiting_payment and canceled.
  • No cancellation: DELETE /v1/checkout/{checkout_id} and the checkoutCanceled webhook are removed.

customerName, customerEmail and externalId stay required, as before. If you need a hosted page with its own expiry and redirects, use Payment Links.

Checkout Flow

  1. The buyer clicks Checkout on your website.

  2. Your backend creates a checkout using POST /v1/checkout, with the buyer's name and email, the amount and your order ID. The amount must be between $5.00 and $25,000.00, with at most 2 decimal places, and more than the Checkout fee charged on it. externalId is at most 200 characters. A request that breaks these rules is refused with 400 Bad Request. Example body:

    {
      "fundingSourceId": "fs_123",
      "amount": "100.00",
      "currency": "CAD",
      "customerName": "Jane Buyer",
      "customerEmail": "[email protected]",
      "externalId": "ORD10045"
    }
  3. InvinciblePay makes the Interac request at once and returns its link in paymentUrl:

    {
      "id": "5d21937d-dd60-46e3-b096-36e30e69b303",
      "status": "pending",
      "externalId": "ORD10045",
      "paymentUrl": "https://...",
      "expiresAt": 1793981133868
    }
  4. Send the buyer to paymentUrl.

  5. The buyer pays the exact amount from their own bank.

  6. InvinciblePay receives the payment and credits your wallet, less the Checkout fee. The checkout becomes paid.

  7. InvinciblePay sends a checkoutCompleted webhook with the checkout's ID, your order ID and its status.

  8. Your backend marks the order as paid.

Checkout Statuses

StatusMeaning
pendingThe link is live. The buyer has until expiresAt to pay it. If Interac hasn't told us how it ended by then, the checkout stays pending for up to 24 more hours.
paidThe funds were received and credited to your wallet.
expiredNot paid within the 48 hours, or the buyer declined. A payment that still arrives later makes it paid.
failedThe Interac request could not be made, or no Interac link came within 10 minutes. failureReason says why. You can try again with the same externalId.

Good to Know

  • The link is valid for 48 hours. Once Interac tells us the link has ended, the checkout expires and you get a checkoutExpired webhook.
  • If Interac tells us nothing, we wait 24 more hours. A payment made just before the link ended may still be on its way, so the checkout stays pending until 24 hours after expiresAt, and then expires.
  • A payment can still arrive after a checkout expired. It is credited to your wallet, the checkout becomes paid, and you get checkoutCompleted after the checkoutExpired you already had. Your webhook handling must accept a completed after an expired and treat the order as paid.
  • A buyer may decline. If Interac tells us, the checkout expires right away and you get checkoutExpired, possibly well before the 48 hours. If not, it stays pending until the link ends.
  • Expired checkouts are deleted 6 months after they were created. Paid checkouts are kept.
  • A checkout can't be canceled. It ends by being paid or by expiring.

Repeating a Call

externalId makes creating a checkout safe to repeat:

  • The same externalId and details while the link is live return that same checkout and link.
  • The same externalId with other details, or on a paid checkout, is refused with 409 Conflict.
  • An expired or failed checkout frees its externalId, so the buyer can try again. While a checkout waits the extra 24 hours after expiresAt, it is still pending and holds its externalId, so a new checkout for that order is refused with 409 Conflict until it expires.

externalId is required and is checked when you create a checkout. If it breaks either rule below, the call is refused with 400 Bad Request and no checkout is created:

  • At most 200 characters.
  • Only letters, digits, spaces and . # , $ @ '. Anything else, including a hyphen, is refused, so use ORD10045 rather than ORD-10045.

externalId also appears in the buyer's Interac message. That message is limited to 200 characters in total, so a long ID may be cut off in it.

Rarely, paymentUrl is null on a new checkout because the Interac reference isn't ready yet. Repeat the same call shortly to get the link. If there is still no link 10 minutes after the checkout was created, it fails: you get a checkoutFailed webhook with its failureReason, and its externalId is free to try again.

Webhooks

Webhooks are the recommended way to follow a checkout, with GET /v1/checkout/{checkout_id} as a fallback. Register your URL using POST /v1/webhook-urls. You'll get:

You can also follow your checkouts on the Checkouts page of your InvinciblePay account.

On this page