Payment Methods Guide
Introduction
This guide describes the internal payment method codes in B2Brouter and their corresponding encoding in UBL, Facturae, and FatturaPA.
Equivalencies:
- B2Brouter internal field:
payment_method - Facturae field:
PaymentMeans(element at/facturae:Facturae/Invoices/Invoice/PaymentDetails/Installment/PaymentMeans) - UBL field:
cbc:PaymentMeansCode(element at/Invoice/cac:PaymentMeans/cbc:PaymentMeansCode) - FatturaPA field:
ModalitaPagamento(element at/p:FatturaElettronica/FatturaElettronicaBody/DatiPagamento/DettaglioPagamento/ModalitaPagamento) - CII field:
TypeCode(element atrsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode) - Business Terms ID:
BT-81
1. Payment Codes Table
| Method | Internal Reference | UBL | Facturae | FatturaPA | Description |
|---|---|---|---|---|---|
| CASH | 1 | 10 | 01 | MP01 | Payment by currency (including bills and coins) in circulation, including checking account deposits. |
| DEBIT | 2 | 49 | 02 | MP19 | Direct debit (The amount is to be, or has been, directly debited from the customer's bank account). |
| HOLD | 3 | 8 | 03 | MP12 | Indicates that the bank should hold the payment for collection by the beneficiary or other instructions. |
| TRANSFER | 4 | 30 | 04 | MP05 | Bank transfer (The amount is to be, or has been, directly credited to the supplier's bank account). |
| AWARDING | 7 | ZZZ | 07 | Payment by assignment or award | |
| PAGARE N O | 10 | 60 | 10 | MP06 | Non transferable promissory note. Payment by an unconditional promise in writing made by one person to another, signed by the maker, engaging to pay on demand or at a fixed or determinable future time a sum certain in money, to order or to bearer. |
| CHEQUE | 11 | 20 | 11 | MP02 | Payment by a pre-printed form on which instructions are given to an account holder (a bank or building society) to pay a stated sum to a named recipient. |
| REPOSITION | 12 | ZZZ | 12 | MP22 | Open account reimbursement. |
| SPECIAL/OTHER | 13 | ZZZ | 13 | MP22 | Defines any other payment method; use payment_method_text for custom descriptions. |
| COMPENSATION | 14 | 97 | 14 | MP22 | Amounts which two partners owe to each other to be compensated in order to avoid useless payments. |
| PLUSGIRO | 15 | 50 | 15 | MP18 | A standard Swedish payment method using the postal giro system. |
| CHEQUE B | 17 | 23 | 17 | MP03 | Payment by a pre-printed form, which has been completed by a financial institution, on which instructions are given to an account holder (a bank or building society) to pay a stated sum to a named recipient. |
| BANK CARD | 19 | 48 | 19 | MP08 | Payment by means of a card issued by a bank or other financial institution. |
| DEBIT TRANSFER | 31 | 31 | 04 | MP13 | Payment by debit movement of funds from one account to another. |
| CREDIT CARD | 54 | 54 | 19 | MP08 | Payment made by means of credit card |
| BANKGIRO | 56 | 56 | 04 | MP03 | Payment method using the bank giro network. |
| TRANSFER SEPA | 58 | 58 | 04 | MP05 | SEPA credit transfer (Funds are credited to the supplier's bank account). |
| DEBIT SEPA | 59 | 59 | 02 | MP19 | SEPA direct debit (Funds are debited from the customer's bank account; mandate may be required). |
| GIRO | 101 | ZZZ | 13 | Giro | |
| PAY NOW | 102 | ZZZ | 13 | Immediate payment (Pay Now) |
1.1 Additional required fields (API)
Depending on the payment_method, you may need to provide extra fields so the invoice can be generated/exported correctly.
This section focuses on universal bank/payment data requirements; some e-invoice formats may still restrict which payment codes are accepted.
Universal requirements
- Customer bank account (payer): DEBIT (2), DEBIT SEPA (59).
Required in specific formats/flows, not universally. For example,
XRechnung \common_xrechnung_v23requires invoice.contact_iban,XRechnung v3 also requiresmandate_reference_identifier, andFacturaerequires the customer bank account (contact.bank_account_numberor a validinvoice.contact_iban). This does not apply toIssuedSimplifiedInvoice.` - Payment terms: DEBIT (2) .
Provide
terms(it cannot be0/blank). - Payment due date (most exports):
If you set apayment_methodand useterms = "custom", you must providedue_date(except for some transports like PEPPOL and SDI). If you use a non-customterms, the system derivesdue_dateautomatically. - Company bank account (payee): TRANSFER (4), TRANSFER SEPA (58), DEBIT TRANSFER (31), PLUSGIRO (15), BANKGIRO (56), AWARDING (7).
Providebank_account_id(or include thebank_accountobject when creating/updating the invoice). - Custom description: SPECIAL/OTHER (13).
Providepayment_method_text(it is only kept whenpayment_method = 13). - All other payment methods do not require additional bank/payment fields.
Special cases (invoice type)
- IssuedSelfInvoice:
- DEBIT (2) / DEBIT SEPA (59) require
bank_account_id(company bank account). - Transfer-like methods (TRANSFER (4), TRANSFER SEPA (58), DEBIT TRANSFER (31), PLUSGIRO (15), BANKGIRO (56), AWARDING (7)) require
invoice.contact_iban(some PDF-only flows may not require it, but most e-invoice exports do).
- DEBIT (2) / DEBIT SEPA (59) require
- IssuedSimplifiedInvoice: DEBIT (2) / DEBIT SEPA (59) do not require
invoice.contact_iban.
Special cases (export format)
- Facturae:
- If you set a
payment_methodand the invoice is not a credit note, you must provide either a validterms(non-custom) ordue_date(when usingterms = "custom"). - If the invoice is DEBIT/DEBIT SEPA, the customer bank account must be available (the contact’s
bank_account_numberor a validinvoice.contact_iban). - If the invoice is TRANSFER (including transfer-like methods), the company bank account must be available (via
bank_account_id/bank_account) and contain a valid account number/IBAN.
- If you set a
- Svefaktura: debit payments (DEBIT/DEBIT SEPA) are not supported.
- FatturaPA: COMPENSATION (14) is not allowed.
- XRechnung (UBL/CII):
- If the invoice is DEBIT/DEBIT SEPA, you must provide
bank_assigned_creditor_referenceandinvoice.contact_iban. - For v3 profiles,
mandate_reference_identifieris also required.
- If the invoice is DEBIT/DEBIT SEPA, you must provide
2. Using the Endpoints
Below we show how to use the main endpoints to manage payments and bank accounts associated with contacts and invoices.
2.1. Create Bank Accounts
When creating a bank account, you must specify the account type to indicate which fields to use:
number: use thenumberfield only.number: Bank account number.
iban: useibanandbic.iban: International Bank Account Number.bic: SWIFT code of the bank.
Request Example:
curl --request POST \
--url https://api-staging.b2brouter.net/accounts/{ACCOUNT_ID}/bank_accounts \
--header 'X-B2B-API-Key: {YOUR_API_KEY}' \
--header 'X-B2B-API-Version: {YOUR_API_VERSION}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"bank_account": {
"type": "number",
"number": "ES9121000418450200051332",
"name": "Ejemplo S.L.",
"sufix": 123
}
}
'sufix is the suffix used for the creditor identifier in SEPA files.
Sample Response:
{
"bank_account": {
"type": "number",
"id": 3296,
"name": "Ejemplo S.L.",
"number": "ES9121000418450200051332",
"sufix": 123,
"country": "es",
"created_at": "2025-07-14T11:37:02.000Z",
"updated_at": "2025-07-14T11:37:02.000Z"
}
}Keep bank_account.id to reference this account in future requests.
2.2. Create Contact
Configuring the payment details for invoices sent to a contact is useful to avoid managing this information each time you need to send a document.
Request Example:
curl --request POST \
--url https://api-staging.b2brouter.net/accounts/{ACCOUNT_ID}/contacts \
--header 'X-B2B-API-Key: {YOUR_API_KEY}' \
--header 'X-B2B-API-Version: {YOUR_API_VERSION}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"contact": {
...
"terms": "custom",
"payment_method": 4,
"payment_reminder_days": 2,
"payment_method_text": "Example text",
"bank_account_id": 3296,
"bank_account_number": "IT12345678901"
...
}
}
'2.3. Create Invoice
You don’t need to re-specify any payment fields that were already set on the contact unless you need to override them. To minimize API calls, include all required payment details—such as payment_method, bank_account_id, payment_terms, etc.—directly in the Create Invoice request instead of creating Contacts or Bank Accounts beforehand.
Request Example:
curl --request POST \
--url https://api-staging.b2brouter.net/accounts/{ACCOUNT_ID}/invoices \
--header 'X-B2B-API-Key: {YOUR_API_KEY}' \
--header 'X-B2B-API-Version: {YOUR_API_VERSION}' \
--header 'content-type: application/json' \
--data '
{"invoice": {
...
"payment_method": 4,
"contact_iban": "DE44100000000123456789",
"payment_reminder_days": 5,
"bank_account_id": 3296
...
}}
'And if you haven’t provided bank_account_id, you can always include the bank_account object:
{"invoice": {
...
"bank_account": {
"type": "number",
"number": "ES9121000418450200051332"
},
...
}}
'Updated 24 days ago