curl --request POST \
--url https://app.phonely.ai/api/get-invoices \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>"
}
'{
"message": "<string>",
"invoices": {}
}Return invoice data through the frontend billing API surface.
curl --request POST \
--url https://app.phonely.ai/api/get-invoices \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>"
}
'{
"message": "<string>",
"invoices": {}
}POST/api/get-invoicesContent-Type: application/jsonOrigin: Must match the configured app URL{
"customerId": "string"
}
customerId (string, required): The Stripe customer ID{
"message": "Invoices retrieved.",
"invoices": {
"object": "list",
"data": [
{
"id": "string",
"object": "invoice",
"amount_due": number,
"amount_paid": number,
"amount_remaining": number,
"currency": "string",
"customer": "string",
"date": number,
"due_date": number,
"paid": boolean,
"status": "string",
"total": number
}
],
"has_more": boolean,
"url": "string"
}
}
400 Bad Request: Customer ID is required403 Forbidden: Unauthorized origin404 Not Found: Invoices not found500 Internal Server Error: Server errorcurl -X POST https://app.phonely.ai/api/get-invoices \
-H "Content-Type: application/json" \
-H "Origin: https://app.phonely.ai" \
-d '{
"customerId": "cus_xxxxxxxxxxxxxxxxx"
}'