Theropay offers a set of powerful APIs that help merchants manage their payment processes. These APIs allow you to handle everything from managing payees and setting up payout accounts to tracking and initiating payments.
- Registers a new webhook to receive Payout.
Theropay APIs
Payee
The Payees API allows you to manage your payees easily. You can create new payees, update their information, list all payees, or deactivate them when needed. Each payee can be an individual or a business. This API helps keep track of all your payees in one place. Think of it as your digital address book for payments. It ensures that every transaction is sent to the correct and verified recipient, simplifying the payout process for your application.
Payee Accounts
The Payee Accounts API allows merchants to manage the bank or payout accounts linked to their payees. It enables creating, updating, and retrieving payout account details securely. Each payee can have one or more accounts associated for receiving funds. Use these endpoints to validate account information and ensure smooth disbursements. This API acts as the secure layer between your system and the banks, handling sensitive financial data.
Payouts
The Payouts API allows merchants to send money to their payees securely and efficiently. You can create new payouts, check their status, and cancel them if needed before processing. Each payout is linked to a registered payee and a payout account. The API supports listing all payouts with optional filters like status. Responses include detailed information about the payout, such as amount, currency, and current status. Use this API to manage your outgoing payments in a reliable and predictable way.
Webhooks are automatic messages sent from our system to your server whenever something important happens with a payout.
Think of them like notifications — they instantly let you know when the status of a payout changes.Your server must be able to accept HTTPS POST requests and respond with standard HTTP status codes.
Each webhook payload is delivered in JSON format.
We send a webhook every time a payout moves to a new stage in its lifecycle.
Here are the possible events:
payout.created– A new payout has been created and recorded in the system.payout.processing– The payout is currently being processed.payout.sent– The payout has been sent to the bank or payment provider.payout.completed– The payout was successfully delivered.payout.failed– The payout could not be completed due to an error.payout.cancelled– The payout was cancelled before completion.
These webhook notifications help you track every stage of a payout in real time.
Below are example payloads for each webhook event.
All payloads share a similar structure, with the main difference being the state value and any additional fields such as reasons.
{
"payout_request_id": "PR123456789",
"amount": "100.00",
"currency": "EUR",
"timestamp": "2025-01-09T10:24:15Z",
"state": "created"
}- application/json
- text/json
- application/*+json
Webhook registration details including URL, environment, and events.
- Mock server
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks
- Production server
https://api.theropay.com/v1/webhooks
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string"
}'No response example- Mock server
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks
- Production server
https://api.theropay.com/v1/webhooks
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'No response example- Mock server
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks
- Production server
https://api.theropay.com/v1/webhooks
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://docs.theropay.co/_mock/theropay/docs/reference/api/v1/webhooks \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'