Skip to main content
POST
/
accounting
/
payments
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/payments \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "currency": "EUR",
  "exchangeRate": 1,
  "journalCode": "30",
  "paymentLines": [
    {
      "accountId": "4a6b5e92-a261-4be9-814d-84dec9636c16",
      "amount": 100,
      "description": "payment of bill",
      "invoiceId": "a44f5af1-8310-4f97-b945-26e35288b35f",
      "paymentDate": "2025-01-01",
      "supplierId": "supplier id"
    }
  ],
  "paymentType": "CREDITOR"
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "94a5ab44-3218-4492-8b5d-a31bc0288c0b",
    "currency": "EUR",
    "createdDate": "2021-01-01T00:00:00Z",
    "exchangeRate": 1,
    "journalCode": "30",
    "updatedDate": "2021-01-01T00:00:00Z",
    "paymentLines": [
      {
        "accountId": "4a6b5e92-a261-4be9-814d-84dec9636c16",
        "amount": 100,
        "description": "payment of bill",
        "invoiceId": "a44f5af1-8310-4f97-b945-26e35288b35f",
        "paymentDate": "2025-01-01",
        "supplierId": "supplier id"
      }
    ],
    "paymentType": "CREDITOR"
  }
}

Field support per integration

If you’re not using the Interactive Authentication Flow, make sure the query parameter companyId is correctly populated. You can obtain this value by using the GET Companies endpoint available under the Authentication section.

Supported Request Fields:
currency
string
exchangeRate
number
journalCode
string
required
paymentLines
PaymentLine[]
Supported Request Fields:
exchangeRate
number
paymentLines
PaymentLine[]

Headers

X-API-KEY
string
required

API key

Example:

"example value"

X-ACCOUNT-KEY
string
required

Account key

Example:

"example value"

Query Parameters

companyId
string

Body

application/json
currency
enum<string>
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYR,
BZD,
CAD,
CDF,
CHF,
CLP,
CNY,
COP,
CRC,
CUC,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EEK,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GQE,
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,
LTL,
LVL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZM,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VEB,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMK,
ZWR
Example:

"EUR"

exchangeRate
number
Example:

1

journalCode
string
Example:

"30"

paymentLines
object[]
paymentType
string
Example:

"CREDITOR"

Response

200 - application/json
meta
object
data
object
I