Posted Payments

Posted Payments

Posted payments represent completed payment transactions in the system. They include details about the payment source and the actual transfer of funds.

Endpoints

Method Endpoint Description
GET /payments List posted payments
GET /payments/{id} Get a specific posted payment
POST /payments Create a posted payment

Query Parameters

The GET /payments endpoint supports the following query parameters:

Parameter Type Required Description
client_account_id integer Yes Filter by client account ID. Must be one of the user’s eligible client accounts
source_type string No Filter by source type(s). Multiple types can be separated by comma, semicolon, pipe, or space
source_id integer No Filter by source ID
page integer No Page number for pagination
per_page integer No Number of items per page

Attributes

Attribute Type Description
id integer The unique identifier of the posted payment
client_account_id integer The ID of the client account
source_type string The type of source that generated this payment
source_id integer The ID of the source
source_line_id integer The ID of the source line item
memo string Description or memo for the payment
transfer PaymentTransfer The transfer details

Payment Transfer

Each posted payment includes a transfer with the following attributes:

Attribute Type Description
id integer The unique identifier of the transfer
created_at datetime When the transfer was created
created_by_id integer The ID of the user who created the transfer
requested_transfer_date date The requested date for the transfer
payment_status string The current status of the transfer
rejection_code string Code indicating reason for rejection, if applicable
rejection_message string Detailed message about rejection, if applicable
booking_date date The date the transfer was booked
booking_reference string Reference number for the booking
amount decimal The transfer amount
currency_code string The currency code of the transfer
exchange_rate decimal The exchange rate used
creditor_reference string Reference for the creditor

Relationships

Relationship Type Description
transfer.debtor [BankAccount, BusinessPartner] The debtor’s bank account and business partner details
transfer.creditor [BankAccount, BusinessPartner] The creditor’s bank account and business partner details
transfer.reconciliation_entries [PaymentReconciliationEntry] Reconciliation entries for the transfer
transfer.account_entries [PaymentAccountEntry] Account entries for the transfer

Example Response

{
    "id": 1,
    "client_account_id": 1,
    "source_type": "INVOICE",
    "source_id": 123,
    "source_line_id": 456,
    "memo": "Invoice payment",
    "transfer": {
        "id": 1,
        "created_at": "2023-05-10T12:00:00Z",
        "created_by_id": 1,
        "requested_transfer_date": "2023-05-11",
        "payment_status": "COMPLETED",
        "rejection_code": null,
        "rejection_message": null,
        "booking_date": "2023-05-11",
        "booking_reference": "REF123",
        "amount": "1000.00",
        "currency_code": "EUR",
        "exchange_rate": "1.0000",
        "creditor_reference": "INV123",
        "debtor": {
            "bank_account_id": 1,
            "business_partner_id": 1,
            "bank_account": {
                "id": 1,
                "account_number": "DE89370400440532013000"
            },
            "business_partner": {
                "id": 1,
                "name": "ACME Corp"
            }
        },
        "creditor": {
            "bank_account_id": 2,
            "business_partner_id": 2,
            "bank_account": {
                "id": 2,
                "account_number": "FR7630006000011234567890189"
            },
            "business_partner": {
                "id": 2,
                "name": "Supplier Inc"
            }
        },
        "reconciliation_entries": [],
        "account_entries": []
    }
}

Notes

  • The client_account_id must be one of the eligible client accounts for the authenticated user.
  • When creating a posted payment, the created_by_id is automatically set to the authenticated user’s ID.
  • The source_type and source_id fields help track the origin of the payment (e.g., an invoice or other document).
  • Bank account and business partner relationships can be included by specifying them in the with_relations parameter.
  • All amounts are returned as string representations of decimal numbers.
  • Dates are returned in ISO 8601 format.
  • When filtering by source_type, multiple types can be provided using various separators (comma, semicolon, pipe, or space).

Relaterte artikler