Pay a MagicDoor invoice
Pays an outstanding MagicDoor invoice from one of the company's payment accounts and returns the invoice as it now stands. The caller's IP address is taken from the request and recorded with the payment authorisation.
Authorization
AuthorizationstringrequiredPath parameters
billIdstringrequiredThe invoice to pay. A Snowflake id sent as a decimal string.
Body
application/json
Name the account to pay from. Both id fields are optional on the wire; leaving both out falls back to whatever the company's billing setup nominates.
paymentAccountIdstringThe company payment account to pay from, from the company payment accounts list.
paymentMethodIdstringThe payment method to pay with, when the account offers more than one.
idempotencyKeystringA key you choose so that retrying the same request does not charge twice. 5 to 50 characters. Left out, the server generates one per request, which means a retry will be treated as a new payment — send your own if you intend to retry.
Response
200 · The invoice after the payment, with the new allocation on it.
idstringThe invoice. A Snowflake id sent as a decimal string.
billDatestring · date-timeThe date on the invoice, in the company's timezone.
dueDatestring · date-timeWhen MagicDoor expects to be paid, in the company's timezone.
totalAmountnumberWhat the invoice comes to in dollars and cents. Positive — money the management company owes MagicDoor.
allocatedAmountnumberHow much of it has been paid or covered by credit so far.
dueAmountnumberWhat is still outstanding: totalAmount less allocatedAmount. Zero means the invoice is settled.
memostringA note on the invoice. Absent when none was set.
referencestringMagicDoor's reference for the invoice. Absent when none was set.
metadataobjectFree-form key-value pairs kept on the invoice.
createdstring · date-timeWhen the invoice was created, in the company's timezone.
updatedstring · date-timeWhen it last changed, in the company's timezone.
creatorobjectWho created the record.
summariesobject[]The invoice's charges rolled up by service, ordered by service name.
chargesobject[]Every individual charge on the invoice.
allocationsobject[]The payments applied to the invoice.
fileobjectThe invoice PDF, with a signed download URL. Absent when no file is attached.