Zum Hauptinhalt springen
POST
/
sepa-xml-files
/
generate
cURL
curl -X POST \
 /sepa-xml-files/generate \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "bankAccountId": "ad8f1b9e-2b0a-4b0a-8b0a-4b0a8b0a8b0a",
    "splitPayments": "1",
    "batchBooking": "1"
}'
import requests

url = "https://coreapi.io/sepa-xml-files/generate"

payload = {
"bankAccountId": "ad8f1b9e-2b0a-4b0a-8b0a-4b0a8b0a8b0a",
"splitPayments": True,
"batchBooking": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankAccountId: 'ad8f1b9e-2b0a-4b0a-8b0a-4b0a8b0a8b0a',
splitPayments: true,
batchBooking: true
})
};

fetch('https://coreapi.io/sepa-xml-files/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/sepa-xml-files/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bankAccountId' => 'ad8f1b9e-2b0a-4b0a-8b0a-4b0a8b0a8b0a',
'splitPayments' => true,
'batchBooking' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "message": "No payments to process."
}
{
"data": {
"downloadUrl": "https://example.com/api/media/1/download/1234567890",
"sepaXmlStatement": {
"id": "ad8f7a6d-1b0b-4e1a-8e1a-0b1b0b1b0b1b",
"uploaded": true,
"uniqueMessageId": "COKSDE33XXX-2021-01-01-12-00-00-000000000",
"generatedAt": "2023-11-07T05:31:56Z",
"sepaXmlPayments": [
{
"id": "ad8f1c1e-0b0a-4e1a-8b0a-0b0a4e1a8b0a",
"type": "debit",
"createdAt": "<unknown>",
"dueDate": "2023-11-07T05:31:56Z",
"remittanceInformation": "#Fynn - Debit for invoice 123",
"endToEndId": "Fynn-123",
"amount": 100,
"sepaMandate": {
"id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
"status": "active",
"creditorIdentifier": "<string>",
"mandateReference": "MNDT-2021-0001",
"bankAccount": {
"id": "ad8f0b9c-4b1e-4e0e-8b9c-4b1e4e0e8b9c",
"iban": "DE12500105170648489890",
"bic": "PBNKDEFFXXX",
"accountHolder": "Max Mustermann",
"bankName": "Commerzbank"
},
"sequenceType": "FRST",
"sepaType": "core"
},
"invoice": {
"id": "00000000-0000-0000-0000-000000000000",
"customer": {
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"datevId": "123456789",
"status": "STATUS_ACTIVE"
},
"paymentMethod": {
"id": "c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b",
"default": true,
"status": "active",
"enabled": true,
"name": "Visa (4242)",
"creationDate": "2024-01-15T10:30:00+00:00",
"expirationDate": "2026-12-31T23:59:59+00:00"
},
"type": "TYPE_INVOICE",
"currencyCode": "EUR",
"number": "RE-0000000001",
"finalizationDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"dunningLevel": 123,
"dunningStatus": "none",
"payDate": "2023-11-07T05:31:56Z",
"invoiceAddress": "<unknown>",
"internalNote": "This invoice is with a special discount.",
"netAmount": {},
"grossAmount": {},
"taxAmount": {},
"customFields": {
"field1": "value1",
"field2": "value2"
},
"unpaidAmount": {}
},
"transaction": "<unknown>",
"autoCaptureAt": "2023-11-07T05:31:56Z"
}
],
"mediaId": "ad8f7a6d-1b0b-4e1a-8e1a-0b1b0b1b0b1b"
}
}
}

Autorisierungen

Authorization
string
header
erforderlich

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

The new SepaXmlStatement resource

bankAccountId
string | null

The bank account to generate the SEPA XML for. If not set, the default settings will be used, defined in the sepaXml settings.

Beispiel:

"ad8f1b9e-2b0a-4b0a-8b0a-4b0a8b0a8b0a"

splitPayments
boolean | null

If set to true, each payment will be split into a single SEPA XML file. Some banks shows only one payment transaction for all sepa debits / credits per SEPA XML file, which could be not wanted. If not set, the default settings will be used, defined in the sepaXml settings.

Beispiel:

true

batchBooking
boolean | null

If set to true, all sepa payments will be shown as one transaction on your bank account. Recommendation: Set this to false and use our bank transaction synchronization to get the best results.

Advantages of using the bank account synchronization:

  • more accurate payment status and payment date
  • correct accounting of the payment
  • declines are handled automatically
  • less manual work

If not set, the default settings will be used, defined in the sepaXml settings.

Beispiel:

true

Antwort

No payments to process

message
string
Beispiel:

"No payments to process."