API Reference

REST API v2.0

The BillDesq API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

https://api.billdesq.com/v2

Authentication

Authenticate your account by including your secret API key in the request header. Do not share your secret keys in publicly accessible areas.

Authorization: Bearer sk_test_...

Core Endpoints

Customers

POST /v2/customers

Creates a new customer object. Useful for tracking recurring billing and saving payment methods.

GET /v2/customers/:id

Retrieves the details of an existing customer.

Charges

POST /v2/charges

To charge a credit card or other payment source, you create a Charge object.

Subscriptions

POST /v2/subscriptions

Creates a new subscription on an existing customer.

DEL /v2/subscriptions/:id

Cancels a customer's subscription immediately.

Error Handling

BillDesq uses conventional HTTP response codes to indicate the success or failure of an API request.

  • 2xx - Success
  • 4xx - Client errors (e.g., missing parameters, failed charge)
  • 5xx - Server errors (rare issues on BillDesq's end)