Skip to main content
Sepa JS XML supports two primary SEPA payment types: credit transfers and direct debits. Each type serves different use cases and uses different PAIN message formats.

Credit transfers (pain.001)

Credit transfers are outgoing payments where you transfer money from your account to another account. These are commonly used for:
  • Paying suppliers and vendors
  • Employee salary payments
  • One-time or recurring transfers
  • Batch payment processing
Credit transfers use the pain.001 message format and are identified by the payment method code TRF.

Key characteristics

Debtor initiates

You (the debtor) initiate the payment from your account

Immediate execution

Payments execute on the requested execution date

No mandate required

No authorization needed from the recipient

BIC optional

BIC code is optional for SEPA payments

When to use credit transfers

Use credit transfers when:
  • You need to send money to another party
  • You have one-time or ad-hoc payments
  • You’re processing payroll or vendor payments
  • You want immediate control over payment timing

Direct debits (pain.008)

Direct debits are incoming payments where you collect money from another account. These are commonly used for:
  • Subscription and membership fees
  • Recurring utility bills
  • Automatic loan repayments
  • Invoice collections
Direct debits use the pain.008 message format and are identified by the payment method code DD.

Key characteristics

Creditor initiates

You (the creditor) pull money from the debtor’s account

Collection date

Payments collect on the specified collection date

Mandate required

Requires a signed mandate from the debtor

Sequence types

Supports FRST, RCUR, OOFF, and FNAL sequences

When to use direct debits

Use direct debits when:
  • You need to collect payments from customers
  • You have recurring subscription payments
  • You want to automate payment collection
  • You have customer authorization (mandate)

Comparing payment types

Credit transfer: You send money out (push payment)Direct debit: You collect money in (pull payment)
Credit transfer: Debtor account, creditor account, amount, execution dateDirect debit: Creditor account, debtor account, amount, collection date, mandate ID, mandate signature date
Credit transfer: pain.001.001.02, pain.001.003.02, pain.001.001.03, pain.001.003.03Direct debit: pain.008.001.01, pain.008.003.01, pain.008.001.02, pain.008.003.02
Credit transfer: No authorization needed from recipientDirect debit: Requires signed mandate from debtor

Code example

Here’s how to specify the payment type:
import { createSepaXML } from 'sepa-js-xml';

const xml = createSepaXML({
  painVersion: "pain.001.001.03", // Credit transfer format
  id: "MSG001",
  creationDate: new Date(),
  initiatorName: "My Company",
  positions: [{
    id: "PMT001",
    name: "My Company",
    iban: "DE02701500000000594937",
    requestedExecutionDate: new Date(),
    payments: [{
      id: "TXN001",
      name: "Supplier Ltd",
      iban: "DE89370400440532013000",
      amount: 150.00,
      remittanceInformation: "Invoice 12345",
      end2endReference: "INV12345"
    }]
  }]
});
The payment type is automatically determined by the painVersion you specify. Use pain.001.* for credit transfers and pain.008.* for direct debits.

Next steps

Credit transfers

Learn how to create credit transfer payments

Direct debits

Learn how to create direct debit payments

PAIN versions

Explore all supported PAIN format versions

Examples

View complete real-world examples

Build docs developers (and LLMs) love