Use payment link to pay
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 credit and generate a single-use payment link. The customer follows the link and enters their bank details where they wish funds to be deposited to.
This flow is ideal for one-time payments, invoices, or situations where you don’t want to manage payouts directly.
Prerequisites
- Your company bank account ID where funds will be deposited
- An existing Jetpay Contact IDContact
Flow overview
sequenceDiagram
actor Customer
participant Platform Backend
participant Jetpay
Platform Backend->>Jetpay: PUT /credit (amount, contact_id, statement, note)
Jetpay-->>Platform Backend: credit_transaction_id + payment_link_url
Platform Backend->>Customer: Send payment link URL
Customer->>Jetpay: Open payment link and enter bank details
Jetpay-->>Platform Backend: Webhook: credit 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 credit and generate payment link
Endpoint: PUT /credit
Use your contact ID (contact_id) and your merchant bank account ID (from_bank_account) to create a credit transaction.
BASE_URL="https://extapi.demo.jetpay.baselinepayments.com"
API_TOKEN="<YOUR_API_TOKEN>"
curl -X PUT "$BASE_URL/credit" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"statement": "Test Statement",
"note": "Test Note",
"from_bank_account": "platform_bank_abc",
"contact_id": "contact_123"
}'Handle the response
If the credit is successfully created, a response will be returned with an HTTP status code of 200 and the following response body:
{
"identifier": "credit_123",
"link": "http://example.com",
"amount": 10000
}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 credit transaction. The flow consists of them answering the security question, entering their payment details (bank account information), and accepting the payment.
The security question and answer is created when you onboard your company with Jetpay. It can be updated in the Jetpay dashboard, under Settings > Security.
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.