- https://business.yoursafe.com
POST https://business.yoursafe.com/mass-payment-api/upload
content-type: application/json
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
][
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]const response = await fetch("https://business.yoursafe.com/mass-payment-api/upload", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify(
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
),
});from urllib.request import Request, urlopen
request = Request(
"https://business.yoursafe.com/mass-payment-api/upload",
data="""
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
""".encode(),
headers={
"content-type": "application/json",
},
method="POST",
)
response = urlopen(request)// POST https://business.yoursafe.com/mass-payment-api/upload
$url = "https://business.yoursafe.com/mass-payment-api/upload";
$body = <<<'JSON'
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
JSON;// POST https://business.yoursafe.com/mass-payment-api/upload
String url = "https://business.yoursafe.com/mass-payment-api/upload";
String body = """
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
""";/mass-payment-api/uploadUploading mass payments via this API requires basic HTTP authentication. For this authentication you need to generate API key.
Uploaded mass payment is JSON containing list of dictionaries, each dictionary representing one transfer.
Please note that there is a limit of 5,000 unconfirmed instructions. If this limit is reached, the API will not accept more instructions, until the current ones are processed by Yoursafe user.
Response
A valid request is answered with 200 OK and {"success": true}. The instructions are only created, not executed -
they have to be approved in Yoursafe Business under Make transfer -> API mass payment.
Rejected requests are answered with 400 Bad Request. The body maps every failing instruction to its field errors,
where item #1 is the first instruction of the request, for example {"item #1": {"amount": ["Too low amount."]}}.
Errors that are not tied to a single instruction, such as exceeding the limit of unconfirmed instructions, are returned
as a list of messages instead.
Request bodyrequired
application/json · array
aba_routing_codestringAmerican Bankers Association routing code. Methods: ACH
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: N/AACH: <= 9, requiredUS_CHECK: N/A
amountstringrequired- Payment amount with maximum of 2 decimal places.
- Minimum amount is 0.50 EUR, 0.50 GBP, 0.50 USD. For any other currency the minimum is the equivalent of the minimum in your account currency, converted by the current exchange rate. No maximum amount is validated here; the available balance is checked when the mass payment is approved in Yoursafe Business.
beneficiary_accountstringAccount number of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 34, requiredACH: <= 17, requiredUS_CHECK: N/A
beneficiary_alias_tokenstringBeneficiary alias token which can be used instead of IBAN.
Transfer methods:
SEPA: N/AINTERNAL: <= 12, optionalWIRE: N/AACH: N/AUS_CHECK: N/A
beneficiary_citystringCity of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 35, requiredACH: N/AUS_CHECK: <= 35, required
beneficiary_country_codestringCountry of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 2, requiredACH: N/AUS_CHECK: <= 2, required
beneficiary_ibanstringInternational bank account number.
Transfer methods:
SEPA: <= 34, requiredINTERNAL: <= 34, optionalWIRE: N/AACH: N/AUS_CHECK: N/A
beneficiary_namestringName of beneficiary.
Transfer methods:
SEPA: <= 70, requiredINTERNAL: N/AWIRE: <= 70, requiredACH: <= 22, requiredUS_CHECK: <= 70, required
beneficiary_postal_codestringPostal code of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 16, requiredACH: N/AUS_CHECK: <= 16, required
beneficiary_region_statestringRegion of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: N/AACH: N/AUS_CHECK: <= 20, optional
beneficiary_streetstringStreet address of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 70, requiredACH: N/AUS_CHECK: <= 70, required
bic_codestringBank identifier code of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 11, requiredACH: N/AUS_CHECK: N/A
currencystringrequiredCurrency of payment
SEPA- EURINTERNAL- AED, AFN, ARS, AUD, BAM, BDT, BHD, BND, BRL, BWP, BYN, CAD, CHF, CLP, CNY, COP, CZK, DJF, DKK, DOP, EGP, ETB, EUR, GBP, GEL, HKD, HUF, IDR, ILS, INR, ISK, JOD, JPY, KES, KMF, KRW, KWD, KZT, LBP, LKR, MAD, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NOK, NPR, NZD, OMR, PEN, PHP, PKR, PLN, QAR, RON, RSD, RUB, SAR, SEK, SGD, SYP, THB, TND, TRY, TWD, TZS, UAH, USD, VES, XCG, XOF, YER, ZAR, ZMWWIRE- AED, AUD, BHD, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, MAD, MXN, NOK, NZD, PLN, RON, SAR, SEK, SGD, THB, TND, TRY, USD, XCG, ZARACH- USDUS_CHECK- USD
groupstringrequiredYour identifier of group of payments
intermediary_bank_bic_codestringBank identifier code of intermediary bank
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 11, optionalACH: N/AUS_CHECK: N/A
note_for_beneficiarystringNote for beneficiary.
Transfer methods:
SEPA: <= 140, optionalINTERNAL: <= 140, optionalWIRE: <= 63, optionalACH: <= 80, optionalUS_CHECK: <= 80, optional
referencestringrequiredIdentifier of payment. Must be unique to your account.
transfer_methodSEPA | INTERNAL | WIRE | ACH | US_CHECKrequiredSEPA- SEPA transferINTERNAL- Yoursafe transferWIRE- International wireACH- ACH transferUS_CHECK- US check transfer
POST https://business.yoursafe.com/mass-payment-api/validate
content-type: application/json
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
][
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]const response = await fetch("https://business.yoursafe.com/mass-payment-api/validate", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify(
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
),
});from urllib.request import Request, urlopen
request = Request(
"https://business.yoursafe.com/mass-payment-api/validate",
data="""
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
""".encode(),
headers={
"content-type": "application/json",
},
method="POST",
)
response = urlopen(request)// POST https://business.yoursafe.com/mass-payment-api/validate
$url = "https://business.yoursafe.com/mass-payment-api/validate";
$body = <<<'JSON'
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
JSON;// POST https://business.yoursafe.com/mass-payment-api/validate
String url = "https://business.yoursafe.com/mass-payment-api/validate";
String body = """
[
{
"amount": "10.10",
"beneficiary_iban": "NL46ABNA7000001046",
"beneficiary_name": "Jane Doe",
"currency": "EUR",
"group": "mass-payment-group-no-1",
"reference": "test reference",
"transfer_method": "SEPA"
}
]
""";/mass-payment-api/validateValidate data to be uploaded as mass payment. Nothing is created, the request is only checked.
Uploading mass payments via this API requires basic HTTP authentication. For this authentication you need to generate API key.
Uploaded mass payment is JSON containing list of dictionaries, each dictionary representing one transfer.
Please note that there is a limit of 5,000 unconfirmed instructions. If this limit is reached, the API will not accept more instructions, until the current ones are processed by Yoursafe user.
Response
A valid request is answered with 200 OK and {"success": true}, meaning the very same body would be accepted by
upload.
Rejected requests are answered with 400 Bad Request. The body maps every failing instruction to its field errors,
where item #1 is the first instruction of the request, for example {"item #1": {"amount": ["Too low amount."]}}.
Errors that are not tied to a single instruction, such as exceeding the limit of unconfirmed instructions, are returned
as a list of messages instead.
Request bodyrequired
application/json · array
aba_routing_codestringAmerican Bankers Association routing code. Methods: ACH
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: N/AACH: <= 9, requiredUS_CHECK: N/A
amountstringrequired- Payment amount with maximum of 2 decimal places.
- Minimum amount is 0.50 EUR, 0.50 GBP, 0.50 USD. For any other currency the minimum is the equivalent of the minimum in your account currency, converted by the current exchange rate. No maximum amount is validated here; the available balance is checked when the mass payment is approved in Yoursafe Business.
beneficiary_accountstringAccount number of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 34, requiredACH: <= 17, requiredUS_CHECK: N/A
beneficiary_alias_tokenstringBeneficiary alias token which can be used instead of IBAN.
Transfer methods:
SEPA: N/AINTERNAL: <= 12, optionalWIRE: N/AACH: N/AUS_CHECK: N/A
beneficiary_citystringCity of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 35, requiredACH: N/AUS_CHECK: <= 35, required
beneficiary_country_codestringCountry of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 2, requiredACH: N/AUS_CHECK: <= 2, required
beneficiary_ibanstringInternational bank account number.
Transfer methods:
SEPA: <= 34, requiredINTERNAL: <= 34, optionalWIRE: N/AACH: N/AUS_CHECK: N/A
beneficiary_namestringName of beneficiary.
Transfer methods:
SEPA: <= 70, requiredINTERNAL: N/AWIRE: <= 70, requiredACH: <= 22, requiredUS_CHECK: <= 70, required
beneficiary_postal_codestringPostal code of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 16, requiredACH: N/AUS_CHECK: <= 16, required
beneficiary_region_statestringRegion of beneficiary.
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: N/AACH: N/AUS_CHECK: <= 20, optional
beneficiary_streetstringStreet address of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 70, requiredACH: N/AUS_CHECK: <= 70, required
bic_codestringBank identifier code of beneficiary
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 11, requiredACH: N/AUS_CHECK: N/A
currencystringrequiredCurrency of payment
SEPA- EURINTERNAL- AED, AFN, ARS, AUD, BAM, BDT, BHD, BND, BRL, BWP, BYN, CAD, CHF, CLP, CNY, COP, CZK, DJF, DKK, DOP, EGP, ETB, EUR, GBP, GEL, HKD, HUF, IDR, ILS, INR, ISK, JOD, JPY, KES, KMF, KRW, KWD, KZT, LBP, LKR, MAD, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NOK, NPR, NZD, OMR, PEN, PHP, PKR, PLN, QAR, RON, RSD, RUB, SAR, SEK, SGD, SYP, THB, TND, TRY, TWD, TZS, UAH, USD, VES, XCG, XOF, YER, ZAR, ZMWWIRE- AED, AUD, BHD, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, MAD, MXN, NOK, NZD, PLN, RON, SAR, SEK, SGD, THB, TND, TRY, USD, XCG, ZARACH- USDUS_CHECK- USD
groupstringrequiredYour identifier of group of payments
intermediary_bank_bic_codestringBank identifier code of intermediary bank
Transfer methods:
SEPA: N/AINTERNAL: N/AWIRE: <= 11, optionalACH: N/AUS_CHECK: N/A
note_for_beneficiarystringNote for beneficiary.
Transfer methods:
SEPA: <= 140, optionalINTERNAL: <= 140, optionalWIRE: <= 63, optionalACH: <= 80, optionalUS_CHECK: <= 80, optional
referencestringrequiredIdentifier of payment. Must be unique to your account.
transfer_methodSEPA | INTERNAL | WIRE | ACH | US_CHECKrequiredSEPA- SEPA transferINTERNAL- Yoursafe transferWIRE- International wireACH- ACH transferUS_CHECK- US check transfer
POST https://business.yoursafe.com/mass-payment-api/create-vouchers
content-type: application/json
{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}const response = await fetch("https://business.yoursafe.com/mass-payment-api/create-vouchers", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify(
{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}
),
});from urllib.request import Request, urlopen
request = Request(
"https://business.yoursafe.com/mass-payment-api/create-vouchers",
data="""
{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}
""".encode(),
headers={
"content-type": "application/json",
},
method="POST",
)
response = urlopen(request)// POST https://business.yoursafe.com/mass-payment-api/create-vouchers
$url = "https://business.yoursafe.com/mass-payment-api/create-vouchers";
$body = <<<'JSON'
{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}
JSON;// POST https://business.yoursafe.com/mass-payment-api/create-vouchers
String url = "https://business.yoursafe.com/mass-payment-api/create-vouchers";
String body = """
{
"amount": "25.00",
"currency": "EUR",
"description": "Affiliate payout October",
"idempotency_key": "b8f1c0de-5d3a-4f7b-9c21-6a0e4d7f1a55"
}
""";/mass-payment-api/create-vouchersCreate a single Yourcash voucher funded from your Yoursafe account. Despite the endpoint name, one request creates exactly one voucher.
Creating vouchers requires basic HTTP authentication with the same
API key as the mass payment endpoints, and has to be enabled
for your account. If it is not, every request is answered with 403 Forbidden.
Response
200 OK is returned both when the voucher was created and when creating it was refused for a business reason, so
always check the success field:
successistrue- the response also containsvoucher_url, the link the recipient opens to redeem the vouchersuccessisfalse- the response containserrorwith the reason, for example insufficient funds
Invalid input is answered with 400 Bad Request and a body mapping each rejected field to a list of messages, for
example {"amount": ["Ensure this value is greater than or equal to 0.50."]}.
When the voucher becomes redeemable
A successful API response does not guarantee that the voucher is immediately redeemable.
The voucher amount is debited from your account as soon as the request succeeds, but the voucher itself is funded by a
separate internal transfer. Until that transfer has been processed, voucher_url already works, yet the voucher shows
a zero balance and cannot be redeemed.
The transfer is usually processed within seconds. It can, however, be held for transaction monitoring, and is then released only once Yoursafe has reviewed it - for as long as that takes, the voucher keeps showing a zero balance. There is no endpoint for querying voucher status.
Idempotency
idempotency_key makes voucher creation safe to retry. It is scoped to your account:
- repeating a request with the same
idempotency_keyand the sameamount,currencyanddescriptionreturns the original voucher, without creating a second voucher and without debiting your account again - reusing an
idempotency_keywith any different value returns200 OKwithsuccessset tofalse
The values are compared after validation: amounts are compared as decimal values, and leading and trailing whitespace
is removed from description. An omitted description, an empty description, and a whitespace-only description
are therefore equivalent.
Currency
Vouchers are issued in EUR. If your account is held in another currency, the EUR amount is converted at the current exchange rate and the converted amount is debited from your account.
Request bodyrequired
application/json
amountstringrequiredMonetary value of the voucher. Min 0.50, Max 2500.00.
currencyEURrequiredEUR- EUR
descriptionstringDescription or note for the voucher. Shown to the recipient when the voucher is redeemed.
idempotency_keystringrequiredUnique key to ensure idempotency of voucher creation requests. Must not be blank; leading and trailing whitespace is stripped. Any other content is accepted, so use a value that is unique in your system, for example a UUID.