Transactions

Create a transaction

Create an invoice (type: debit) or a credit note (type: credit), as a pending draft or finalized in one call. A finalized request runs the tax engine and returns subtotal, tax and total. Re-posting the same external_id updates the transaction.

post/transactions

Request

  • Base URL: https://api.getsphere.com/v1
  • URL: https://api.getsphere.com/v1/transactions
  • Auth: API key in header X-API-KEY

Request body

external_idstring required
type'debit' | 'credit' required
status'pending' | 'finalized' required
currencystring required

ISO 4217 currency code, e.g. USD.

customer_idstring required
finalized_onstring date-time nullable
external_reference_numberstring nullable
original_transaction_idstring nullable
descriptionstring nullable
customer_namestring nullable
customer_emailstring nullable
customer_tax_exemptboolean nullable

Response

external_idstring required
typestring required
statusstring required
currencystring required
external_reference_numberstring nullable
descriptionstring nullable
customer_idstring nullable
finalized_onstring date-time nullable
original_transaction_idstring nullable
subtotalstring nullable
taxstring nullable
totalstring nullable
invoice_urlstring uri nullable
created_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.