comecerodocs

Find a customer's subscription

GET
/usage/subscription_context

Finds the one active billing agreement that covers your customer id at a time, and the subscription it bills. Use it to check which subscription usage sent now (or at occurred_at) will be billed to. Secret and trusted tokens may call it; a limited token may not (403).

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Query Parameters

customer_id*string

Your id for the customer, the agreement's customer_id.

billing_region?string

The agreement's region. Defaults to us.

Default"us"
Value in"us""uk""eu"
occurred_at?string

An ISO 8601 date. Defaults to now.

Formatdate-time

Response Body

The agreement and subscription.

application/json
  1. response
agreement_id?string
subscription_id?string
customer_id?string
billing_region?string
Value in"us""uk""eu"
Example Request
curl -X GET 'https://api.comecero.com/api/v1/usage/subscription_context?customer_id=string'
Example Response
{  "agreement_id": "agr_cust_8412",  "subscription_id": "1101612345678Su7Kq2ZaB",  "customer_id": "cust_8412",  "billing_region": "us"}