Skip to main content

Payments & Invoicing

Payments

Payments are transactions where money moves directly, and immediately between two accounts.

Payments have multiple use-cases:

  1. Peer-to-Peer (P2P) payments directly between two end users.
  2. Invoice payments move funds between a user profile and a business profile which generated an invoice.
  3. System payments which facilitate program wide features such as card transaction settlement.

Initiate a peer-to-peer payment

Specify the sender and receiving accounts along with the amount to initiate an intra system payment.

Transaction requests require explicitly including a unique transaction_id for idempotency.

POST /transactions

{
"amount_coins": 7500,
"from_address": "tp1vdmq58932q2xxl2hg8qvhhvj8pd2mlydjthp7e",
"to_address": "tp1vdmq58932q2xxl2hg8qvhhvj8pd2mlydjthp7e",
"note": "Descriptive message associated with the transaction",
"transaction_id": "d6ce8c20-846e-4902-b5a9-d05b38f2bbfc"
}

Response:

{
"id": "d6ce8c20-846e-4902-b5a9-d05b38f2bbfc",
"from_address": "tp1ldxvn7am23xx987yhchra5hwfvglk5lu05m2u3",
"to_address": "tp1vdmq58932q2xxl2hg8qvhhvj8pd2mlydjthp7e",
"bank_account_id": "5f10f663-ca26-47bd-a0bc-ecf3a043c209",
"amount_coins": 7500,
"type": "INTRA",
"note": "Descriptive message associated with the transaction",
"status": "COMPLETE",
"created_dt": "2022-01-02T03:04:05.123456-05:00"
}

Invoicing

Invoices allow businesses to affect transactions.

Invoices are generated by business accounts and presented to Figure Pay users via QR code for authorization. By authorizing, the end user successfully completes payment for goods and/or services provided by the business.

Generate an Invoice

Generate an invoice with amount and other relevant metadata. The response will contain information that can be used by our client-side QR code generation library.

Invoice requests allow the option of explicitly including a unique id for idempotency.

POST /invoices

{
"id": "a007a040-b7f0-456d-ba58-95e2ce93d4b0",
"address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"amount_coins": 7500,
"label": "Order #289342"
}

Response:

{
"id": "a007a040-b7f0-456d-ba58-95e2ce93d4b0",
"account_id": "be285151-9160-482a-9c8d-a29fc072086a",
"label": "Order #289342",
"amount_coins": 7500,
"status": "PENDING" | "COMPLETE" | "EXPIRED" | "CANCELLED" | "REVERSED",
"network_fee_coins": 38,
"net_amount_coins": 7462
}

Retrieve an Invoice

Fetch an invoice from the API to check its status or gather metadata required to re-display its contents and re-generate a QR code.

GET /invoices/:invoice_id

{
"id": "a007a040-b7f0-456d-ba58-95e2ce93d4b0",
"account_id": "be285151-9160-482a-9c8d-a29fc072086a",
"label": "Order #289342",
"amount_coins": 7500,
"status": "PENDING" | "COMPLETE" | "EXPIRED" | "CANCELLED" | "REVERSED",
"network_fee_coins": 38,
"net_amount_coins": 7462
}

Initiate an invoice payment

Similar to a peer-to-peer payment, specify the paying account and the invoice ID to move funds from a personal account to a business account.

POST /transactions/invoice-payment

{
"amount_coins": 7500,
"from_address": "tp1ldxvn7am23xx987yhchra5hwfvglk5lu05m2u3",
"invoice_id": "a007a040-b7f0-456d-ba58-95e2ce93d4b0",
"note": "Descriptive message associated with the transaction",
"transaction_id": "d6ce8c20-846e-4902-b5a9-d05b38f2bbfc",
"affiliate_address": "tp1vdmq58932q2xxl2hg8qvhhvj8pd2mlydjthp7e",
"affiliate_rate": 0.5
}

Response:

{
"id": "d6ce8c20-846e-4902-b5a9-d05b38f2bbfc",
"from_address": "tp1ldxvn7am23xx987yhchra5hwfvglk5lu05m2u3",
"to_address": "tp1vdmq58932q2xxl2hg8qvhhvj8pd2mlydjthp7e",
"bank_account_id": "5f10f663-ca26-47bd-a0bc-ecf3a043c209",
"amount_coins": 7500,
"type": "INTRA",
"note": "Descriptive message associated with the transaction",
"status": "COMPLETE",
"created_dt": "2022-01-02T03:04:05.123456-05:00"
}