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:
payerNameanddescription. They are ignored if sent, without an error. - New required fields:
customerName,customerEmailandexternalId. A request without them is refused with400 Bad Request. expiresInis now required. It used to default to 3600 seconds (1 hour) when left out.- New optional fields:
redirectUrlSuccessandredirectUrlFailure. - Statuses:
completedis nowpaid.awaiting_payment,canceledandfailedare new. See Payment Link Statuses. - New endpoint: DELETE /v1/payment-links/{payment_link_id} cancels a pending payment link.
- New webhooks:
paymentLinkCanceledandpaymentLinkFailed.
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
-
You create an invoice or order in your own system.
-
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.
externalIdis at most 200 characters. A request that breaks these rules is refused with400 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" } -
InvinciblePay returns the link in
paymentUrl, such ashttps://app.invinciblepay.com/p/a9df14d1-a602-4879-ad61-2966b7a4e0c1. -
Send the link to your customer.
-
The customer confirms their email and proceeds to Interac. The payment link becomes
awaiting_payment. -
The customer pays, and InvinciblePay credits your wallet, less the Payment Link fee. The payment link becomes
paid. -
InvinciblePay sends a
paymentLinkCompletedwebhook and returns the customer to yourredirectUrlSuccess. -
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 useINV10045rather thanINV-10045.
Payment Link Statuses
| Status | Meaning |
|---|---|
pending | Waiting for the customer to open it and proceed, before it expires. |
awaiting_payment | The customer proceeded and has 48 hours to pay at Interac, plus up to 24 hours while we wait to hear how it ended. |
paid | The funds were received and credited to your wallet. |
expired | Not proceeded with before it expired, or not paid within the 48 hours. A payment that still arrives later makes it paid. |
canceled | Canceled by you while it was pending. |
failed | A 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.