cURL
curl --request GET \
--url http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"contract": {
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
},
"customer": {},
"payment": {
"payment_provider": "stripe",
"unpaid_invoices_info": [
{
"payment_threshold": "<string>",
"total_unpaid": "<string>",
"unpaid_invoices": [
{
"amount": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]
}
],
"wallet_balance": "<string>",
"wallet_balances": [
{
"balance": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
],
"next_payment_due": "2023-11-07T05:31:56Z"
}
}Entitlements
Get Billing Entitlements
Retrieve current plan, payment cycle, payment status and account status for a customer
GET
/
v1
/
c
/
entitlement
/
{customer_id}
/
billing
cURL
curl --request GET \
--url http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/entitlement/{customer_id}/billing")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"contract": {
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
},
"customer": {},
"payment": {
"payment_provider": "stripe",
"unpaid_invoices_info": [
{
"payment_threshold": "<string>",
"total_unpaid": "<string>",
"unpaid_invoices": [
{
"amount": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]
}
],
"wallet_balance": "<string>",
"wallet_balances": [
{
"balance": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
],
"next_payment_due": "2023-11-07T05:31:56Z"
}
}Authorizations
api-keywb_user_cookie
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)
Describes Contract object for Entitlement endpoint
Show child attributes
Show child attributes
Describes the status of the customer for Entitlement response
Show child attributes
Show child attributes
Information about payment status displayed in the Entitlement API
Show child attributes
Show child attributes
⌘I