Introduction
Endpoints
- Accounts
- Fees
- Invoices
- Meters
- Plans
- Subscriptions
- Credit grants
- Products
- Orders
- Payments
Accounts
Create an account
Creates an account.
POST
/
accounts
Copy
curl --request POST \
--url https://sandbox-api.billingrails.com/v1/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"external_id": "customer_12345",
"type": "individual",
"name": "Sarah Johnson",
"email": "sarah.johnson@techstartup.com",
"default_currency": "USD",
"country": "US",
"invoice_settings": {
"number_prefix": "INV",
"grace_period_days": 7,
"net_term_days": 30
},
"preferred_locale": "en",
"metadata": {
"customer_segment": "enterprise",
"signup_source": "website"
}
}'
Copy
{
"account": {
"object": "account",
"id": "acc_9KjL2mN4pQ",
"created_at": "2025-06-04T14:22:15.123Z",
"external_id": "customer_12345",
"type": "individual",
"name": "Sarah Johnson",
"email": "sarah.johnson@techstartup.com",
"default_currency": "USD",
"country": "US",
"invoice_settings": {
"number_prefix": "INV",
"grace_period_days": 7,
"net_term_days": 30
},
"preferred_locale": "en",
"metadata": {
"customer_segment": "enterprise",
"signup_source": "website"
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Account payload
The body is of type object
.
Response
200 - application/json
Account created
The response is of type object
.
Copy
curl --request POST \
--url https://sandbox-api.billingrails.com/v1/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"external_id": "customer_12345",
"type": "individual",
"name": "Sarah Johnson",
"email": "sarah.johnson@techstartup.com",
"default_currency": "USD",
"country": "US",
"invoice_settings": {
"number_prefix": "INV",
"grace_period_days": 7,
"net_term_days": 30
},
"preferred_locale": "en",
"metadata": {
"customer_segment": "enterprise",
"signup_source": "website"
}
}'
Copy
{
"account": {
"object": "account",
"id": "acc_9KjL2mN4pQ",
"created_at": "2025-06-04T14:22:15.123Z",
"external_id": "customer_12345",
"type": "individual",
"name": "Sarah Johnson",
"email": "sarah.johnson@techstartup.com",
"default_currency": "USD",
"country": "US",
"invoice_settings": {
"number_prefix": "INV",
"grace_period_days": 7,
"net_term_days": 30
},
"preferred_locale": "en",
"metadata": {
"customer_segment": "enterprise",
"signup_source": "website"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.