Auto-Charge Payments
Automatically track usage, charge subscription fees, reconcile payments and recognize revenue.
Step 1: Track Usage (for usage-based products)
usage_event = {
"timestamp": "2024-02-05T08:55:32.160Z",
"customer_ref": "4096966d-5c1c-4e18-8b47-6a365e3c16ea",
"customer_name": "ACME",
"usage_product_ref": "bb50da07-c686-4688-8550-66305e17aab0",
"usage_product_name": "Units",
"quantity": 10,
"additional_report_data": {
"note": "User-specific note"
},
"validations": {
"currency": "USD",
"entity_ref": "55899733-32a0-4912-9d2e-a5b0f04dcdb6"
}
}
event_report_resp = requests.post('https://api.received.ai/api/usage/event', headers=headers, data=json.dumps(usage_event))Request Body
Responses
Step 2: Auto-Charge Customers

Last updated