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 to 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 debited to the customer'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 | Credit transfer inside the Single Euro Payment Area (SEPA) system. |
DEBIT SEPA | 59 | 59 | 02 | MP19 | Direct debit inside the Single Euro Payment Area (SEPA) system. |
GIRO | 101 | ZZZ | 13 | Giro | |
PAY NOW | 102 | ZZZ | 13 | Immediate payment (Pay Now) |
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 thenumber
field only.number
: Bank account number.
iban
: useiban
andbic
.iban
: International Bank Account Number.bic
: SWIFT code of the bank.
Request Example:
curl --request POST \
--url https://app-staging.b2brouter.net/accounts/{{ACCOUNT_ID}}/bank_accounts \
--header 'X-B2B-API-Key: {{YOUR_API_KEY}}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"bank_account": {
"type": "number",
"number": "ES9121000418450200051332",
"name": "Ejemplo S.L.",
"sufix": 123 #Suffix used for the creditor identifier in SEPA files
}
}
'
Sample Response:
{
"bank_account": {
"type": "number",
"id": 3296, #Keep this ID to call the bank account on future requests
"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"
}
}
API Reference: https://developer.b2brouter.net/reference/create-bank-account
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://app-staging.b2brouter.net/projects/{{ACCOUNT_ID}}/clients.json \
--header 'X-B2B-API-Key: {{YOUR_API_KEY}}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"client": {
...
"terms": "custom",
"payment_method": 4, #Predefined payment method
"payment_reminder_days": 2,
"payment_method_text": "Example text",
"bank_account_id": 3296, #ID of a previously created bank account.
"bank_account_number": "IT12345678901" #CONTACT account number, just needed in some payment methods
...
}
}
'
API Reference: https://developer.b2brouter.net/reference/create-contact
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://app-staging.b2brouter.net/projects/{{ACCOUNT_ID}}/invoices.json \
--header 'X-B2B-API-Key: {{YOUR_API_KEY}}' \
--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 about 23 hours ago