Create bulk collections
This endpoint allows to create up to 5000 collections with a single call. It acts exactly as if you called the POST /v2/collections
endpoint 5000 times yourself, except you don't need to worry about rate limiting. It also allows you to get an aggregated state for this bulk.
This endpoint does not perform the collections synchronously, a 200 OK
response means the bulk will be handled in the near future. You can either poll the GET
endpoint or use the webhooks to follow its progress.
Note that the completion of a bulk does not mean all collections are settled, it only means the collections were initiated (the equivalent of a call to POST /v2/collections
).
POST
/v2/collections/bulks
curl \
--request POST 'https://api.memo.bank/v2/collections/bulks' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"collections":[{"amount":500,"mandate":{"reference":"ABC123DEF","scheme":"core","signature_date":"2022-12-01","debtor":{"name":"John Doe","iban":"FR2512739000308553756377J95","address":{"street":"rue de la Boétie","building_number":"42","postal_code":"75008","city":"Paris","country":"FR"}},"contract_reference":"CUST-1234"},"scheduled_date":"2022-12-05","local_iban":"FR6430003000509825397888D64","message":"invoice no12345","end_to_end_id":"b0bfb42baa2642c2af0ca3e880fcd590","internal_note":"phone bill","custom_id":"637406efda8534de8c0e","custom_metadata":"This is some metadata"}]}'
Request examples
{
"collections": [
{
"amount": 500,
"mandate": {
"reference": "ABC123DEF",
"scheme": "core",
"signature_date": "2022-12-01",
"debtor": {
"name": "John Doe",
"iban": "FR2512739000308553756377J95",
"address": {
"street": "rue de la Boétie",
"building_number": "42",
"postal_code": "75008",
"city": "Paris",
"country": "FR"
}
},
"contract_reference": "CUST-1234"
},
"scheduled_date": "2022-12-05",
"local_iban": "FR6430003000509825397888D64",
"message": "invoice no12345",
"end_to_end_id": "b0bfb42baa2642c2af0ca3e880fcd590",
"internal_note": "phone bill",
"custom_id": "637406efda8534de8c0e",
"custom_metadata": "This is some metadata"
}
]
}
Response examples (200)
{
"id": "fe98f29d-5165-45ff-83f9-d7aa83e970b5",
"collections_total": 3000,
"collections_confirmed": 1552,
"collections_canceled": 2,
"collections_failed": 57,
"status": "pending"
}