Skip to navigation

Pay an invoice from a BALANCE wallet

Pays the open amount of a FINAL invoice from a BALANCE wallet of the invoice’s customer, in the invoice’s currency, as far as the wallet’s balance goes. The wallet’s reserved_balance is not deducted: a reservation only forecasts an invoice that is not paid yet. A partial payment leaves the rest open. The payment is a WALLET_BALANCE payment, and the paid part is reported as prepaid_invoice_amount. Answers 409 with reason INVALID_STATE when the invoice cannot be paid from the wallet: invalid_state.status is the invoice status (not FINAL), its type (a credit invoice), its payment status (PAID, OVERPAID), NO_OPEN_AMOUNT for an invoice with nothing open that is not PAID or OVERPAID, TOP_UP for an invoice that funds a BALANCE wallet, PAYMENT_PENDING while another payment is in progress, WALLET_NOT_ACTIVE for a wallet that is DRAFT, INACTIVE or ARCHIVED, or NO_AVAILABLE_BALANCE when the wallet’s balance is zero. Requires the INVOICE.PAY permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version
resourceIdstringRequiredDefaults to
The ID of the resource for which the action is posted.

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
wallet_idstring or nullRequired

The ID of the BALANCE wallet to pay from: a wallet of the invoice’s customer, in the invoice’s currency.

Response

OK
object_typestring or nullOptionalRead-only
idstring or nullOptionalRead-only
invoice_numberstring or nullOptionalRead-only
purchase_order_numberstring or nullOptional
platform_idstring or nullOptionalRead-only
customer_idstring or nullOptional

id of the customer, can only be provided when creating a one-off invoice, and either id or reference is mandatory in that case

customer_referencestring or nullOptionalformat: "^\S+$"0-256 characters

reference of the customer, can only be provided when creating a one-off invoice, and either id or reference is mandatory in that case

sales_tax_percentagestring or nullOptional

Sales tax percentage of a one-off invoice, only allowed when the customer or the billing entity is US-based. When not provided for a US billing entity it defaults to 0, unless a tax calculation integration (e.g. AvaTax) determines the rate. Can be updated while the invoice is OPEN or DRAFT

customerobject or nullOptional
billing_entityobject or nullOptional
statusstringOptional
on_holdbooleanOptional
typeenumOptional
Allowed values:
created_atstring or nullOptionalRead-only
updated_atstring or nullOptionalRead-only
invoice_datedatetimeOptional
delivery_datestring or nullOptionalRead-only
due_datedatetime or nullOptional
billing_period_datestring or nullOptionalRead-only
billing_currencystring or nullOptionalRead-only
invoice_amount_including_taxobject or nullOptional
open_invoice_amountobject or nullOptional
closed_invoice_amountobject or nullOptional
paid_invoice_amountobject or nullOptional
prepaid_invoice_amountobject or nullOptional

The part of paid_invoice_amount paid from a BALANCE wallet. Negative on a credit invoice: what was credited to a BALANCE wallet. Absent when nothing was.

timezonestring or nullOptionalRead-only
billing_periodobject or nullOptional
pricing_plan_subscription_idslist of strings or nullOptionalRead-only
pricing_plan_schedule_idslist of strings or nullOptionalRead-only
The pricing plan schedules this invoice bills for.
pricing_amount_typeenumOptional
Indicates whether the amounts provided, e.g. from the pricing plan, are including or excluding tax.
Allowed values:
periodslist of objectsOptional
Periods that are applicable for this invoice, use either periods or groups for summation, groups will be removed in later version
closed_periodslist of objects or nullOptionalRead-only
tax_categorieslist of objects or nullOptionalRead-only
tax_summaryobject or nullOptional
dunning_actionslist of objects or nullOptionalRead-only
payment_acceptor_idslist of stringsOptional
payment_actionslist of objects or nullOptionalRead-only
noteslist of strings or nullOptional
linked_invoiceslist of objects or nullOptionalRead-only
custom_fieldslist of objects or nullOptional
other_custom_fieldslist of objects or nullOptionalRead-only
e_invoiceslist of objects or nullOptionalRead-only
used_exchange_rateslist of objects or nullOptionalRead-only
processing_only_customerslist of objects or nullOptionalRead-only
meter_valueslist of objects or nullOptionalRead-only
credit_typeslist of objects or nullOptionalRead-only
meter_property_variableslist of objects or nullOptionalRead-only

The meter property variables a pricing condition of this invoice was billed through, once each; their values are not included.

display_invoice_sub_lines_per_processing_only_customerboolean or nullOptionalRead-only
show_original_customer_invoice_lineboolean or nullOptionalRead-only
show_tax_per_line_itemboolean or nullOptionalRead-only
forwarded_from_customerslist of objects or nullOptionalRead-only
validation_resultlist of objects or nullOptionalRead-only
reprocessobjectOptional
used_tax_registrationobject or nullOptional
The tax registrations that are used to calculate the tax for this invoice. If empty, the billing entity was used
footnotestring or nullOptionalRead-only
Footnote to be shown on the invoice
approval_statusenum or nullOptionalRead-only
Approval status for invoices that are associated with an approval request
Allowed values:
updated_to_final_atstring or nullOptionalRead-only
The invoice finalization date
has_usage_based_pricingboolean or nullOptionalRead-only
couponslist of objects or nullOptionalRead-only
Coupons applied to this invoice
promotion_codeslist of objects or nullOptionalRead-only
Promotion codes applied to this invoice
linked_integrationslist of objects or nullOptional
billing_typeenum or nullOptional
Allowed values:
payment_statusenum or nullOptional
Allowed values:
paidboolean or nullOptionalDeprecated
auto_rescueslist of objects or nullOptionalRead-onlyDeprecated
linked_invoices_idslist of stringsOptionalDeprecated

Can currently only be used for ‘ONE_OFF_CREDIT’ invoices, indicates original invoices that this invoice links to

creditobject or nullOptionalDeprecated
to_be_reprocessedboolean or nullOptionalRead-onlyDeprecated
to_be_reprocessed_atstring or nullOptionalRead-onlyDeprecated

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error