Skip to main content
The PaymentMethod enum represents all payment methods supported by the FacturaE 3.2.2 XSD specification. Each payment method has a unique code used in the XML output.

Enum Cases

The following table lists all 19 payment methods available:
CaseCodeDescriptionRequires IBAN
Cash01Cash paymentNo
DirectDebit02Direct debit from bank accountYes
Receipt03Payment receiptNo
Transfer04Bank transferYes
AcceptedBillOfExchange05Accepted bill of exchangeOptional
DocumentaryCredit06Documentary creditOptional
ContractAward07Contract awardNo
BillOfExchange08Bill of exchangeOptional
TransferablePromissory09Transferable promissory noteOptional
PromissoryNote10Promissory noteOptional
Cheque11ChequeNo
Reimbursement12ReimbursementNo
Special13Special payment methodNo
Setoff14Payment by setoff/compensationNo
Postgiro15PostgiroOptional
CertifiedCheque16Certified chequeNo
BankersDraft17Banker’s draftOptional
CashOnDelivery18Cash on deliveryNo
Card19Credit/debit cardNo

Usage Examples

Cash Payment

use PhpFacturae\Enums\PaymentMethod;

$invoice = new Invoice();
// ... configure invoice

$invoice->setPaymentMethod(PaymentMethod::Cash);

Bank Transfer with IBAN

use PhpFacturae\Enums\PaymentMethod;

$invoice->setPaymentMethod(PaymentMethod::Transfer);
$invoice->setPaymentIban('ES9121000418450200051332');

Direct Debit

use PhpFacturae\Enums\PaymentMethod;

$invoice->setPaymentMethod(PaymentMethod::DirectDebit);
$invoice->setPaymentIban('ES9121000418450200051332');
$invoice->setPaymentMandate('MANDATE-123456');

Card Payment

use PhpFacturae\Enums\PaymentMethod;

$invoice->setPaymentMethod(PaymentMethod::Card);
// No IBAN required for card payments

Multiple Payment Installments

use PhpFacturae\Enums\PaymentMethod;

$invoice->setPaymentMethod(PaymentMethod::Transfer);
$invoice->setPaymentIban('ES9121000418450200051332');

// Add payment installments
$invoice->addPaymentInstallment(
    dueDate: new DateTime('2024-03-01'),
    amount: 500.00
);

$invoice->addPaymentInstallment(
    dueDate: new DateTime('2024-04-01'),
    amount: 500.00
);

Payment Methods Requiring IBAN

The following payment methods typically require an IBAN to be specified:
  • DirectDebit (02) - Always required
  • Transfer (04) - Always required
The following payment methods may optionally include an IBAN:
  • AcceptedBillOfExchange
  • DocumentaryCredit
  • BillOfExchange
  • TransferablePromissory
  • PromissoryNote
  • Postgiro
  • BankersDraft

Common Payment Methods in Spain

The most frequently used payment methods in Spain are:
  1. Transfer (04) - Bank transfers are the most common B2B payment method
  2. DirectDebit (02) - Common for recurring payments and subscriptions
  3. Card (19) - Common for B2C transactions
  4. Cash (01) - Used for small amounts and retail

Notes

  • When using Transfer or DirectDebit, you must provide a valid IBAN
  • IBAN validation follows the Spanish format: ESnn (ES + 2 check digits + 20 account digits)
  • Payment methods are defined by the Spanish Tax Agency (AEAT)
  • The payment method code appears in the XML output’s PaymentMeansType field

See Also

Build docs developers (and LLMs) love