Quota Check
API to check the remaining e-invoice issuance quota for the current service package. Values are updated in real-time.
API Endpoint
GET
https://einvoice-api-sandbox.sepay.vn/v1/usageAPI Request
This endpoint does not require any request parameters. Simply send a Bearer token in the header for authentication.
API Response
Success Response (200)
{
"data": {
"quota_remaining": "534"
}
}dataobject
Error Handling
401UnauthorizedMissing or invalid/expired Bearer token.
Notes
About quota_remaining value
- quota_remaining represents the number of invoice issuances remaining in your current service package
- The value is updated in real-time after each successful invoice issuance
- The value is returned as a
stringtype; convert tointegerif calculations are needed
Draft invoices do not count against quota
When creating an invoice with is_draft: true, the system will not deduct from your quota. Quota is only deducted when an invoice is officially issued (by calling the issue API or creating with is_draft: false).
Code Examples
>
>
>
curl --request GET \--url https://einvoice-api-sandbox.sepay.vn/v1/usage \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Next Steps
After checking the quota:
- If you have remaining quota, you can Create eInvoice to create a new invoice
- If you've exhausted your quota, please contact SePay to upgrade your service package