X-Merchant-Site-Id and X-Merchant-Secret-Key) on every outgoing API call — you never need to set headers manually.
Get your credentials
You can find your credentials in the Taliup dashboard:1
Open your Taliup dashboard
Log in to your Taliup account and navigate to Settings.
2
Go to Payments
Select Payments from the Settings menu.
3
Copy your credentials
Under Credentials, copy your Merchant Site ID and Merchant Secret Key.
Initialize the client
Pass your credentials when you create a newClient instance. The SDK validates that both values are present at construction time and throws an ApiException immediately if either is missing — so you catch configuration errors before any API call is made.
Configuration options
You can override
base_url to point at a staging environment, or increase timeout for slower network conditions:
How credentials are sent
Under the hood, every request theClient makes includes these HTTP headers:
You never construct or attach these headers yourself — the SDK handles it automatically on every outgoing API call.
Security best practices
- Use environment variables. Store credentials in
.envfiles (excluded from version control via.gitignore), server environment variables, or a secrets manager such as AWS Secrets Manager or HashiCorp Vault. - Restrict access. Only the services that need to call the Taliup API should have access to these credentials.
- Rotate regularly. Periodically rotate your
merchant_secret_keyfrom Settings → Payments → Credentials and update all deployment environments. - Keep the secret key server-side. Never expose credentials to a browser, mobile app, or any client-side code.