v1

latestOpenAPI 3.1.02026-08-04103211436.0 KB
Payments

Retrieve payment

Returns a single payment by customId. Payments missing required accounting, operation or contact information are not returned even if they exist.

get/payments/{companyId}/{customId}

Path parameters

customIdstring required
companyIdstring required

Response

Successful Response

methodstring

Payment method. Defaults to bank-transaction when not sent.

transactionIdstring nullable

Embat ID of the bank transaction linked to this payment.

productIdstring nullable

Embat product ID. You can get them from "Products" endpoints.

contactCustomIdstring nullable

Custom ID of the contact (client/supplier) involved in the payment.

datestring date-time required

Date the payment was made or received.

conceptstring nullable

Free-text description of the payment.

amountnumber required

Payment amount in the payment currency. Positive for collections, negative for outgoing payments.

accountingAmountnumber nullable

Payment amount expressed in the company accounting currency. If omitted, it defaults to amount, accountingCurrency defaults to currency and exchangeRate is set to 1.0.

currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTC' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'ETH' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTC' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWG' | 'ZWL'
accountingCurrency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTC' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'ETH' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTC' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWG' | 'ZWL'
exchangeRatenumber nullable

Exchange rate applied between currency and accountingCurrency. Defaults to 1.0 when omitted.

additionalInfoobject nullable

Free-form key/value metadata to attach to the payment.

idstring required

Embat payment ID

customIdstring nullable

Your own unique ID for the payment. If the payment has none, it is auto-generated as id concatenated with companyId.

type'contacts' | 'accountings' | 'operations' | 'banks' | 'salesOrder'
productAccountingCodestring nullable

Product accounting code

accountingCodestring nullable

Accounting account code the payment is posted to.

paymentSource'erp' | 'api' | 'embat'
companyIdstring required

Embat company ID. You can get them from "companies" endpoints

updatedAtstring date-time required

Last updated date of the entity in the database

createdAtstring date-time required

Created date of the entity in the database

syncboolean

Whether the payment is synchronized with the accounting system.

registeredboolean

Whether the payment is registered in the accounting system.

userIdstring nullable

Embat ID of the user who created the payment, if created manually.

transactionAmountnumber nullable

Total amount of the bank transaction linked to this payment.

transactionAccountingAmountnumber nullable

Accounting amount of the bank transaction linked to this payment.

multicurrencyboolean

True when the payment's operations use a currency different from the payment currency, indicating a currency exchange took place.

errorstring nullable

Error message recorded against the payment, if any.

Example response

{
  "method": "bank-transaction",
  "operations": [
    {
      "amount": 500,
      "customId": "invoice-2024-001"
    }
  ],
  "concept": "Invoice #2024-001 payment",
  "amount": 1250.5,
  "accountingAmount": 1250.5,
  "exchangeRate": 1,
  "attributes": [
    {
      "customId": "cost-center",
      "value": "Marketing",
      "valueCustomId": "marketing"
    }
  ],
  "error": "Missing account",
  "contact": {
    "tradeName": "Acme Supplies",
    "legalName": "Acme Supplies S.L.",
    "taxId": "B12345678",
    "contact": {
      "phone": "+34600000000",
      "email": "billing@acme-supplies.com",
      "name": "John",
      "surname": "Doe"
    },
    "address": {
      "postalCode": "28001",
      "address": "Calle Mayor 10, 3B",
      "province": "Madrid",
      "city": "Madrid",
      "country": "Spain"
    },
    "accounts": [
      {
        "swift": "BBVAESMMXXX",
        "iban": "ES9121000418450200051332"
      }
    ],
    "paymentsAccounts": [
      {
        "details": {
          "iban": "ES9121000418450200051332",
          "bic": "BBVAESMMXXX",
          "swift": "BBVAESMMXXX",
          "accountNumber": "123456789",
          "routingNumber": "021000021",
          "sortCode": "040004",
          "institutionNumber": "001",
          "transitNumber": "12345",
          "bsb": "062-000"
        }
      }
    ],
    "accountingCode": "4300001",
    "paymentMethod": "bank-transaction",
    "paymentTerms": 30,
    "attributes": [
      {
        "customId": "cost-center",
        "value": "Marketing",
        "valueCustomId": "marketing"
      }
    ],
    "customId": "erp-contact-001"
  },
  "intercompany": {
    "id": "proc-abc",
    "relatedPaymentPairs": [
      [
        "pay-hub-A",
        "pay-sub-1"
      ],
      [
        "pay-hub-B",
        "pay-sub-2"
      ]
    ],
    "relatedPaymentsIds": [
      "pay-hub-A"
    ],
    "counterpartyContact": "contact-sub-1"
  },
  "transactionAttributes": [
    {
      "customId": "cost-center",
      "value": "Marketing",
      "valueCustomId": "marketing"
    }
  ]
}