Skip to main content
Welcome to the Pursar Developer API reference. The Pursar API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Environments & Base URLs

Pursar provides two environments: a risk-free Sandbox for development and testing, and a Live Production environment.
All requests must be made over HTTPS. Calls made over plain HTTP will fail. You do not need to append trailing slashes to URLs.

Authentication

Pursar follows the Stripe-standard HTTP Basic Authentication scheme. You authenticate to the API by providing one of your API secret keys:
  • Basic Authentication (Recommended): Pass your Secret Key as the username with an empty password (-u sk_test_...:).
  • Bearer Token: Pass your Secret Key in the standard HTTP Authorization header (Authorization: Bearer sk_test_...).
  • Custom Header: Pass your Secret Key in the x-api-key header (x-api-key: sk_test_...).
cURL

Key Prefixes


HTTP Status Codes

Pursar uses conventional HTTP response codes to indicate the success or failure of an API request:

Error Handling

When an error occurs, Pursar returns an error object following Stripe standard conventions:

Idempotency

Pursar supports idempotency for safely retrying requests without accidentally performing the same operation twice. To perform an idempotent request, provide an Idempotency-Key: <key> header with a unique UUID or transaction reference.