Payments & Vouchers

Ledger Lines

A LedgerLine contains the details of a charge or a revenue.

The LedgerLine object

Attributes

  • idobject-idrequired

    The ID of the ledger line.

  • gross_amountintegerrequired

    The gross amount of the ledger line.

  • net_amountintegerrequired

    The net amount of the ledger line.

  • typestringrequired

    The type of the ledger line, i.e. a charge (payment or refund) or revenue.

    Possible values:chargerevenue
  • descriptionstringrequired

    A description of the ledger line.

  • revenue_centrestringrequirednullable

    Contains the revenue centre ID if this line is for revenue.

  • revenue_centre_namestringrequirednullable

    A friendly name for the revenue centre.

  • payment_processorstringrequirednullable

    A key for the payment processor if this line is for a charge.

  • payment_processor_friendlystringrequirednullable

    A friendly name for the payment processor and type if this line is for a charge.

  • mapped_valuestringoptionalnullable

    The value that this line's revenue centre or payment processor was mapped to for the integration.

  • ledger_datedate-timerequired

    The date and time the ledger event occurred.

  • currencystringrequired

    The currency of the ledger line. See Supported Currencies for a list of supported currencies.

  • payablerequirednullable
  • causerrequirednullable
  • statusstringrequirednullable

    The status of the ledger line. Lines without a status are assumed to be final.

    Possible values:pendingfinal
  • created_atdate-timerequired

    The date and time the ledger posting was created.

{
  "id": "64a9f3b2c3d8e1f4a5b6c7d8",
  "gross_amount": 10000,
  "net_amount": 8333,
  "type": "charge",
  "description": "Trybe Cash payment [TRY3Z] Jane Jenkins",
  "revenue_centre": "spa",
  "revenue_centre_name": "Spa",
  "payment_processor": "manual",
  "payment_processor_friendly": "Manual (Cash)",
  "mapped_value": "trybe_spa_revenue",
  "ledger_date": "2023-04-02T00:00:00+01:00",
  "currency": "gbp",
  "payable": "string",
  "causer": "string",
  "status": "pending",
  "created_at": "2023-05-05T11:38:29+01:00"
}
get/shop/reports/ledger-lines

List LedgerLines

listLedgerLines

Use this endpoint to retrieve a list of LedgerLine resources associated with a Site.

Query parameters

  • site_iduuidoptional

    Filter the list of LedgerLines by site

  • pageintegeroptional

    The page to retrieve results from

  • ledger_date_fromdateoptional

    Filter the list of LedgerLines by ledger date from. This will include the given date.

  • ledger_date_todateoptional

    Filter the list of LedgerLines by ledger date to. This will include the given date.

  • typestringoptional

    Show LedgerLines of this type.

    Possible values:revenuecharge
  • revenue_centrestringoptional

    Filter the list of LedgerLines by the revenue centre.

  • payment_processorstringoptional

    Filter the list of LedgerLines by the payment processor.

  • Filter the list of LedgerLines by the payment processor type ID.

  • voucher_code_idobject-idoptional

    Show LedgerLines for this voucher code.

Responses

  • 200

    The list of LedgerLines resources was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/ledger-lines/queue

Queue an export of the ledger lines report

actionQueueLedgerLineReport

This endpoint queues an export of the ledger lines list report.

Query parameters

  • site_iduuidoptional

    Filter the list of LedgerLines by site

  • pageintegeroptional

    The page to retrieve results from

  • ledger_date_fromdateoptional

    Filter the list of LedgerLines by ledger date from. This will include the given date.

  • ledger_date_todateoptional

    Filter the list of LedgerLines by ledger date to. This will include the given date.

  • typestringoptional

    Show LedgerLines of this type.

    Possible values:revenuecharge
  • revenue_centrestringoptional

    Filter the list of LedgerLines by the revenue centre.

  • payment_processorstringoptional

    Filter the list of LedgerLines by the payment processor.

  • Filter the list of LedgerLines by the payment processor type ID.

  • voucher_code_idobject-idoptional

    Show LedgerLines for this voucher code.

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated