Introduction
Welcome to the Merit Payout API.
This is the V2 version of documentation. V1 can be found here. V1 doesn't support multiple payout providers and is no longer supported for new clients.
Authentication
Merit currently supports two authentication methods:
- OAuth 2.0 (recommended for new integrations): Token-based access using the Client Credentials flow.
- Legacy Secret Key (deprecated but still supported): Static key-based access for older integrations.
OAuth 2.0 is fully backward compatible. Existing integrations using the legacy secret key will continue to work without interruption.
OAuth 2.0 Authentication (Recommended)
Use the following endpoint to generate an access token:
POST https://api.sandbox.meritincentives.com/identity/v1/oauth2/token
Generate Access Token
curl --location 'https://api.sandbox.meritincentives.com/identity/v1/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'grant_type=client_credentials'
Response example
{
"access_token": "your-access-token",
"token_type": "Bearer",
"expires_in": 86400
}
OAuth Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| client_id | true | string | Client ID provided by Merit during onboarding. |
| client_secret | true | string | Client secret provided by Merit during onboarding. |
| grant_type | true | string | Must be client_credentials. |
OAuth Response Parameters
| Parameter | Type | Description |
|---|---|---|
| access_token | string | Token used for API authorization. |
| token_type | string | Token type. |
| expires_in | integer | Token lifetime in seconds. |
Use Token in API Calls
All API requests must include the token in the Authorization header:
Authorization: Bearer <TOKEN>
Sample API call with
Authorizationheader
curl "{{BaseURL}}/path/to/resource" \
-H "Authorization: Bearer <TOKEN>"
Token Caching Best Practice
- Cache the token and its expiration (
expires_in) in your application. - Reuse the cached token for subsequent API calls.
- Request a new token only when the current one is expired or close to expiration.
Upgrade to OAuth 2.0
To enable OAuth 2.0 credentials (client_id and client_secret), contact the Merit Tech Team.
Legacy Secret Key Authentication
Legacy secret key authentication remains operational for existing integrations, but is deprecated for new integrations.
Use the legacy key in the same header format:
Authorization: Bearer <SECRET_KEY>
Base URL
Base URL for Merit API endpoints
| Description | URL |
|---|---|
| Staging | https://api.sandbox.meritincentives.com/payouts |
| Prod | https://api.meritincentives.com/payouts |
| Content-Type | application/json |
| Authorization | Bearer <TOKEN> |
Get Payout Providers
GET {host}/v2/payout-providers
This API lets you get available payout providers, their required beneficiary identifiers, and their required sender fields.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <TOKEN> |
Response
Payout Providers JSON structured like this:
[
{
"name": "paypal",
"beneficiary_identifiers": [
{ "id": "email", "name": "Email" }
],
"sender_fields": []
},
{
"name": "revolut",
"beneficiary_identifiers": [
{ "id": "first_name", "name": "First Name" },
{ "id": "last_name", "name": "Last Name" },
{ "id": "revtag", "name": "Revolut Tag" }
],
"sender_fields": []
},
{
"name": "wechat",
"beneficiary_identifiers": [
{ "id": "phone_number", "name": "Phone Number" },
{ "id": "first_name", "name": "First Name" },
{ "id": "last_name", "name": "Last Name" }
],
"sender_fields": [
{ "id": "first_name", "name": "First Name" },
{ "id": "last_name", "name": "Last Name" },
{ "id": "date_of_birth", "name": "Date of Birth" },
{ "id": "country_of_birth_iso_code", "name": "Country of Birth" },
{ "id": "nationality_country_iso_code", "name": "Nationality" }
]
},
{
"name": "alipay",
"beneficiary_identifiers": [
{ "id": "phone_number", "name": "Phone Number" },
{ "id": "first_name", "name": "First Name" },
{ "id": "last_name", "name": "Last Name" }
],
"sender_fields": []
}
]
| Field | Description | Type |
|---|---|---|
| name | The name of the payout provider | string |
| beneficiary_identifiers | Array of required identifiers for the provider | array |
| sender_fields | Array of required client-supplied sender fields, each with an id and display name. Empty when sender information is not required. |
array |
For field requirements, see Beneficiary Identifier Fields and Sender Fields. Use the returned sender field IDs as keys in the payout's top-level sender object.
Possible Error Codes
The following are the error codes possible on the Get Providers API. For detailed descriptions, see Errors.
| Error Code | HTTP code |
|---|---|
| NOT_AUTHORIZED | 401 |
| NO_ACCESS | 403 |
| METHOD_NOT_ALLOWED | 405 |
| THROTTLED | 429 |
| CONFIGURATION_ERROR | 500 |
| INTERNAL_SERVER_ERROR | 500 |
Create payout
POST {host}/v2/payouts
This API let you create payout.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <TOKEN> |
Request body
Create Payout JSON structured like this:
{
"reference_id": "63a641f6-4215-43da-b1d9-d59b99be8d40",
"currency": "GBP",
"amount": "100.00",
"beneficiary": {
"provider": "paypal",
"identifiers": {
"email": "recipient@email.com"
}
}
}
| Field | Description | Type | Required |
|---|---|---|---|
| amount | The amount to be paid out. This field contains a numeric value with up to two decimal places. The minimum allowable value is 0.01, and the maximum allowable value is 5,000. | string | true |
| currency | The currency code in ISO 4217 format (e.g., USD for U.S. Dollars, EUR for Euros) | string | true |
| beneficiary | Object containing the beneficiary information including provider and identifiers | object | true |
| beneficiary.provider | The name of the payout provider to be used for the transaction, specified in lowercase. Use the payout-providers endpoint to see available providers | string | true |
| beneficiary.identifiers | Object containing the beneficiary identifiers corresponding to beneficiary.provider. See Beneficiary Identifier Fields for details. | object | true |
| sender | Information about the actual individual sender. Required when the selected provider returns a nonempty sender_fields list; otherwise omit. See Sender Fields. |
object | Depends on provider |
| reference_id | A unique reference identifier for the transaction, used for tracking and reconciliation. This field must be unique for each transaction and is limited to a maximum length of 255 characters | string | true |
How to Use Beneficiary Identifiers
The beneficiary.identifiers object should contain the required fields for your chosen provider. See Beneficiary Identifier Fields for detailed field requirements.
Example Revolut beneficiary identifiers:
{
"beneficiary": {
"provider": "revolut",
"identifiers": {
"first_name": "John",
"last_name": "Doe",
"revtag": "john.doe"
}
}
}
Example PayPal beneficiary identifiers:
{
"beneficiary": {
"provider": "paypal",
"identifiers": {
"email": "test@example.com"
}
}
}
WeChat payout with sender information
This example uses a WeChat provider configured with the five sender fields shown in the discovery response above. Provide those fields in a top-level sender object, separate from the beneficiary. Use your provider’s returned sender_fields to determine the required fields.
Complete WeChat payout request:
{
"reference_id": "WECHAT-20260910-0001",
"currency": "CNY",
"amount": "100.00",
"beneficiary": {
"provider": "wechat",
"identifiers": {
"phone_number": "+8613800138100",
"first_name": "Mei",
"last_name": "Wang"
}
},
"sender": {
"first_name": "Alex",
"last_name": "Morgan",
"date_of_birth": "1985-06-15",
"country_of_birth_iso_code": "GBR",
"nationality_country_iso_code": "GBR"
}
}
Missing or invalid sender information returns HTTP 400 (INVALID_REQUEST) before a payout is created or funds are deducted.
Response
Create Payout JSON response structured like this:
{
"id": "550e8400-e29b-41d4-a716-446655440",
"currency": "GBP",
"amount": "100.00",
"beneficiary": {
"provider": "paypal",
"identifiers": {
"email": "recipient@email.com"
}
},
"status": "initiated",
"status_code": "success",
"reference_id": "63a641f6-4215-43da-b1d9-d59b99be8d40",
"status_details": {
"message": ""
},
"created_at": 1741088732,
"updated_at": 1741088733
}
| Field | Description | Type |
|---|---|---|
| id | Payout ID | string |
| currency | The currency code in ISO 4217 format (e.g., USD for U.S. Dollars, EUR for Euros) | string |
| amount | The amount to be paid out | string |
| beneficiary | Object containing the beneficiary information including provider and identifiers | object |
| beneficiary.provider | The name of the payout provider used for the transaction | string |
| beneficiary.identifiers | Object containing the beneficiary identifiers corresponding to beneficiary.provider. See Beneficiary Identifier Fields for details. | object |
| status | PayoutStatus | string |
| status_code | PayoutStatusCode | string |
| reference_id | Reference ID used to create payout | string |
| status_details | StatusDetails | object |
| created_at | The timestamp when the payout was created | int |
| updated_at | The timestamp of the last update to the payout | int |
Possible Error Codes
The following are the error codes possible on the Create Payout API. For detailed descriptions, see Errors.
| Error Code | HTTP code |
|---|---|
| INVALID_REQUEST | 400 |
| DUPLICATE_REFERENCE_ID | 400 |
| LIMIT_EXCEEDED | 400 |
| PROVIDER_NOT_FOUND | 400 |
| CURRENCY_MISMATCH | 400 |
| INVALID_BENEFICIARY_IDENTIFIERS | 400 |
| BENEFICIARY_NOT_FOUND | 400 |
| BENEFICIARY_BLOCKED | 400 |
| NOT_AUTHORIZED | 401 |
| PAYMENT_FAILED | 402 |
| INSUFFICIENT_FUNDS | 402 |
| NO_ACCESS | 403 |
| METHOD_NOT_ALLOWED | 405 |
| THROTTLED | 429 |
| CONFIGURATION_ERROR | 500 |
| INTERNAL_SERVER_ERROR | 500 |
Get payout
GET {host}/v2/payouts/{id}
This API lets you get payout by ID.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <TOKEN> |
Request fields
| Field | Description | Type | Required |
|---|---|---|---|
| id | Payout ID | string | true |
Response
Get Payout JSON structured like this:
{
"id": "550e8400-e29b-41d4-a716-446655440",
"currency": "GBP",
"amount": "100.00",
"beneficiary": {
"provider": "paypal",
"identifiers": {
"email": "recipient@email.com"
}
},
"status": "initiated",
"status_code": "success",
"reference_id": "63a641f6-4215-43da-b1d9-d59b99be8d40",
"status_details": {
"message": ""
},
"created_at": 1741088732,
"updated_at": 1741088733
}
| Field | Description | Type |
|---|---|---|
| id | Payout ID | string |
| currency | The currency code in ISO 4217 format (e.g., USD for U.S. Dollars, EUR for Euros) | string |
| amount | The amount to be paid out | string |
| beneficiary | Object containing the beneficiary information including provider and identifiers | object |
| beneficiary.provider | The name of the payout provider used for the transaction | string |
| beneficiary.identifiers | Object containing the beneficiary identifiers corresponding to beneficiary.provider. See Beneficiary Identifier Fields for details. | object |
| status | PayoutStatus | string |
| status_code | PayoutStatusCode | string |
| reference_id | Reference ID used to create payout | string |
| status_details | StatusDetails | object |
| created_at | The timestamp when the payout was created | int |
| updated_at | The timestamp of the last update to the payout | int |
Possible Error Codes
The following are the error codes possible on the Get payout API. For detailed descriptions, see Errors.
| Error Code | HTTP code |
|---|---|
| NOT_AUTHORIZED | 401 |
| NO_ACCESS | 403 |
| NOT_FOUND | 404 |
| METHOD_NOT_ALLOWED | 405 |
| THROTTLED | 429 |
| CONFIGURATION_ERROR | 500 |
| INTERNAL_SERVER_ERROR | 500 |
Cancel payout
POST {host}/v2/payouts/{id}/cancel
This API lets you cancel a payout. Cancellation is available only for payouts in statuses PROCESSING and PENDING_CLAIM.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <TOKEN> |
Request fields
| Field | Description | Type | Required |
|---|---|---|---|
| id | Payout ID | string | true |
Response
Cancel Payout JSON structured like this:
{
"id": "550e8400-e29b-41d4-a716-446655440",
"currency": "GBP",
"amount": "100.00",
"beneficiary": {
"provider": "paypal",
"identifiers": {
"email": "recipient@email.com"
}
},
"status": "canceled",
"status_code": "success",
"reference_id": "63a641f6-4215-43da-b1d9-d59b99be8d40",
"status_details": {
"message": ""
},
"created_at": 1741088732,
"updated_at": 1741088733
}
| Field | Description | Type |
|---|---|---|
| id | Payout ID | string |
| currency | The currency code in ISO 4217 format (e.g., USD for U.S. Dollars, EUR for Euros) | string |
| amount | The amount to be paid out | string |
| beneficiary | Object containing the beneficiary information including provider and identifiers | object |
| beneficiary.provider | The name of the payout provider used for the transaction | string |
| beneficiary.identifiers | Object containing the beneficiary identifiers corresponding to beneficiary.provider. See Beneficiary Identifier Fields for details. | object |
| status | PayoutStatus | string |
| status_code | PayoutStatusCode | string |
| reference_id | Reference ID used to create payout | string |
| status_details | StatusDetails | object |
| created_at | The timestamp when the payout was created | int |
| updated_at | The timestamp of the last update to the payout | int |
Possible Error Codes
The following are the error codes possible on the Cancel payout API. For detailed descriptions, see Errors.
| Error Code | HTTP code |
|---|---|
| CANNOT_CANCEL_PAYOUT | 400 |
| PROVIDER_CANCELLATION_DISABLED | 400 |
| NOT_AUTHORIZED | 401 |
| NO_ACCESS | 403 |
| NOT_FOUND | 404 |
| METHOD_NOT_ALLOWED | 405 |
| THROTTLED | 429 |
| CONFIGURATION_ERROR | 500 |
| INTERNAL_SERVER_ERROR | 500 |
| PROVIDER_CANCEL_ERROR | 502 |
Beneficiary Identifier Fields
The beneficiary identifier fields define the information required to identify and process payouts for each provider.
Each provider has different requirements for recipient identification, and these fields must be provided in the beneficiary.identifiers object when creating payouts.
The following table shows the current list of supported fields across various payout providers. We will add new entries to the table as and when we onboard new payout providers.
| Field | Description | Type |
|---|---|---|
| The recipient's email address | string | |
| first_name | The recipient's first name | string |
| last_name | The recipient's last name | string |
| revtag | The recipient's tag | string |
| phone_number | The recipient's phone number in E.164 format (e.g. +8613800138100) |
string |
Sender Fields
The required fields in the payout's top-level sender object come from the selected provider's sender_fields list. Merit validates that the sender is an object containing exactly those fields and that every value is a nonblank string. Leading and trailing whitespace is removed. Field-specific formats are provider requirements and may be rejected asynchronously by the payout provider.
| Field | Description | Type |
|---|---|---|
| first_name | The sender's first name. | string |
| last_name | The sender's last name. | string |
| date_of_birth | Date of birth; WeChat expects YYYY-MM-DD. |
string |
| country_of_birth_iso_code | Country of birth; WeChat expects an ISO 3166-1 alpha-3 code such as GBR. |
string |
| nationality_country_iso_code | Nationality; WeChat expects an ISO 3166-1 alpha-3 code such as GBR. |
string |
Only fields returned in the selected provider’s sender_fields list are accepted.
Status Details
Object provides additional information about certain payout statuses that may require user action or intervention.
| Field | Description | Type |
|---|---|---|
| message | The message contains specific instructions, reasons, or next steps to resolve payment issues. | string |
Payout Status
| Status | Description |
|---|---|
| created | The payout request has been successfully received and recorded in the system. |
| pending_verification | The payout request is awaiting verification. This status will not be visible to clients as the workflow which leads to this status is not enabled for API clients. |
| initiated | The payout has been initiated and is awaiting further processing. |
| processing | The payout is actively being processed by the system. |
| pending_claim | The payout is waiting to be claimed by the recipient. This occurs when the recipient does not have an account with the provider. |
| processed | The payout has been successfully completed, and funds have been transferred to the recipient. This is the terminal status for a successful payout. |
| failed | The payout attempt was unsuccessful, and the transaction was not completed. This could be due to an issue with the payout provider, insufficient funds, or an error in recipient details. This is a terminal status. The client can send a new payout request with a different reference_id. Any funds deducted would be refunded. |
| expired | The payout was not claimed by the recipient within the specified time frame and has expired. This is a terminal status. Any funds deducted would be refunded |
| canceled | The payout request was canceled by either the sender or the system before completion. This is a terminal status. Any funds deducted would be refunded |
| pending_approval | The payout is awaiting approval from an authorized person or system. |
| approved | The payout has been reviewed and approved. |
| declined | The payout request was reviewed and declined, possibly due to verification failures, compliance issues, or other policy restrictions. This is a terminal status. Any funds deducted would be refunded |
Payout Status Code
| Status Code | Description |
|---|---|
| success | Operation completed successfully |
| beneficiary_not_found | The payout provider reported that the beneficiary information is invalid |
| beneficiary_blocked | If we are able to specifically mention that the beneficiary is blocked by the payout provider, we will return this code. |
| insufficient_funds | Client doesn't have enough funds in their account. Ideally, we throw an error in the API call itself on low client funds. The occurrence of this status code is rare |
| provider_error | Provider couldn't process this request |
| unable_to_process | An umbrella status code to represent all the other failures |
Errors
Errors structure
| Field | Description | Type |
|---|---|---|
| code | Error Code | string |
| message | Short description of the error | string |
| details | Optional Object. Error details. | Optional object([string][string]) |
Sender Validation Error Example (HTTP 400):
{
"code": "INVALID_REQUEST",
"message": "Must not be blank.",
"details": {
"field": "body.sender.first_name",
"issue": "Must not be blank."
}
}
Client Error Example:
{
"code": "CANNOT_CANCEL_PAYOUT",
"message": "The payout cannot be canceled as it has reached a status where cancellation is no longer allowed.",
"detail": {}
}
{
"code": "DUPLICATE_REFERENCE_ID",
"message": "The provided reference ID has already been used. Payout: 12",
"details": {
"field": "body.reference_id",
"issue": "The provided reference ID has already been used. Payout: 12"
}
}
{
"code": "INVALID_BENEFICIARY_IDENTIFIERS",
"message": "Invalid beneficiary identifier. Please make sure all required fields are present.",
"details": {}
}
| Error Code | HTTP code | Meaning |
|---|---|---|
| INVALID_REQUEST | 400 | Bad Request -- Your request contains invalid data or parameters. |
| DUPLICATE_REFERENCE_ID | 400 | Bad Request -- The provided reference ID has already been used. Payout: X. |
| LIMIT_EXCEEDED | 400 | Bad Request -- The requested amount exceeds the allowable limit. |
| CANNOT_CANCEL_PAYOUT | 400 | Bad Request -- The payout cannot be canceled as it has reached a status where cancellation is no longer allowed. |
| PROVIDER_NOT_FOUND | 400 | Bad Request -- When the provider sent is not found |
| CURRENCY_MISMATCH | 400 | Bad Request -- The currency specified in the request does not match the expected or allowed currency for the operation. |
| INVALID_BENEFICIARY_IDENTIFIERS | 400 | Bad Request -- When the required identifiers are not sent |
| BENEFICIARY_NOT_FOUND | 400 | Bad Request -- When proper identifiers are sent but the provider says no beneficiary exists with this account. Only returned if we are able to verify the account upfront. Else, you will receive the appropriate failure reason in payout.status_code. |
| BENEFICIARY_BLOCKED | 400 | Bad Request -- When proper identifiers are sent but the provider says the beneficiary is blocked. Only returned if we are able to verify the account upfront. Else, you will receive the appropriate failure reason in payout.status_code. |
| PROVIDER_CANCELLATION_DISABLED | 400 | Bad Request -- Payouts from this provider cannot be canceled once initiated |
| NOT_AUTHORIZED | 401 | Unauthorized -- Authentication credentials were not provided. |
| PAYMENT_FAILED | 402 | Payment Required -- There was an error during payment |
| INSUFFICIENT_FUNDS | 402 | Payment Required -- The account has insufficient funds to fulfill the request. |
| NO_ACCESS | 403 | No Access -- You do not have access to perform this action. |
| NOT_FOUND | 404 | Not Found -- The specified resource could not be found. |
| METHOD_NOT_ALLOWED | 405 | Method Not Allowed -- Method \”X\” not allowed. |
| THROTTLED | 429 | Too Many Requests -- The request has been blocked because the maximum number of allowed requests has been exceeded within a specified time period. Please wait and try again later to avoid further restrictions. |
| CONFIGURATION_ERROR | 500 | Internal Server Error -- A configuration error has occurred. Please contact the development team to resolve this issue. |
| INTERNAL_SERVER_ERROR | 500 | Internal Server Error -- A server error occurred. |
| PROVIDER_CANCEL_ERROR | 502 | Bad Gateway -- The payout cancellation request could not be completed due to an error from the external service provider. Please try again. |