curl --request POST \
--url https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"comment": "<string>",
"invoicePrefix": "INV",
"period": 123,
"addItems": [
{}
]
}
'import requests
url = "https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice"
payload = {
"amount": 123,
"comment": "<string>",
"invoicePrefix": "INV",
"period": 123,
"addItems": [{}]
}
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({
amount: 123,
comment: '<string>',
invoicePrefix: 'INV',
period: 123,
addItems: [{}]
})
};
fetch('https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice', 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 from contract
curl --request POST \
--url https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"comment": "<string>",
"invoicePrefix": "INV",
"period": 123,
"addItems": [
{}
]
}
'import requests
url = "https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice"
payload = {
"amount": 123,
"comment": "<string>",
"invoicePrefix": "INV",
"period": 123,
"addItems": [{}]
}
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({
amount: 123,
comment: '<string>',
invoicePrefix: 'INV',
period: 123,
addItems: [{}]
})
};
fetch('https://api.example.com/api/v1/documents/contracts/{contract_id}/create-invoice', 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
Path Parameters
Body
Create a one-off invoice for a contract's current billing period.
Either party may call it; the invoice always flows from the contract's contractor to its client. Line items default to the contract's terms.
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?