curl --request POST \
--url https://api.example.com/api/v1/documents/contracts/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractorEmail": "<string>",
"contractorDisplayName": "<string>",
"clientEmail": "<string>",
"clientDisplayName": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/documents/contracts/invoices"
payload = {
"contractorEmail": "<string>",
"contractorDisplayName": "<string>",
"clientEmail": "<string>",
"clientDisplayName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contractorEmail: '<string>',
contractorDisplayName: '<string>',
clientEmail: '<string>',
clientDisplayName: '<string>'
})
};
fetch('https://api.example.com/api/v1/documents/contracts/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "USD",
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"onchainTransactionId": "<string>",
"transaction": {
"onchainTransactionId": "<string>",
"amount": 123,
"txHash": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"discount": "<string>",
"comment": "<string>",
"emailMessage": "<string>",
"invoiceNumber": "<string>",
"periodNumber": 123,
"issuedDate": "2023-12-25",
"dueDate": "2023-12-25",
"items": [
{}
],
"paymentMethods": [
{
"bankName": "<string>",
"accountHolderType": "individual",
"beneficiaryName": "<string>",
"bankAddress": {
"addressLine1": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"currency": "<string>",
"accountHolderFirstName": "<string>",
"accountHolderLastName": "<string>",
"accountHolderBusinessName": "<string>",
"accountHolderAddress": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
},
"relationship": "employee",
"businessIndustry": "<string>",
"paymentReference": "<string>",
"accountType": "sepa",
"ibanNumber": "<string>",
"bic": "<string>"
}
],
"client": {
"email": "<string>",
"displayName": "<string>",
"address": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
}
},
"contractor": {
"email": "<string>",
"displayName": "<string>",
"address": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "service",
"status": "active",
"isRecurring": true,
"period": "<string>",
"activationAt": "2023-11-07T05:31:56Z",
"expirationAt": "2023-11-07T05:31:56Z"
},
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key": "<string>"
}
],
"paidAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create invoice
curl --request POST \
--url https://api.example.com/api/v1/documents/contracts/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractorEmail": "<string>",
"contractorDisplayName": "<string>",
"clientEmail": "<string>",
"clientDisplayName": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/documents/contracts/invoices"
payload = {
"contractorEmail": "<string>",
"contractorDisplayName": "<string>",
"clientEmail": "<string>",
"clientDisplayName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contractorEmail: '<string>',
contractorDisplayName: '<string>',
clientEmail: '<string>',
clientDisplayName: '<string>'
})
};
fetch('https://api.example.com/api/v1/documents/contracts/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "USD",
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"onchainTransactionId": "<string>",
"transaction": {
"onchainTransactionId": "<string>",
"amount": 123,
"txHash": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"discount": "<string>",
"comment": "<string>",
"emailMessage": "<string>",
"invoiceNumber": "<string>",
"periodNumber": 123,
"issuedDate": "2023-12-25",
"dueDate": "2023-12-25",
"items": [
{}
],
"paymentMethods": [
{
"bankName": "<string>",
"accountHolderType": "individual",
"beneficiaryName": "<string>",
"bankAddress": {
"addressLine1": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"currency": "<string>",
"accountHolderFirstName": "<string>",
"accountHolderLastName": "<string>",
"accountHolderBusinessName": "<string>",
"accountHolderAddress": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
},
"relationship": "employee",
"businessIndustry": "<string>",
"paymentReference": "<string>",
"accountType": "sepa",
"ibanNumber": "<string>",
"bic": "<string>"
}
],
"client": {
"email": "<string>",
"displayName": "<string>",
"address": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
}
},
"contractor": {
"email": "<string>",
"displayName": "<string>",
"address": {
"streetAddress": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "AF",
"zip": "<string>"
}
},
"contract": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "service",
"status": "active",
"isRecurring": true,
"period": "<string>",
"activationAt": "2023-11-07T05:31:56Z",
"expirationAt": "2023-11-07T05:31:56Z"
},
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key": "<string>"
}
],
"paidAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
Request to create an invoice.
Participant data (email, display_name, address) is snapshotted at creation time. Amount is computed as sum of items[].price * items[].quantity. invoice_number is auto-generated per (contractor, client) pair.
Supported invoice/contract currencies. G10 majors + AED/HKD, plus popular crypto tokens.
USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD, SEK, NOK, AED, HKD, BRL, MXN, USDC, USDT, DAI, SOL, BTC, ETH, NEAR, BNB, XRP, ADA, DOGE, TRX, GRAM, AVAX, MATIC, DOT, LTC, LINK, ARB, OP, SUI 2000Prefix for auto-generated invoice_number, e.g. "INV" → "INV-0001".
1 - 16^[A-Za-z0-9_-]+$Fixed discount in invoice currency. Subtracted from sum of items.
x >= 0Address schema for user.
Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
Show child attributes
Show child attributes
Address schema for user.
Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
Show child attributes
Show child attributes
Custom bank requisites in the same ibanData format as POST /user/contact. Each entry is snapshotted onto the invoice alongside any banks/onchain methods, so several payment options can be offered at once.
IBAN (SEPA) external account.
- IBANAccountDetails
- USExternalAccountDetails
- SwiftAccountDetails
- PixAccountDetails
- LocalRailAccountDetails
- ProviderUsdAccountDetails
Show child attributes
Show child attributes
Custom crypto wallet requisites (network + address + currency). Snapshotted onto the invoice alongside iban/banks/onchain.
Show child attributes
Show child attributes
Response
Successful Response
Invoice response.
Carries no download link: the PDF is rendered on request at
GET /public/invoices/{id}/pdf. Add
?details=<index into paymentMethods> for the copy naming that payment
method; without it the copy carries no payment details.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Supported invoice/contract currencies. G10 majors + AED/HKD, plus popular crypto tokens.
USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD, SEK, NOK, AED, HKD, BRL, MXN, USDC, USDT, DAI, SOL, BTC, ETH, NEAR, BNB, XRP, ADA, DOGE, TRX, GRAM, AVAX, MATIC, DOT, LTC, LINK, ARB, OP, SUI Invoice status.
draft, sent, paid, cancelled, client_paid, client_declined Minimal transaction info embedded in invoice response.
Show child attributes
Show child attributes
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$IBAN (SEPA) external account.
- IBANAccountDetails
- USExternalAccountDetails
- SwiftAccountDetails
- PixAccountDetails
- LocalRailAccountDetails
- ProviderUsdAccountDetails
- ContactWalletResponse
- EmailAccountInput
Show child attributes
Show child attributes
Minimal participant info for invoice response.
Show child attributes
Show child attributes
Minimal participant info for invoice response.
Show child attributes
Show child attributes
Minimal contract info embedded in invoice response.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?