Guides

Payment Flows

Transacting via Centrapay requires customer and merchant devices to negotiate the creation and fulfillment of Payment Requests. There are multiple payment “flows” a merchant integration can select from to facilitate this negotiation. Which flow is employed will depend on the capabilities of the merchant system.

Merchant-presented

When a merchant terminal has a customer-facing display it can prompt the customer to pay by showing a QR code.

QR Code Flow

The merchant shows a QR code for the patron to scan with their Centrapay app, and the patron approves the payment in the app.

The merchant can show either:

  • A dynamic merchant QR code: generated for each payment and shown on a customer-facing display.
  • A static merchant QR code: a fixed, printed QR code for a Payment Link, for merchant systems that can neither display nor scan codes, such as unattended vending machines. The merchant sets the amount on each Payment Request; the patron doesn't enter one. A Payment Link can only have one open Payment Request at a time.
  1. The merchant creates a Payment Request. With a dynamic QR code, it shows the Payment Request's QR code. With a static QR code, it creates the Payment Request with the paymentLinkId of the Payment Link, so scanning the printed QR code opens this Payment Request.
  2. The patron scans the QR code and pays the Payment Request in their app.
  3. The merchant polls the Payment Request and displays the result once its status is paid, cancelled or expired.
  4. Paid Payment Requests can later be refunded.

Patron-presented

When a merchant terminal is not capable of displaying a customer-facing QR code, then the payment request can be negotiated with the customer by scanning a barcode or QR code displayed on the customer’s smart device.

Barcode Flow

The Barcode Flow, also called the Quick Pay Flow, is used to pay the payment request after it is polled for the first time, without requiring patron approval. The patron barcode must be linked to an asset type that allows quick pay. See Asset Types for the list of asset types that support Quick Pay.

The patron can present either:

  • A dynamic patron barcode: a short-lived Patron Code that the patron generates via the Centrapay API and displays as a barcode on their smart device.
  • A static patron barcode: a long-lived Centrapay Enabled Barcode, such as a card. You may need to check the patron's photo ID before the payment goes through.
  1. The patron presents their barcode and the merchant scans it.
  2. The merchant optionally checks the barcode for support using the Scanned Codes endpoints.
  3. The merchant creates a Payment Request using the barcode as a parameter.
  4. The merchant polls the Payment Request. The first poll triggers the payment.
  5. If the Payment Request has Payment Conditions with an awaiting-merchant status, the merchant must accept or decline them.
  6. Once the status of the Payment Request is paid, the process is complete.