Jetpay Developer Guide
Receive payments
Use payment link to collect
8 min
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 docid zgmim7qkrraox9jjaqrl your docid\ aex0ssfndr xgalxg2 zf 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 docid\ bzwf0wyooqbkgsfugenh0 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" }'import requests base url = "https //extapi demo jetpay baselinepayments com" api token = "\<your api token>" headers = { "authorization" f"bearer {api token}", "content type" "application/json" } payload = { "amount" 10000, "statement" "test statement", "note" "test note", "to bank account" "platform bank abc", "contact id" "contact 123" } response = requests put(f"{base url}/debit", headers=headers, json=payload) debit = response json() print(debit)const base url = "https //extapi demo jetpay baselinepayments com"; const api token = "\<your api token>"; const headers = { "authorization" `bearer ${api token}`, "content type" "application/json" }; const payload = { amount 10000, statement "test statement", note "test note", to bank account "platform bank abc", contact id "contact 123" }; async function createdebit() { const res = await fetch(`${base url}/debit`, { method "put", headers, body json stringify(payload) }); const debit = await res json(); console log(debit); 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 docid\ lnp1zgf7ybpwuvs3g5urf 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 docid 79a4cgvetacholkpjyd5c guide