TagadaPay API Introduction
The TagadaPay 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 URLs
The TagadaPay API is available in multiple environments:| Environment | Base URL | Description |
|---|---|---|
| Production | https://app.tagadapay.com/ | Live environment for production traffic |
| Development | https://app.tagadapay.dev/ | Testing environment with sandbox data |
| Local | http://app.localhost:3000/ | Local development environment |
Authentication
The TagadaPay API uses API keys to authenticate requests. You can view and manage your API keys in the TagadaPay Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Authentication to the API is performed via HTTP Bearer Authentication. Provide your API key as the bearer token value:Rate Limits
The TagadaPay API implements rate limiting to ensure fair usage and maintain service quality:| Plan | Requests per Minute | Burst Limit |
|---|---|---|
| Standard | 100 | 150 |
| Premium | 500 | 750 |
429 Too Many Requests response with details about when you can retry.
Request Format
The API accepts JSON-encoded request bodies for POST and PUT requests. Make sure to set theContent-Type header to application/json:
Response Format
All responses are returned in JSON format. Successful responses will have a2xx status code, while errors will have 4xx or 5xx status codes with additional error information.
Success Response
Error Response
Errors
TagadaPay uses conventional HTTP response codes to indicate the success or failure of an API request. In general:2xxcodes indicate success4xxcodes indicate an error that failed given the information provided5xxcodes indicate an error with TagadaPay’s servers
Common Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | The request was unacceptable, often due to missing a required parameter |
| 401 | Unauthorized | No valid API key provided |
| 402 | Request Failed | The parameters were valid but the request failed |
| 403 | Forbidden | The API key doesn’t have permissions to perform the request |
| 404 | Not Found | The requested resource doesn’t exist |
| 409 | Conflict | The request conflicts with another request |
| 429 | Too Many Requests | Too many requests hit the API too quickly |
| 500, 502, 503, 504 | Server Errors | Something went wrong on TagadaPay’s end |
Idempotency
The TagadaPay API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is especially useful when an API call is interrupted and you don’t know whether it was successful. To perform an idempotent request, provide an additionalIdempotency-Key header to the request:
Webhooks
TagadaPay can send webhook events that notify your application when events happen in your account. Webhooks are particularly useful for asynchronous events like when a customer’s bank confirms a payment, a customer disputes a charge, or a recurring payment succeeds.Setting up Webhooks
- Create a webhook endpoint on your server
- Register the endpoint URL in your TagadaPay Dashboard
- Handle the webhook events in your application
Webhook Security
TagadaPay signs the webhook events it sends to your endpoints by including a signature in each event’s headers. This allows you to verify that the events were sent by TagadaPay, not by a third party.SDKs and Libraries
TagadaPay provides official SDKs for JavaScript/TypeScript development:Plugin SDK
bash npm install @tagadapay/plugin-sdk
React SDK for building custom pluginsPlugin CLI
bash npm install -g @tagadapay/plugin-cli
CLI tool for deploying and managing pluginsTesting
Use the development environment (https://app.tagadapay.dev/) for testing your integration. This environment uses test data and will not process real payments.
Test API Keys
Test API keys are available in your dashboard and are prefixed withtest_. These keys will only work in the development environment.
Test Data
The development environment provides various test scenarios:- Successful payments
- Failed payments with different error codes
- Webhook event testing
- Subscription lifecycle testing
Need Help?
- Email Support: api-support@tagadapay.com
- Documentation: Browse our comprehensive API reference
- Status Page: Check our system status and uptime
