Customers
Before you can bill your customers, you need to register them in Credyt and subscribe them to the products they use. We require only the data necessary for you to identify your customers and perform core billing activities.
Your own unique reference or ID (the customer external_id) can be provided and later used when submitting usage, avoiding the need to maintain ID mappings in your systems. If you use Credyt’s built-in payment processing, the external ID is included as metadata in Stripe, aiding payment operations.
Subscribe a Customer to a Product
To streamline integration, subscriptions can be provided at the same as creating the customer. A customer can be subscribed to multiple products, which are identified by their respective product code and version. This determines the pricing that will be applied when usage is billed.
For convenience, if you omit a product's version we'll use the current "default" version. You can also use the default identifier when working with the Product Catalog API.
When a customer is subscribed to a product, Credyt automatically provisions wallet accounts in the currencies defined by the product’s pricing configuration. These accounts are used to track balances, top-ups, and usage from the start of the subscription.
Make sure to subscribe a customer to all of the products they use. Unmatched usage events will be accepted but will not be billed.
For more details on creating and managing products, see Products and Pricing.
Example
{
"name": "Walter Kreiger",
"external_id": "18991",
"subscriptions": [
{
"products": [
{
"code": "glitch_video_std",
"version": "default"
}
]
}
]
}
Response
{
"id": "cust_473cr1y0ghbyc3m1yfbwvn3nxx"
}