Create a Customer
Before you can start billing your customers you need to register them in Credyt and create subscriptions to the products they use.
Product Subscriptions
When creating a customer you can subscribe them to products in your Product Catalog. The product code and version you specify determines the pricing that will be used to bill the customer.
When you subscribe a customer to a product, Credyt automatically creates their wallet and provisions accounts in the billing 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.
Example
{
"name": "John Doe",
"external_id": "18991",
"subscriptions": [
{
"products": [
{
"code": "glitch_video_std"
}
]
}
]
}
The external_id field allows you to use your own identifiers when sending usage data to Credyt
Response
{
"id": "cust_473cr1y0ghbyc3m1yfbwvn3nxx"
}
Make a note of the customer id. We'll use it in the subsequent exercises.