API Reference
- GETAPI Overview
- SDK Setup
- Events
- Customers
- Entitlements
- Subscriptions
- Plans
- Invoices
- Credits
Customers
Create a customer
Create a customer
POST
/
api
/
customers
/
Copy
Ask AI
curl --request POST \
--url https://api.uselotus.io/api/customers/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"customer_name": "<string>",
"customer_id": "<string>",
"email": "jsmith@example.com",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"properties": {},
"default_currency_code": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"tax_rate": 499.99995
}'
Copy
Ask AI
{
"customer_id": "<string>",
"email": "jsmith@example.com",
"customer_name": "<string>",
"invoices": [
{
"invoice_id": "<string>",
"seller": {
"name": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"phone": "<string>",
"email": "jsmith@example.com"
},
"payment_status": "draft",
"amount": 0,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"cost_due": 5000000000,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"invoice_pdf": "<string>",
"external_payment_obj_type": "stripe",
"external_payment_obj_id": "<string>",
"invoice_number": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"issue_date": "2023-11-07T05:31:56Z",
"external_payment_obj_status": "<string>"
}
],
"total_amount_due": 123,
"subscriptions": [
{
"subscription_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"auto_renew": true,
"is_new": true,
"subscription_filters": [
{
"value": "<string>",
"property_name": "<string>"
}
],
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"billing_plan": {
"plan_name": "<string>",
"plan_id": "<string>",
"version_id": "<string>",
"version": 123
},
"fully_billed": true,
"addons": [
{
"addon_subscription_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"addon": {
"addon_name": "<string>",
"addon_id": "<string>",
"addon_type": "flat",
"billing_frequency": "one_time"
},
"fully_billed": true
}
],
"metadata": {}
}
],
"integrations": {
"stripe": {
"stripe_id": "<string>",
"has_payment_method": true
},
"braintree": {
"braintree_id": "<string>",
"has_payment_method": true
}
},
"default_currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"has_payment_method": true,
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"tax_rate": 0,
"timezone": "Africa/Abidjan",
"tax_providers": [
"taxjar"
]
}
Copy
Ask AI
lotus.create_customer(
customer_id='cust_0569173ee6654369',
email="corporation@outlook.com",
name='Corporation Inc.',
)
Authorizations
Token-based authentication with required prefix "Token"
Body
Response
201 - application/json
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://api.uselotus.io/api/customers/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"customer_name": "<string>",
"customer_id": "<string>",
"email": "jsmith@example.com",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"properties": {},
"default_currency_code": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"tax_rate": 499.99995
}'
Copy
Ask AI
{
"customer_id": "<string>",
"email": "jsmith@example.com",
"customer_name": "<string>",
"invoices": [
{
"invoice_id": "<string>",
"seller": {
"name": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"phone": "<string>",
"email": "jsmith@example.com"
},
"payment_status": "draft",
"amount": 0,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"cost_due": 5000000000,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"invoice_pdf": "<string>",
"external_payment_obj_type": "stripe",
"external_payment_obj_id": "<string>",
"invoice_number": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"issue_date": "2023-11-07T05:31:56Z",
"external_payment_obj_status": "<string>"
}
],
"total_amount_due": 123,
"subscriptions": [
{
"subscription_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"auto_renew": true,
"is_new": true,
"subscription_filters": [
{
"value": "<string>",
"property_name": "<string>"
}
],
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"billing_plan": {
"plan_name": "<string>",
"plan_id": "<string>",
"version_id": "<string>",
"version": 123
},
"fully_billed": true,
"addons": [
{
"addon_subscription_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"addon": {
"addon_name": "<string>",
"addon_id": "<string>",
"addon_type": "flat",
"billing_frequency": "one_time"
},
"fully_billed": true
}
],
"metadata": {}
}
],
"integrations": {
"stripe": {
"stripe_id": "<string>",
"has_payment_method": true
},
"braintree": {
"braintree_id": "<string>",
"has_payment_method": true
}
},
"default_currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"has_payment_method": true,
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping_address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"tax_rate": 0,
"timezone": "Africa/Abidjan",
"tax_providers": [
"taxjar"
]
}
Assistant
Responses are generated using AI and may contain mistakes.