Skip to content
Last updated

Common Patterns & Conventions

This section explains the recurring patterns and conventions used across the Theropay API. Understanding these will help you interact with the API more predictably and efficiently.

Connection Requirements

1. Secure Connections (HTTPS)

All communication with the Theropay API must be encrypted via HTTPS. Any requests made over HTTP will be rejected.

2. Content Type

For any request that sends data to the server POST, PUT, PATCH you must include the following header:

Header NameUsageValueRequired
AuthorizationUsed to authenticate API requests with your API key or token.Bearer YOUR_API_KEYYes
Content-TypeDefines the format of the request body.application/jsonYes (for POST, PUT, PATCH)
AcceptIndicates the response format the client expects.application/jsonRecommended
X-Request-IDA unique, client-generated identifier for request tracing.Any unique stringNo