Last updated 1 year ago
Endpoint to delete an account. An account can't be deleted if it still has funds.
Account ID
DELETE /v1/account/{id} HTTP/1.1 Host: api.example.com api_key: YOUR_API_KEY Accept: */*
Account deleted successfully
No content
Endpoint to retrieve account details.
GET /v1/account/{id} HTTP/1.1 Host: api.example.com api_key: YOUR_API_KEY Accept: */*
Account details retrieved successfully
{ "id": "account123", "stripe_customer_id": "cus_HKJ432LKJ12", "balance": 100, "recharge_settings": { "autorecharge_enabled": true, "autorecharge_threshold": 1, "autorecharge_amount": 1 } }
Endpoint to create a new account using a Stripe customer ID. Verifies the existence of the customer ID in Stripe before account creation.
cus_HKJ432LKJ12
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 }
Account created successfully