Jetpay Developer Guide
Using the API
Collecting a payment
9 min
creating a payment request a payment request must have been created first before a payment collection flow can start see creating a debit transaction docid\ hueqe96w0fsvjq2ddm0fw for more details how to create a payment request fulfilling the payment request after a payment request has been created, there are multiple possible payment flows https //docs jetpay baselinepayments com/collecting a payment#epl j and multiple possible payment methods https //docs jetpay baselinepayments com/collecting a payment#rq78s that can be used for fulfilling the payment supported payment methods two payment methods are currently supported with jetpay eft (electronic funds transfer) with this approach, the funds are tranferred directly from the payer's bank account to your company bank account credit card with this approach, the funds are retrieved from the payer's credit card and then paid out to your company bank account see our payment methods docid 4feq0dsckyjip aihipg7 section for more details about the payment methods jetpay supports and how they will be presented to your customers when they proceed to payment supported payment flows three payment flows are supported by the jetpay api jetpay branded landing page https //docs jetpay baselinepayments com/collecting a payment#soxvu ; white labelled payment form https //docs jetpay baselinepayments com/collecting a payment#zdkdp ; api facilitated eft payment https //docs jetpay baselinepayments com/collecting a payment#22fg1 each payment flow, along with the approach to integrating it into your solution, is detailed below jetpay branded landing page supported payment methods eft credit cards how it works after calling the create debit transaction endpoint , a link is returned to you in the api call response you can then use that link to redirect the contact to a jetpay branded page for them to fulfill the payment request you have full control over how to communicate the payment link to the payer, whether it is by including the link into an email, a text message, a facebook chat message or any other communication channel you may have integrated into your solution the link will bring your payer to a jetpay branded landing page from there, the payer will be guided through the payment process, letting them choose the payment method they prefer to use, and then complete the payment white labelled payment form supported payment methods credit cards eft (not supported yet coming soon) how it works after calling the create debit transaction endpoint , the debit transaction id is used with the generate payment form url endpoint to initialize an url your integration should then embed that url within an \<iframe> element, directly incorporated into your web application that \<iframe> element will then contain a white labelled payment form the payer will be able to interact with in order to fulfill the payment request this payment flow is useful if you want to integrate the payment form directly into your own webpage or web application in order to provide a seamless experience and consistency with your brand sequence of operations sequencediagram participant customer as partner's customer participant partner as partner participant api as jetpay api partner >>+api create debit transaction note right of api put /debit (v0) api >> partner r debit transaction created note right of api 201 created partner >>+api generate white labelled payment form url note right of api post /transaction/{debitid}/pay debit/url api >> partner r white labelled payment form url note right of api 200 ok partner >>+partner initialize \<iframe> with url note right of partner \<iframe src="{{whitelabelledpaymentformurl}}>\</iframe> partner >>customer display payment page customer >>partner complete payment via \<iframe> partner >>+api process payment (through \<iframe>) api >> partner r payment complete api facilitated eft payment supported payment methods eft how it works after calling the create debit transaction endpoint , the debit transaction id is used with the pay debit endpoint to fulfill the payment by tranferring funds directly from the payer's bank account to pay the debit transaction, you need to have an existing bank account associated with the contact you are collecting from this can be achieved by using the create bank account endpoint when paying the payment request, you must specify the account you want to pull funds from this can be any one of your contact's bank accounts this is referred to as the from bank account after successfully paying the debit transaction, you will receive a success response that contains the transaction uuid the returned transaction uuid can be used to track the status of the debit transaction in a polling fashion (push notifications through webhooks are not supported yet but coming soon) by calling the get transaction status endpoint sequence of operations sequencediagram participant partner as partner participant api as jetpay api partner >>+api get all company bank accounts note right of api get /company/bank accounts (v0) api >> partner r list of company bank accounts note right of api 200 ok note over partner, api one of the returned bank accounts shall be used as the\<br>"to bank account" when creating the debit transaction partner >>+api create debit transaction note right of api put /debit (v0) api >> partner r debit transaction created note right of api 201 created partner >>+api get contact details (including bank accounts) note right of api get /contact/{contactid} (v0) api >> partner r contact details note right of api 200 ok note over partner, api one of the returned bank accounts in the contact details\<br>shall be used as the "from bank account" when creating\<br>the debit transaction partner >>+api pay debit transaction note right of api put /pay debit (v0) api >> partner r payment successful note right of api 200 ok note over partner, api once payment has completed, the status of the transaction\<br>can be monitored using a polling fashion so your system\<br>knows when the status of the transaction changes loop while debit transaction is pending completion partner >>+api get transaction stauts note right of api get /transaction/{debitid}/status (v0) api >> partner r debit transaction status note right of api 200 ok end