Use payment link to collect
Use this flow when you want to send a Jetpay-branded payment page to your customer. Instead of collecting payment details directly in your platform, you create a debit and generate a single-use payment link. The customer follows the link, selects their preferred payment method, and authorizes the debit. Jetpay handles the PAD and ensures the transaction is secure.
This flow is ideal for one-time payments, invoices, or situations where you don’t want to manage payment collection directly.
Prerequisites
- Your company bank account ID where funds will be deposited
Flow overview
sequenceDiagram
actor Customer
participant Platform Backend
participant Jetpay
Platform Backend->>Jetpay: PUT /debit (amount, contact_id, statement, note)
Jetpay-->>Platform Backend: debit_transaction_id + payment_link_url
Platform Backend->>Customer: Send payment link URL
Customer->>Jetpay: Open payment link and select payment method
Note right of Jetpay: Jetpay handles payment collection and PAD if EFT
Jetpay-->>Platform Backend: Webhook: debit status update (initiated, completed, etc.)Implementation details
Create a contact
If you are not yet familiar with creating contacts with Jetpay, please review the Create a contact guide.
Create a debit and generate payment link
Use your contact ID (contact_id) and your merchant bank account ID (to_bank_account) to create a debit transaction.
BASE_URL="https://extapi.demo.jetpay.baselinepayments.com"
API_TOKEN="<YOUR_API_TOKEN>"
curl -X PUT "$BASE_URL/debit" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"statement": "Test Statement",
"note": "Test Note",
"to_bank_account": "platform_bank_abc",
"contact_id": "contact_123"
}'Handle the response
If the debit is successfully created, a response will be returned with an HTTP status code of 200 and the following response body:
{
"identifier": "debit_123",
"link": "https://example.com",
"amount": 10000,
"customer_surcharge_amount": 350
}The returned link is what you will send to your customer. This is a single-use payment URL that your customer will follow to complete the debit transaction. The flow consists of them selecting their payment method (bank or card), agreeing to a PAD agreement (if EFT), and accepting the payment request.
The customer_surcharge_amount information is only applicable if the debit is paid via credit card. If you are simply sending the payment link to your customers to collect payment details (and not using the collect payment method at checkout flow), then you do not need to do anything with this value.
Track status updates via events/webhooks
As the transaction moves through its lifecycle, an Event is created for each state update. The most efficient way to track these updates in your system is to register for webhooks. If you are not yet familiar with our webhooks system, please review the Events and webhooks guide.