API reference

Invoice pay settings

How customers pay on an invoice's own page: the Stripe publishable key and the bank account offered.

Guides: Bill customers with invoices

Get how these books take payment on an invoice's page

GET/v1/invoice_pay_settings

client.invoicePaySettings.get()

How these books take payment on an invoice's own page.

Response

200InvoicePaySettingsOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/invoice_pay_settings" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Change how these books take payment on an invoice's page

PATCH/v1/invoice_pay_settings

client.invoicePaySettings.update()

Change the publishable key or the bank details. It needs money.approve, since these say where customers send money, and every change is on the audit trail. Saving the same values again changes nothing they do.

Request body

InvoicePaySettingsIn

Response

200InvoicePaySettingsOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X PATCH "https://api.ledgerit.ai/v1/invoice_pay_settings" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Objects

The objects these operations take and return.

InvoicePaySettingsOut

NameTypeDescription
bank_maskedRequiredstring or null

The account's name and last digits. The details are never returned.

has_stripeRequiredboolean

A Stripe account is connected to these books.

payments_reported_at_onceRequiredboolean

Stripe tells LedgerIt as soon as a payment goes through. Otherwise a customer who leaves the page before coming back shows as paid at the next Stripe sync.

stripe_publishable_keyRequiredstring or null

The publishable key the card form opens with.

updated_atRequiredstring (date-time) or null

InvoicePaySettingsIn

NameTypeDescription
bankPayBankIn or null

Where customers may pay by transfer. Entered whole. Left out, it stays; null clears it.

stripe_publishable_keystring or null

The publishable key of the Stripe account connected to these books. Left out, it stays; null clears it.

PayBankIn

NameTypeDescription
account_nameRequiredstring

The name on the account.

account_numberRequiredstring

The account number, or an IBAN.

bank_namestring or null
routing_numberstring or null

A US routing number.

swiftstring or null

A SWIFT code, for international transfers.