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:| Case | Code | Description | Requires IBAN |
|---|---|---|---|
Cash | 01 | Cash payment | No |
DirectDebit | 02 | Direct debit from bank account | Yes |
Receipt | 03 | Payment receipt | No |
Transfer | 04 | Bank transfer | Yes |
AcceptedBillOfExchange | 05 | Accepted bill of exchange | Optional |
DocumentaryCredit | 06 | Documentary credit | Optional |
ContractAward | 07 | Contract award | No |
BillOfExchange | 08 | Bill of exchange | Optional |
TransferablePromissory | 09 | Transferable promissory note | Optional |
PromissoryNote | 10 | Promissory note | Optional |
Cheque | 11 | Cheque | No |
Reimbursement | 12 | Reimbursement | No |
Special | 13 | Special payment method | No |
Setoff | 14 | Payment by setoff/compensation | No |
Postgiro | 15 | Postgiro | Optional |
CertifiedCheque | 16 | Certified cheque | No |
BankersDraft | 17 | Banker’s draft | Optional |
CashOnDelivery | 18 | Cash on delivery | No |
Card | 19 | Credit/debit card | No |
Usage Examples
Cash Payment
Bank Transfer with IBAN
Direct Debit
Card Payment
Multiple Payment Installments
Payment Methods Requiring IBAN
The following payment methods typically require an IBAN to be specified:- DirectDebit (
02) - Always required - Transfer (
04) - Always required
- AcceptedBillOfExchange
- DocumentaryCredit
- BillOfExchange
- TransferablePromissory
- PromissoryNote
- Postgiro
- BankersDraft
Common Payment Methods in Spain
The most frequently used payment methods in Spain are:- Transfer (
04) - Bank transfers are the most common B2B payment method - DirectDebit (
02) - Common for recurring payments and subscriptions - Card (
19) - Common for B2C transactions - Cash (
01) - Used for small amounts and retail
Notes
- When using
TransferorDirectDebit, 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
PaymentMeansTypefield
See Also
- Invoice::setPaymentMethod() - Setting payment method
- Invoice::setPaymentIban() - Setting payment IBAN
- Invoice::addPaymentInstallment() - Adding payment installments