Younium Developer Portal
  • Welcome
  • Get started
  • API:s
    • API 2.0
      • Accounts
      • Bookings
      • Chartofaccounts
      • Countries
      • Currency
      • Documenttemplate
      • Exchangerate
      • Invoices
      • Journals
      • Measurements
      • Orders
      • Paymentterms
      • Products
      • Quotes
      • Salesorders
      • Simpleproducts
      • Subscriptions
      • Taxtemplates
      • Unitofmeasurements
      • Usage
      • Webhooks
    • API 2.1
      • Accounts
      • Bookings
      • Chartofaccounts
      • Countries
      • Currency
      • Customfieldconfigurations
      • Documenttemplate
      • Exchangerate
      • Invoicebatches
      • Invoicebatchgroups
      • Invoices
      • Journals
      • Measurements
      • Orders
      • Payments
      • Paymentterms
      • Products
      • Quotes
      • Reports
      • Revenueschedule
      • Salesorders
      • Simpleproducts
      • Subscriptions
      • Taxtemplates
      • Unitofmeasurements
      • Usage
      • Webhooks
  • Documentation
    • Developer resources
    • Invoice operations
    • Product guide
    • Webhooks
    • Idempotent requests
  • Sandbox
Powered by GitBook
On this page

Was this helpful?

  1. API:s
  2. API 2.1

Payments

PreviousOrdersNextPaymentterms

Last updated 7 months ago

Was this helpful?


Get Payments by Id

get
Authorizations
Path parameters
idstring ยท uuidRequired
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
404
Not Found
application/json
get
GET /Payments/{id} HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "payerName": "text",
  "payerInformation": "text",
  "paymentDate": "2025-05-28T20:37:51.241Z",
  "postedDate": "2025-05-28T20:37:51.241Z",
  "reference": "text",
  "description": "text",
  "amount": {
    "amount": 1,
    "currencyCode": "text",
    "currencyConversionDate": "2025-05-28T20:37:51.241Z",
    "baseCurrencyAmount": 1,
    "baseCurrencyCode": "text"
  },
  "bankFeeAmount": {
    "amount": 1,
    "currencyCode": "text",
    "currencyConversionDate": "2025-05-28T20:37:51.241Z",
    "baseCurrencyAmount": 1,
    "baseCurrencyCode": "text"
  },
  "exchangeRate": 1,
  "paymentAccount": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "code": "text",
    "name": "text",
    "description": "text",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "BankFeeAccount": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "code": "text",
    "name": "text",
    "description": "text",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "paymentMethodName": "text",
  "paymentMethodId": "123e4567-e89b-12d3-a456-426614174000",
  "paymentBatchNumber": "text",
  "paymentBatchId": "123e4567-e89b-12d3-a456-426614174000",
  "paymentSettlements": [
    {
      "amount": {
        "amount": 1,
        "currencyCode": "text",
        "currencyConversionDate": "2025-05-28T20:37:51.241Z",
        "baseCurrencyAmount": 1,
        "baseCurrencyCode": "text"
      },
      "invoice": {
        "account": {
          "name": "text",
          "accountNumber": "text",
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "externalERPId": "text",
          "externalCRMId": "text"
        },
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "invoiceNumber": "text",
        "status": "Draft",
        "invoiceDate": "2025-05-28T20:37:51.241Z",
        "dueDate": "2025-05-28T20:37:51.241Z",
        "buyerReference": "text",
        "ocrNumber": "text",
        "currency": "text",
        "subtotal": 1,
        "tax": 1,
        "totalAmount": 1,
        "settledAmount": 1,
        "externalERPId": "text",
        "externalCRMId": "text"
      },
      "writeOffs": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "amount": {
            "amount": 1,
            "currencyCode": "text",
            "currencyConversionDate": "2025-05-28T20:37:51.241Z",
            "baseCurrencyAmount": 1,
            "baseCurrencyCode": "text"
          },
          "postingText": "text",
          "financialAccount": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "code": "text",
            "name": "text",
            "description": "text",
            "externalERPId": "text",
            "externalCRMId": "text"
          }
        }
      ]
    }
  ],
  "paymentWriteOffs": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "amount": {
        "amount": 1,
        "currencyCode": "text",
        "currencyConversionDate": "2025-05-28T20:37:51.241Z",
        "baseCurrencyAmount": 1,
        "baseCurrencyCode": "text"
      },
      "postingText": "text",
      "financialAccount": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "text",
        "name": "text",
        "description": "text",
        "externalERPId": "text",
        "externalCRMId": "text"
      }
    }
  ],
  "externalBankId": "text",
  "onlinePaymentIntentId": "text",
  "onlinePaymentChargeId": "text"
}
  • POSTAdd Payment
  • GETGet Payments
  • PATCHUpdate Payment
  • GETGet Payments by Id
  • POSTCreate and Post Payment

Get Payments

get
Authorizations
Query parameters
FilterstringOptional

Filter the results. See ODATA documentation for more information

Example: name eq 'Adam' and age gt 20
OrderBystringOptional

Sorting the results. See ODATA specification for more information

Example: accountNumber Desc
ModifiedAfterstring ยท date-timeOptional

Apply a separate modified After filter. See 'ModifiedBefore' filter for further details.

Example: 03/01/2025 00:00:00
ModifiedBeforestring ยท date-timeOptional

Filter is also applied on sub entities: 'paymentSettlements' and 'writeOffs'

Example: 03/01/2025 00:00:00
PageSizeinteger ยท int32Optional

Page Size

Example: 20
PageNumberinteger ยท int32Optional

Page Number

Example: 1
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /Payments HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "pageNumber": 1,
  "pageSize": 1,
  "totalPages": 1,
  "totalCount": 1,
  "nextPage": "https://example.com",
  "previousPage": "https://example.com",
  "firstPage": "https://example.com",
  "lastPage": "https://example.com",
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "payerName": "text",
      "payerInformation": "text",
      "paymentDate": "2025-05-28T20:37:51.241Z",
      "postedDate": "2025-05-28T20:37:51.241Z",
      "reference": "text",
      "description": "text",
      "amount": {
        "amount": 1,
        "currencyCode": "text",
        "currencyConversionDate": "2025-05-28T20:37:51.241Z",
        "baseCurrencyAmount": 1,
        "baseCurrencyCode": "text"
      },
      "bankFeeAmount": {
        "amount": 1,
        "currencyCode": "text",
        "currencyConversionDate": "2025-05-28T20:37:51.241Z",
        "baseCurrencyAmount": 1,
        "baseCurrencyCode": "text"
      },
      "exchangeRate": 1,
      "paymentAccount": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "text",
        "name": "text",
        "description": "text",
        "externalERPId": "text",
        "externalCRMId": "text"
      },
      "BankFeeAccount": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "text",
        "name": "text",
        "description": "text",
        "externalERPId": "text",
        "externalCRMId": "text"
      },
      "paymentMethodName": "text",
      "paymentMethodId": "123e4567-e89b-12d3-a456-426614174000",
      "paymentBatchNumber": "text",
      "paymentBatchId": "123e4567-e89b-12d3-a456-426614174000",
      "paymentSettlements": [
        {
          "amount": {
            "amount": 1,
            "currencyCode": "text",
            "currencyConversionDate": "2025-05-28T20:37:51.241Z",
            "baseCurrencyAmount": 1,
            "baseCurrencyCode": "text"
          },
          "invoice": {
            "account": {
              "name": "text",
              "accountNumber": "text",
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "externalERPId": "text",
              "externalCRMId": "text"
            },
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "invoiceNumber": "text",
            "status": "Draft",
            "invoiceDate": "2025-05-28T20:37:51.241Z",
            "dueDate": "2025-05-28T20:37:51.241Z",
            "buyerReference": "text",
            "ocrNumber": "text",
            "currency": "text",
            "subtotal": 1,
            "tax": 1,
            "totalAmount": 1,
            "settledAmount": 1,
            "externalERPId": "text",
            "externalCRMId": "text"
          },
          "writeOffs": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "amount": {
                "amount": 1,
                "currencyCode": "text",
                "currencyConversionDate": "2025-05-28T20:37:51.241Z",
                "baseCurrencyAmount": 1,
                "baseCurrencyCode": "text"
              },
              "postingText": "text",
              "financialAccount": {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "code": "text",
                "name": "text",
                "description": "text",
                "externalERPId": "text",
                "externalCRMId": "text"
              }
            }
          ]
        }
      ],
      "paymentWriteOffs": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "amount": {
            "amount": 1,
            "currencyCode": "text",
            "currencyConversionDate": "2025-05-28T20:37:51.241Z",
            "baseCurrencyAmount": 1,
            "baseCurrencyCode": "text"
          },
          "postingText": "text",
          "financialAccount": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "code": "text",
            "name": "text",
            "description": "text",
            "externalERPId": "text",
            "externalCRMId": "text"
          }
        }
      ],
      "externalBankId": "text",
      "onlinePaymentIntentId": "text",
      "onlinePaymentChargeId": "text"
    }
  ]
}

Add Payment

post
Authorizations
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
201
Created
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
post
POST /Payments HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 393

{
  "paymentDate": "2025-05-28T20:37:51.241Z",
  "currency": "SEK",
  "amount": 1,
  "bankFeeAmount": 1,
  "exchangeRate": 1,
  "baseCurrencyAmount": 1,
  "paymentAccount": "1510",
  "BankFeeAccount": "1510",
  "paymentMethod": "Standard",
  "paymentWriteOffs": [
    {
      "amount": 1,
      "postingText": "text",
      "financialAccount": "1510"
    }
  ],
  "payerName": "text",
  "payerInformation": "text",
  "reference": "text",
  "description": "text",
  "externalBankId": "text"
}

No content

Update Payment

patch

Update Payment details and Add, remove or edit payment settlements and write offs.

Authorizations
Path parameters
idstring ยท uuidRequired
Header parameters
api-versionstringOptional
Body
all ofOptional
Responses
200
Success
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
patch
PATCH /Payments/{id} HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/merge-patch+json
Accept: */*
Content-Length: 463

{
  "paymentDate": "2025-05-28T20:37:51.241Z",
  "paymentWriteOffs": [
    {
      "operation": "Change",
      "writeOff": "GUID",
      "amount": 1,
      "postingText": "text",
      "financialAccount": "1510"
    }
  ],
  "paymentSettlements": [
    {
      "operation": "Change",
      "invoice": "IP-000001",
      "amount": 1,
      "writeOffs": [
        {
          "operation": "Change",
          "writeOff": "GUID",
          "amount": 1,
          "postingText": "text",
          "financialAccount": "1510"
        }
      ]
    }
  ],
  "payerName": "text",
  "payerInformation": "text",
  "reference": "text",
  "description": "text",
  "externalBankId": "text"
}

No content

Create and Post Payment

post
Authorizations
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
201
Created
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
post
POST /Payments/CreateAndPost HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 223

{
  "invoice": {
    "key": "text",
    "value": "text"
  },
  "description": "text",
  "paymentDate": "2025-05-28T20:37:51.241Z",
  "amount": 1,
  "bankFeeAmount": 1,
  "exchangeRate": 1,
  "baseCurrencyAmount": 1,
  "paymentAccount": "1510",
  "paymentMethod": "Standard"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "message": "text"
}