Balance Accounts
Endpoint to create a new account using a Stripe customer ID. Verifies the existence of the customer ID in Stripe before account creation.
Authorizations
Body
stripe_customer_idstringOptionalExample:
cus_HKJ432LKJ12
initial_balancenumber · floatOptional
Responses
201
Account created successfully
application/json
400
Invalid input or Stripe customer ID not found
post
POST /v1/account/create HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"stripe_customer_id": "cus_HKJ432LKJ12",
"initial_balance": 0
}
{
"id": "account123",
"stripe_customer_id": "cus_HKJ432LKJ12",
"balance": 100,
"recharge_settings": {
"autorecharge_enabled": true,
"autorecharge_threshold": 1,
"autorecharge_amount": 1
}
}
Endpoint to retrieve account details.
Authorizations
Path parameters
idstringRequired
Account ID
Responses
200
Account details retrieved successfully
application/json
404
Account not found
get
GET /v1/account/{id} HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Accept: */*
{
"id": "account123",
"stripe_customer_id": "cus_HKJ432LKJ12",
"balance": 100,
"recharge_settings": {
"autorecharge_enabled": true,
"autorecharge_threshold": 1,
"autorecharge_amount": 1
}
}
Endpoint to delete an account. An account can't be deleted if it still has funds.
Authorizations
Path parameters
idstringRequired
Account ID
Responses
204
Account deleted successfully
400
Account cannot be deleted as it still has funds
404
Account not found
delete
DELETE /v1/account/{id} HTTP/1.1
Host: api.example.com
api_key: YOUR_API_KEY
Accept: */*
No content
Last updated