Can I see requests and responses in various cases?

Published on · Updated on

Can I see requests and responses in various cases?

Yes. The API reference includes a request and response example for every endpoint. Here are the most common cases.

SEPA credit transfer (SCT)

curl -X POST https://api.generatesepa.com/api/v2/sct \
  -u "YOUR_API_KEY:" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Services Ltd",
    "iban": "IE29AIBK93115212345678",
    "payments": [{
      "name": "Murphy Supplies Ltd",
      "iban": "IE64IRCE92050112345678",
      "amount": 125000,
      "date": "2026-12-05",
      "description": "Invoice F-2026-311",
      "reference": "PAY-311"
    }]
  }'

amount is in cents (125000 = €1,250.00). Optional field: reason, with salary (payroll, code SALA) or pension (code PENS); without it, the file uses the code OTHR.

SEPA direct debit, CORE or B2B (SDD)

Same structure on /api/v2/sdd, with sepa_identifier (your Creditor Identifier) at the top level and a debits array. Each debit adds mandate_reference (the UMR) and mandate_signature (the date the mandate was signed, YYYY-MM-DD). The scheme field defaults to CORE; send B2B for a business-to-business direct debit.

The generated file always uses the sequence type RCUR, including the first collection on a mandate: EPC rules have allowed this since November 2016.

Several dates in one call

If your operations have different dates, the API groups them by date: one file, with one payment block (PmtInf) per date.

Successful response (201)

{
  "id": 701,
  "format": "SCT",
  "file": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4K...",
  "operations": 1,
  "amount": 125000,
  "name": "Acme Services Ltd",
  "sepa_identifier": null,
  "created_at": 1764892800
}

file holds the Base64-encoded XML and created_at is a Unix timestamp.

Errors

  • 401: missing or wrong API key (HTTP Basic authentication rejected), or an account without an active subscription. In the latter case, the body is {"error": "..."}.
  • 422: invalid data. The body contains errors, with one message per problem found (invalid IBAN, missing description, mandate date in the future, and so on).
{
  "errors": ["El adeudo para John Smith tiene un IBAN inválido"]
}

Validation messages are currently written in Spanish.

Conclusion

Start from the example closest to your case, test it with a single operation, then send the full batch.


Frequently Asked Questions

What unit should amounts be in?
Cents, as an integer: 2599 means €25.99. The response returns the total amount in the same unit.
What does a 422 error mean?
One or more operations are invalid (wrong IBAN, missing description, mandate date in the future, and so on). The response body lists each problem in the errors field; fix them and send the request again.
Which sequence type do the generated direct debits use?
Always RCUR, including the first collection on a mandate. Since November 2016, the EPC SEPA Core Direct Debit rules no longer require FRST.

Read the API documentation

Try it now →
Was this article helpful?

Related articles