Invincible Pay
Payment links

Introduction

What is Payment Links API?

The Payment Links API creates a hosted InvinciblePay page for one customer, which you can share with them by email, SMS, invoice, QR code or any other channel.

To send a buyer straight to Interac from your own checkout, with no page in between, use the Checkout API.

Changes from the Previous Version

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

  • Existing payment links are gone. Payment links made with the previous version no longer open, can no longer be retrieved, and no webhooks are sent for them.
  • Removed request fields: payerName and description. They are ignored if sent, without an error.
  • New required fields: customerName, customerEmail and externalId. A request without them is refused with 400 Bad Request.
  • expiresIn is now required. It used to default to 3600 seconds (1 hour) when left out.
  • New optional fields: redirectUrlSuccess and redirectUrlFailure.
  • Statuses: completed is now paid. awaiting_payment, canceled and failed are new. See Payment Link Statuses.
  • New endpoint: DELETE /v1/payment-links/{payment_link_id} cancels a pending payment link.
  • New webhooks: paymentLinkCanceled and paymentLinkFailed.

Customer Experience

The customer opens the link and sees who they are paying, the amount and the time left. They confirm they are the right person by typing their email, and proceed to Interac to pay from their own bank. After 5 wrong emails the payment link closes.

Once they proceed, they have 48 hours to pay, whatever the payment link's own expiry. If Interac hasn't told us how the payment ended by then, the payment link stays awaiting_payment for up to 24 more hours, because a payment made just before the end may still be on its way. Then it expires.

A payment can still arrive after a payment link expired. It is credited to your wallet, the payment link becomes paid, and you get paymentLinkCompleted after the paymentLinkExpired you already had. Your webhook handling must accept a completed after an expired and treat the invoice as paid.

Payment Link Flow

  1. You create an invoice or order in your own system.

  2. Your backend creates a payment link using POST /v1/payment-links. The amount must be between $5.00 and $25,000.00, with at most 2 decimal places, and more than the Payment Link 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": "INV10045",
      "expiresIn": 3600,
      "redirectUrlSuccess": "https://example.com/INV10045/paid",
      "redirectUrlFailure": "https://example.com/INV10045/failed"
    }
  3. InvinciblePay returns the link in paymentUrl, such as https://app.invinciblepay.com/p/a9df14d1-a602-4879-ad61-2966b7a4e0c1.

  4. Send the link to your customer.

  5. The customer confirms their email and proceeds to Interac. The payment link becomes awaiting_payment.

  6. The customer pays, and InvinciblePay credits your wallet, less the Payment Link fee. The payment link becomes paid.

  7. InvinciblePay sends a paymentLinkCompleted webhook and returns the customer to your redirectUrlSuccess.

  8. Your backend retrieves the payment link, confirms status == paid, and marks the invoice as paid.

External ID

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

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

Payment Link Statuses

StatusMeaning
pendingWaiting for the customer to open it and proceed, before it expires.
awaiting_paymentThe customer proceeded and has 48 hours to pay at Interac, plus up to 24 hours while we wait to hear how it ended.
paidThe funds were received and credited to your wallet.
expiredNot proceeded with before it expired, or not paid within the 48 hours. A payment that still arrives later makes it paid.
canceledCanceled by you while it was pending.
failedA wrong email was entered 5 times, or the Interac request could not be made.

Expired and canceled payment links are deleted 6 months after they were created.

Webhooks

Webhooks are the recommended way to follow a payment link, with GET /v1/payment-links/{payment_link_id} as a fallback. Register your URL using POST /v1/webhook-urls, then you'll receive paymentLinkCompleted, paymentLinkExpired, paymentLinkCanceled and paymentLinkFailed.

On this page