Overview

Take card payments in a form on your own website.

Show the BillPro payment form on your own website. The customer enters their card on your page, and the order is paid without leaving your site.

The card fields are hosted by the payment gateway, Pay.on, inside secure iframes. Card details go straight from the customer's browser to the gateway and never touch your servers. This keeps your PCI scope small (SAQ-A).

How it works

sequenceDiagram
  autonumber
  participant S as Your server
  participant API as BillPro API
  participant W as Your website
  participant G as Pay.on
  participant BP as BillPro page

  S->>API: POST /orders with create_checkout: true
  API-->>S: Order (pending) and checkout
  S->>W: Page with the payment form
  W->>G: Customer enters card details
  G-->>BP: Payment result
  BP-->>W: Redirect to your return URL with status
  S->>API: GET /orders/{id} to confirm

Host a checkout on your website walks through each step, with a live test payment form:

  1. Create the order with a checkout. Your server creates the order with create_checkout: true and your two return URLs.
  2. Show the payment form. Your page loads the gateway's form with the checkout, and points it at BillPro's page.
  3. Handle the result. BillPro records the payment and sends the customer to your return URL with the status. Confirm the order's status before you fulfil it.
  4. Renew the checkout if it expires or the customer needs another try.

Before you start

  • An API token. See 1 · Authenticate.
  • A page on your website for the payment form, and a return URL for the customer to come back to.
  • A profile with a Pay.on online payment method.

Keep your API token on your server. Your website never calls the BillPro API directly.