Credits
Create a credit
Credits
Create a credit
Create a credit
POST
/api/credits/
X-API-KEY*
Authorization*
curl --request POST \
--url https://api.uselotus.io/api/credits/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"amount": 0,
"currency_code": "<currency_code>",
"customer_id": "<customer_id>"
}'
Creates a credit.
lotus.create_credit(
customer_id='cust_0569173ee6654369',
amount=120.00,
currency_code='USD',
)
lotus.create_credit(
customer_id='cust_0569173ee6654369',
amount=1000.00,
currency_code='USD',
description="Prepurchased credit",
expires_at="2024-01-01T00:00:00Z",
amount_paid=500.00,
amount_paid_currency_code='USD',
)
Authorizations
Authorization[header]required
string
Token-based authentication with required prefix "Token"
Body
amountrequired
number
amount_paid
number
amount_paid_currency_code
string
currency_coderequired
string
customer_idrequired
string
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
description
string
effective_at
string
expires_at
string
Response
amountrequired
number
amount_paidrequired
number
amount_paid_currencyrequired
object
amount_remainingrequired
number
credit_idrequired
string
currencyrequired
object
customerrequired
object
descriptionrequired
string
drawdownsrequired
array
effective_atrequired
string
expires_atrequired
string
statusrequired
string
active
- Activeinactive
- Inactive
Available options:
active
, inactive
curl --request POST \
--url https://api.uselotus.io/api/credits/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"amount": 0,
"currency_code": "<currency_code>",
"customer_id": "<customer_id>"
}'