Get a batch
curl --request GET \
--url https://api.mansa.xyz/api/v2/payouts/{batchId} \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.mansa.xyz/api/v2/payouts/{batchId}"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.mansa.xyz/api/v2/payouts/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_CONFIRMATION",
"total_count": 123,
"completed_count": 123,
"failed_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_reference": "<string>"
},
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"beneficiary_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fee_type": "OUR",
"purpose_code": "SNTR",
"beneficiary_amount": "<string>",
"beneficiary_currency": "<string>",
"source_currency": "USDT",
"status": "DRAFT",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fee_amount": "<string>",
"source_amount": "<string>",
"failure_message": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"client_reference": "<string>"
}
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Sender not found"
}{
"statusCode": 429,
"message": "Too many requests"
}{
"statusCode": 500,
"message": "Internal server error"
}Orders & Batches
Get a batch
The batch’s rollup status plus every order in it — poll this until every order reaches a terminal status.
GET
/
api
/
v2
/
payouts
/
{batchId}
Get a batch
curl --request GET \
--url https://api.mansa.xyz/api/v2/payouts/{batchId} \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.mansa.xyz/api/v2/payouts/{batchId}"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.mansa.xyz/api/v2/payouts/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_CONFIRMATION",
"total_count": 123,
"completed_count": 123,
"failed_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_reference": "<string>"
},
"orders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"beneficiary_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fee_type": "OUR",
"purpose_code": "SNTR",
"beneficiary_amount": "<string>",
"beneficiary_currency": "<string>",
"source_currency": "USDT",
"status": "DRAFT",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fee_amount": "<string>",
"source_amount": "<string>",
"failure_message": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"client_reference": "<string>"
}
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Sender not found"
}{
"statusCode": 429,
"message": "Too many requests"
}{
"statusCode": 500,
"message": "Internal server error"
}Authorizations
API key for authentication
ES256 JWT signed by the private key registered to the API key above. Claims: sub (=API key), uri, nbf, iat, exp, and bodyHash (HMAC-SHA512 of uri + rawBody + nbf using a shared secret, base64).
Path Parameters
ID of the batch

