Batch pay to users via email
curl --request POST \
--url https://api.example.com/payments/email/batch-pay \
--header 'Content-Type: application/json' \
--data '
{
"receivers": [
{
"receiver": "tips@snack.money",
"amount": 1
},
{
"receiver": "user@example.com",
"amount": 0.5
}
]
}
'import requests
url = "https://api.example.com/payments/email/batch-pay"
payload = { "receivers": [
{
"receiver": "tips@snack.money",
"amount": 1
},
{
"receiver": "user@example.com",
"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: 'tips@snack.money', amount: 1},
{receiver: 'user@example.com', amount: 0.5}
]
})
};
fetch('https://api.example.com/payments/email/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"
}Email
Batch pay to users via email
POST
/
payments
/
email
/
batch-pay
Batch pay to users via email
curl --request POST \
--url https://api.example.com/payments/email/batch-pay \
--header 'Content-Type: application/json' \
--data '
{
"receivers": [
{
"receiver": "tips@snack.money",
"amount": 1
},
{
"receiver": "user@example.com",
"amount": 0.5
}
]
}
'import requests
url = "https://api.example.com/payments/email/batch-pay"
payload = { "receivers": [
{
"receiver": "tips@snack.money",
"amount": 1
},
{
"receiver": "user@example.com",
"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: 'tips@snack.money', amount: 1},
{receiver: 'user@example.com', amount: 0.5}
]
})
};
fetch('https://api.example.com/payments/email/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
⌘I