curl --location --request POST '/api/v1/subscriptions//metered-invoices' \
--header 'x-business-id;' \
--header 'Idempotency-Key;' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": "1500.00",
"currency": "NGN",
"usage_description": "API calls for January 2024",
"metadata": {
"period": "2024-01",
"service": "api"
}
}'
{
"success": true,
"invoice": {
"uid": "string",
"subscription_id": "string",
"invoice_id": "string",
"amount": "string",
"currency": "string",
"token_address": "string",
"billing_mode": "FIXED",
"usage_quantity": 0,
"usage_description": "string",
"status": "DRAFT",
"description": "string",
"due_date": "string",
"paid_at": "string",
"voided_at": "string",
"attempt_count": 0,
"next_payment_attempt": "string",
"processing": true,
"metadata": {},
"created_at": "string",
"updated_at": "string",
"subscription": {},
"charge_attempts": [
"string"
]
},
"eip712": {
"domain": {},
"types": {},
"message": {}
}
}