Take the first payment on an order. Choose how the customer pays, then capture, reverse or refund payments as needed.
Endpoints: Custom Checkout · Payment Links · Order card · Payments
Steps
-
Choose how the customer pays:
Option Use it when Endpoints Checkout on your website The customer pays on your site. POST /orderswithcreate_checkout: true;POST /orders/{id}/custom_checkoutto renewPayment link You send a link by email or SMS, or show a QR code. POST /orders/{id}/send_email_link,send_sms_linkorpayment_linkStored card The customer already has a card on file. POST /orders/{id}/pay_with_card -
Wait for the payment result. An approved first payment makes the order live.
-
Optional: capture, reverse or refund the payment. See After payment.
flowchart TB
Order["Order (draft)"] --> Choose{"How does the
customer pay?"}
Choose -->|"On your website"| Checkout["Custom checkout
create_checkout: true"]
Choose -->|"From a link"| Link["Payment link
email · SMS · QR"]
Choose -->|"Card on file"| Stored["Stored card
/pay_with_card"]
Checkout --> Live["Live order"]
Link --> Live
Stored --> Live
Checkout on your website
Use this to show the payment form inside your own website. For the full walkthrough, see Custom Checkout.
sequenceDiagram
autonumber
participant B as Your server
participant API as BillPro API
participant F as Your website
participant Cu as Customer
B->>API: POST /orders with create_checkout: true
API-->>B: Order and checkout for the payment form
B->>F: Show the payment form
Cu->>F: Enter card details
F-->>F: BillPro records the payment
F->>B: Customer returns to your URL with the status
B->>API: GET /orders/{id} to confirm
Sending a payment link, or showing its QR code, moves a draft order to pending.
After payment
| Action | Endpoint | When you can use it |
|---|---|---|
| Capture | POST /payments/{id}/capture | On a successful pre-authorisation, for a pre-auth-only order. |
| Reverse | POST /payments/{id}/reverse | On a pre-authorisation, to release the funds. |
| Refund | POST /payments/{id}/refund | On a successful payment or capture. |
Capture and refund accept an amount for part of the payment.
Next
Instalment, subscription and metered orders have future payments. Continue to 5 · Recurring billing & recovery.