Welcome
Guides
Wingback.js
Advanced
API Reference
- Introduction
- Customer
- Contract
- Billing Portal
- Entitlements
- Usage
- Payment
- Balance
- Virtual Wallets (Credits)
- Invoices
Entitlements
Get Billing Entitlements
Retrieve current plan, payment cycle, payment status and account status for a customer
GET
/
v1
/
c
/
entitlement
/
{customer_id}
/
billing
Copy
curl --request GET \
--url http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing \
--header 'wb-key: <api-key>'
Copy
{
"contract": {
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"status": "active"
},
"customer": {
"status": "active"
},
"payment": {
"next_payment_due": "2023-11-07T05:31:56Z",
"payment_provider": "stripe",
"unpaid_invoices_info": [
{
"currency": "usd",
"payment_threshold": "<string>",
"total_unpaid": "<string>",
"unpaid_invoices": [
{
"amount": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"status": "pending_validation"
}
]
}
],
"wallet_balance": "<string>",
"wallet_balances": [
{
"balance": "<string>",
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]
}
}
Authorizations
Path Parameters
Id of the customer
Query Parameters
Response
200 - application/json
Billing information for current cycle
Data to show the billing status of the customer (last payment date, wallet balance, etc)
Copy
curl --request GET \
--url http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing \
--header 'wb-key: <api-key>'
Copy
{
"contract": {
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"status": "active"
},
"customer": {
"status": "active"
},
"payment": {
"next_payment_due": "2023-11-07T05:31:56Z",
"payment_provider": "stripe",
"unpaid_invoices_info": [
{
"currency": "usd",
"payment_threshold": "<string>",
"total_unpaid": "<string>",
"unpaid_invoices": [
{
"amount": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"status": "pending_validation"
}
]
}
],
"wallet_balance": "<string>",
"wallet_balances": [
{
"balance": "<string>",
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.