Skip to main content

QR Codes

QR Codes are used to easily make payments between two client applications for certain transactions. QR Codes are currently supported to make invoice payments and make payments between two accounts.

All three operations follow a similar flow:

  1. Generate the QR Code
  2. Extract the URL from QR Code image
  3. Make a request to retrieve the payload needed to complete a transaction
info

The URL in the QR Code will be valid for the next 15 minutes, after which you will need to regenerate the QR Code to continue the operation.

Invoice Payments

Generating the QR Code

Generate a QR Code by making a request to the following endpoint.

GET /invoices/:invoice_id/qr-code

It will return a QR Code (PNG image) whose payload is a URL in the format below.

https://api.test.figurepay.com/public/qr-code/:token

It is expected that a program mobile app scans this QR code in their app which retrieves the URL specified in the next step.

Retrieving the Necessary Data

Make a request to the URL retrieved from the QR Code, to get the appropriate data.

GET /public/qr-code/:token

{
"invoice_id": "01867334-2d76-4985-9f86-6b0795ed6cab",
"label": "Order #289342"
"amount_coins": 7500,
"account_id": "00cbf794-7cb1-41d9-95af-0f4830077e3b",
"program_name": "Acme Corp",
"payload_type" : "INVOICE_PAYMENT"
}

You can now use this information to make an invoice payment.

Peer to Peer Payments

Generating the QR Code

Generate a QR Code by making a request to the following endpoint. Note that only accounts who have verified addresses and have KYC/AML enabled are supported.

GET /profiles/:profile_id/account/:account_id/qr-code

It will return a QR Code (PNG image) whose payload is a URL in the format below.

https://api.test.figurepay.com/public/qr-code/:token

It is expected that a program mobile app scans this QR code in their app which retrieves the URL specified in the next step.

Retrieving the Necessary Data

Make a request to the URL retrieved from the QR Code, to get the appropriate data.

GET /public/qr-code/:token

{
"username": "user1",
"account_id": "00cbf794-7cb1-41d9-95af-0f4830077e3b",
"program_name": "Acme Corp",
"payload_type" : "ACCOUNT"
}

You can now use this information to make a peer to peer payment