Skip to main content
POST
/
payments
/
x
/
batch-pay
Batch pay to X users
curl --request POST \
  --url https://api.example.com/payments/x/batch-pay \
  --header 'Content-Type: application/json' \
  --data '
{
  "receivers": [
    {
      "receiver": "snackmoneyapp",
      "amount": 1
    },
    {
      "receiver": "anotheruser",
      "amount": 0.5
    }
  ]
}
'
import requests

url = "https://api.example.com/payments/x/batch-pay"

payload = { "receivers": [
{
"receiver": "snackmoneyapp",
"amount": 1
},
{
"receiver": "anotheruser",
"amount": 0.5
}
] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
receivers: [{receiver: 'snackmoneyapp', amount: 1}, {receiver: 'anotheruser', amount: 0.5}]
})
};

fetch('https://api.example.com/payments/x/batch-pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "code": 200,
  "data": [
    {
      "txn_id": 1751194593304,
      "username": "snackmoney",
      "receipt": "https://snack.money/transaction/1751194593304"
    }
  ],
  "msg": "Payment sent successfully to users",
  "settlement_attempt_id": "attempt_1762889082833_abc123"
}
{
"code": 400,
"msg": "Validation failed",
"error": null
}
{
"code": 402,
"accepts": [
{
"maxAmountRequired": "1030000",
"extra": {
"name": "USD Coin",
"version": "2"
},
"scheme": "exact",
"network": "base",
"resource": "https://snack.money",
"description": "<string>",
"mimeType": "<string>",
"payTo": "0x1223d566f05Ea54E5854434C4552c9f5C2259e0f",
"maxTimeoutSeconds": 60,
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"x402Version": 1,
"msg": "PAYMENT-SIGNATURE header is required"
}
{
"code": 500,
"msg": "Internal server error",
"error": "Something went wrong"
}

Body

application/json
receivers
object[]
required
Required array length: 1 - 100 elements
currency
enum<string>
default:USDC
Available options:
USDC
Example:

"USDC"

description
string | null
Example:

"A description about the payment"

meta
object

Response

Success

code
enum<number>
required
Available options:
200
data
object[]
required
msg
string
default:Payment sent successfully to users
settlement_attempt_id
string
Example:

"attempt_1762889082833_abc123"