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, make payments between two accounts, as well as make payments between out of band blockchain addresses to a BIAB account.

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

Note: 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.

http://api.{env.}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,
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"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.

http://api.{env.}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",
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"program_name": "Acme Corp",
"payload_type" : "ACCOUNT"
}

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

Blockchain Wallets

Generating the QR Code

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

GET /public/wallets?blockchainAddress=:blockchain_address

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

http://api.{env.}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

{
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"payload_type" : "WALLET"
}

You can now use this information to make payments directly to a blockchain address.