List payments and invoices

GEThttps://api.floconnector.com/v1/billing/invoices
Scope
billing.read
Rate limit
the key's read budget, 120 a minute

Every payment the payment provider holds for the account, newest first, 20 a page, failed ones included. Read outcome for what a payment came to; invoice_url is set only where money moved. Pass next_cursor back as cursor for the next page.

Query parameters

stringoptional

The next_cursor of the previous page.

Max length 64

Responses

200Success
invoicesarray of object

The payments on this page, newest first.

ShowHide 9 fields of each item
payment_idstring

The payment's id at the payment provider.

total_amount_centsinteger

The payment's total, in cents of currency.

currencystring

The currency the payment was made in, e.g. USD.

statusstringnullable

The payment provider's raw status, kept for support conversations. Read outcome instead.

outcomeenum

What the payment came to. paid: charged. declined: the charge failed. pending: still in progress. incomplete: waiting on the customer, as with an abandoned checkout. cancelled: cancelled. refunded and partly_refunded: charged, then returned in full or in part.

paiddeclinedpendingincompletecancelledrefundedpartly_refunded
decline_reasonstringnullable

Why a declined payment failed, in plain words. Null unless outcome is declined.

cardobjectnullable

The card the payment was charged to, or tried to be. Null when the payment provider reports none.

ShowHide 3 fields
networkstringnullable

The card network, e.g. VISA. Null when not reported.

typestringnullable

The card type, credit or debit. Null when not reported.

last4string

The card's last four digits.

created_atstring

When the payment was made or attempted, as the payment provider's timestamp.

invoice_urlstringnullable

A link to the invoice PDF. Set only where money moved: outcome is paid, refunded or partly_refunded.

next_cursorstringnullable

Pass as cursor for the next page. Null on the last page.

400validation: a field failed validation; field names it.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

401unauthorized: no key, or an unknown, revoked or expired key.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

403insufficient_scope: the key lacks the route's scope, named in required. Or forbidden, or plan_limit when the plan does not include the API.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

404not_found: the thing is not in this workspace.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

429rate_limited: the key's per-minute budget is spent. Retry after Retry-After seconds.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

Errors lists every error code and what to do about it.