Skip to main content

Sandbox: Billing

Simulate generating an invoice​

Get the account ID for which you'd like to generate a test invoice using the Testing API.

🔎 Open the mutation in API Explorer

Testing API mutation
mutation GenerateTestInvoice {
simulateInvoiceGeneration(
input: { accountId: "$YOUR_ACCOUNT_ID" }
) {
... on SimulateInvoiceGenerationSuccessPayload {
__typename
invoice {
closingDate
createdAt
expiresAt
id
name
openingDate
status
updatedAt
url
}
}
... on AccountNotFoundRejection {
id
message
}
... on AccountNotEligibleRejection {
__typename
message
}
}
}
Payload
{
"data": {
"simulateInvoiceGeneration": {
"__typename": "SimulateInvoiceGenerationSuccessPayload",
"invoice": {
"closingDate": "2023-02-28T22:59:59.999Z",
"createdAt": "2023-02-16T16:04:51.331Z",
"expiresAt": "2023-02-17T16:04:52.603Z",
"id": "dc43f0f6-7bae-4f05-8b35-82363a1a17cf",
"name": "INVOICE-20230228",
"openingDate": "2023-01-31T23:00:00.000Z",
"status": "Paid",
"updatedAt": "2023-02-16T16:04:52.582Z",
"url": "$INVOICE_URL"
}
}
}
}