/
20 minute read
September 26, 2022

Ledger Entries

Important

This feature is being deprecated and replaced by journal entries.

 

For documentation on journal entries, see:

 

Use the /credit/accounts/{account_token}/ledgerentries endpoint to retrieve ledger entries made on an account on Marqeta’s credit platform. A ledger entry is a record of an entry made on an account ledger, such as a purchase transaction, fee, adjustment, and more. For more on the different types of ledger entries, see About Credit Account Ledger Entries.

Ledger entries originate when a ledger entry event occurs, such as a cardholder making a purchase or an account holder making a payment. To receive webhook notifications when ledger entry events occur, see Credit ledger entry events in Event Types.

List account ledger entries

Action: GET
Endpoint: /credit/accounts/{account_token}/ledgerentries

Retrieve an array of ledger entries on a credit account.

This endpoint supports sorting and pagination and object expansion.

URL path parameters
Fields Description

account_token

string
Required

The unique identifier of the credit account for which you want to retrieve ledger entries.

Send a GET request to /credit/accounts to retrieve existing credit account tokens.

Allowable Values:

Existing account token

URL query parameters
Fields Description

count

integer
Optional

The number of resources to retrieve.

Allowable Values:

1–100

start_index

integer
Optional

The sort order index of the first resource in the returned array.

Allowable Values:

0 min

start_date

date
Optional

The starting date of the date range from which to return ledger entries.

Allowable Values:

Example: 2019-01-01

Format: yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss.SS

end_date

date
Optional

The ending date of the date range from which to return ledger entries.

Allowable Values:

Example: 2019-01-01

Format: yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss.SS

statuses

array of strings
Optional

An array of statuses by which to filter ledger entries.

Allowable Values:

A valid ledger entry status

description

string
Optional

The description of the ledger entries to return.

Allowable Values:

255 char max

groups

array of strings
Optional

An array of groups by which to filter ledger entries.

To return all ledger entry groups, do not include this query parameter.

Allowable Values:

A valid ledger entry group

amount

decimal
Optional

The number of ledger entries to return.

Allowable Values:

Any integer

expand

string
Optional

Embeds the specified object into the response.

Allowable Values:

detailObject

sort_by

string
Optional

Field on which to sort. Prefix the field name with a hyphen (-) to sort in descending order. Omit the hyphen to sort in ascending order.

NOTE: You must sort using system field names such as createdTime, and not by the field names appearing in response bodies such as created_time.

Allowable Values:

createdTime, -createdTime

Response body
Fields Description

count

integer
Returned

The number of resources returned.

Allowable Values:

1–100

start_index

integer
Returned

The sort order index of the first resource in the returned array.

Allowable Values:

Any integer

end_index

integer
Returned

The sort order index of the last resource in the returned array.

Allowable Values:

Any integer

is_more

boolean
Returned

A value of true indicates that more unreturned resources exist.

Allowable Values:

true, false

data

array of objects
Returned

Contains one or more ledger entries on a credit account.

Allowable Values:

One or more ledger entry objects

data[].token

string
Returned

Unique identifier of the ledger entry.

Allowable Values:

36 char max

data[].related_token

string
Conditionally returned

Unique identifier of the original ledger entry. If the current ledger entry is the original, this field is returned empty.

Allowable Values:

Existing ledger entry token

data[].root_token

string
Conditionally returned

Unique identifier of the root ledger entry. If the current ledger entry is the root, this field is returned empty.

Allowable Values:

Existing ledger entry token

data[].account_token

string
Returned

Unique identifier of the credit account associated with the credit card used to make the ledger entry.

Allowable Values:

Existing credit account token

data[].card_token

string
Returned

Unique identifier of the credit card used to make the ledger entry.

Allowable Values:

8–36 chars

Existing credit card token

data[].status

string
Returned

Status of the ledger entry when it was initially recorded and had an impact on the balance, either PENDING or POSTED. This field is immutable and may not represent the current status.

To view the current status of purchases, refunds, OCTs, and payments, see the detail_object.state field. These ledger entries start in PENDING and can transition to CLEARED, DECLINED, or ERROR. This transition of status is only sent through webhook event notifications.

Ledger entries that are final transactions, such as clearings, start and remain in a POSTED state.

NOTE: CLEARED, DECLINED, and ERROR are special statuses that do not have an impact on the account balance, and are not recorded in the ledger. For these special statuses, impact_time, request_time, created_time, token, and id are returned blank.

Allowable Values:

PENDING, POSTED, DECLINED, ERROR, CLEARED

data[].group

string
Returned

Group to which the ledger entry belongs.

Allowable Values:

PURCHASE, INTERNAL, FEE, REWARD, INTEREST, PAYMENT, ADJUSTMENT, BALANCE_TRANSFER, CASH_ADVANCE, BALANCE_REFUND, ORIGINAL_CREDIT

data[].type

string
Returned

The ledger entry event type.

Allowable Values:

Example: authorization.clearing

data[].id

string
Returned

Eight-digit numeric identifier of the ledger entry, an alternate identifier to the UUID that is useful for remembering and referencing.

Allowable Values:

8 chars

data[].amount

decimal
Returned

Amount of the ledger entry.

Allowable Values:

Any decimal

data[].currency_code

string
Returned

A valid three-digit ISO 4217 currency code

Allowable Values:

USD

data[].memo

string
Returned

Merchant name or description for the ledger entry.

Allowable Values:

Example: Whole Foods Market

data[].request_time

datetime
Returned

For purchases, the date and time of the authorization, which is when the user initiates the ledger entry.

For other ledger entry groups, equivalent to impact_time.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

data[].impact_time

datetime
Returned

Date and time when the ledger entry impacts the account balance.

For purchases, this is the time of the authorization.

For purchase authorization clearings, this is the time when the transaction is settled.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

data[].created_time

datetime
Returned

Date and time when the ledger entry was created on Marqeta’s credit platform.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

data[].dispute_token

string
Conditionally returned

Unique identifier of the dispute, if the ledger entry is disputed.

Allowable Values:

Existing dispute token

data[].detail_token

string
Returned

Unique identifier of the ledger entry’s full details.

Allowable Values:

36 char max

data[].detail_object

object
Conditionally returned

Contains the ledger entry’s full details. The fields returned in this object vary based on the ledger entry type.

The following lists each ledger entry type and the specific fields returned for each type.

Allowable Values:

Existing detail object

data[].detail_object.token

string
Conditionally returned

Unique identifier of the interest charge or fee.

If in the detail_object, unique identifier of the detail object.

Returned for interest or fee ledger entries only.

Allowable Values:

36 char max

data[].detail_object.account_token

string
Conditionally returned

Unique identifier of the credit account on which the interest or fee was charged.

Returned for interest or fee ledger entries only.

Allowable Values:

36 char max

Existing credit account token

data[].detail_object.type

string
Conditionally returned

Type of fee.

Returned for fee ledger entries only.

Allowable Values:

FOREIGN_TRANSACTION_FEE, OVER_LIMIT_FEE, LATE_PAYMENT_FEE, RETURNED_PAYMENT_FEE, CARD_REPLACEMENT_FEE, MINIMUM_INTEREST_FEE, ANNUAL_FEE, MONTHLY_FEE

data[].detail_object.method

string
Conditionally returned

Method used to calculate the fee value.

Returned for fee ledger entries only.

Allowable Values:

PERCENTAGE, FLAT

data[].detail_object.value

decimal
Conditionally returned

Value of the fee configured on the account.

Equivalent to config.fees.schedule.value on the credit account. Send a GET request to /credit/accounts/{account_token} to retrieve an existing credit account.

Returned for fee ledger entries only.

Allowable Values:

data[].detail_object.currency_code

string
Conditionally returned

A valid three-digit ISO 4217 currency code

Allowable Values:

USD

data[].detail_object.amount

decimal
Conditionally returned

Amount of the fee.

Returned for fee ledger entries only.

Allowable Values:

data[].detail_object.applied_to_amount

decimal
Conditionally returned

The total amount to which a percentage fee method is applied (for example, if a 3% fee is applied to 100, then 100 is the applied_to_amount value).

This field is not applicable for a flat fee method.

Returned for fee ledger entries only.

NOTE: This field is currently not supported and returns null.

Allowable Values:

data[].detail_object.description

string
Conditionally returned

Description of the fee.

Returned for fee ledger entries only.

Allowable Values:

data[].detail_object.created

datetime
Conditionally returned

Date and time when the fee was created.

Returned for fee ledger entries only.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

data[].detail_object.statement_token

string
Conditionally returned

Unique identifier of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

Existing statement summary token

data[].detail_object.statement_opening_date

datetime
Conditionally returned

Opening date of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

data[].detail_object.statement_closing_date

datetime
Conditionally returned

Closing date of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

data[].detail_object.statement_balance

decimal
Conditionally returned

Balance on the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

data[].detail_object.average_daily_balance

decimal
Conditionally returned

Average daily balance used to calculate interest.

Returned for interest ledger entries only.

Allowable Values:

data[].detail_object.goto_apr

decimal
Conditionally returned

Annual percentage rate.

Returned for interest ledger entries only.

Allowable Values:

0–100

data[].detail_object.daily_periodic_rate

decimal
Conditionally returned

Daily rate used to calculate interest.

Returned for interest ledger entries only.

Allowable Values:

0–100

data[].detail_object.days_in_billing_cycle

integer
Conditionally returned

Number of days in the billing cycle.

Returned for interest ledger entries only.

Allowable Values:

1–31

data[].detail_object.interest_amount

decimal
Conditionally returned

Amount of interest calculated for the billing period.

Returned for interest ledger entries only.

Allowable Values:

data[].detail_object.created_date

datetime
Conditionally returned

Date and time when the ledger entry was created.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

data[].detail_object.updated_date

datetime
Conditionally returned

Date and time when the ledger entry was last updated.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

Sample response body
JSON
Copied

Is this helpful?

Yes
No

Retrieve account ledger entry

Action: GET
Endpoint: /credit/accounts/{account_token}/ledgerentries/{ledger_entry_token}

Retrieve a ledger entry for a credit account.

URL path parameters
Fields Description

account_token

string
Required

The unique identifier of the credit account for which you want to retrieve ledger entries.

Send a GET request to /credit/accounts to retrieve existing credit account tokens.

Allowable Values:

Existing account token

ledger_entry_token

string
Required

The unique identifier of the ledger entry you want to retrieve.

Send a GET request to /credit/accounts/{account_token}/ledgerentries to retrieve existing ledger entry tokens.

Allowable Values:

Existing ledger entry token

Response body
Fields Description

token

string
Returned

Unique identifier of the ledger entry.

Allowable Values:

36 char max

related_token

string
Conditionally returned

Unique identifier of the original ledger entry. If the current ledger entry is the original, this field is returned empty.

Allowable Values:

Existing ledger entry token

root_token

string
Conditionally returned

Unique identifier of the root ledger entry. If the current ledger entry is the root, this field is returned empty.

Allowable Values:

Existing ledger entry token

account_token

string
Returned

Unique identifier of the credit account associated with the credit card used to make the ledger entry.

Allowable Values:

Existing credit account token

card_token

string
Returned

Unique identifier of the credit card used to make the ledger entry.

Allowable Values:

8–36 chars

Existing credit card token

status

string
Returned

Status of the ledger entry when it was initially recorded and had an impact on the balance, either PENDING or POSTED. This field is immutable and may not represent the current status.

To view the current status of purchases, refunds, OCTs, and payments, see the detail_object.state field. These ledger entries start in PENDING and can transition to CLEARED, DECLINED, or ERROR. This transition of status is only sent through webhook event notifications.

Ledger entries that are final transactions, such as clearings, start and remain in a POSTED state.

NOTE: CLEARED, DECLINED, and ERROR are special statuses that do not have an impact on the account balance, and are not recorded in the ledger. For these special statuses, impact_time, request_time, created_time, token, and id are returned blank.

Allowable Values:

PENDING, POSTED, DECLINED, ERROR, CLEARED

group

string
Returned

Group to which the ledger entry belongs.

Allowable Values:

PURCHASE, INTERNAL, FEE, REWARD, INTEREST, PAYMENT, ADJUSTMENT, BALANCE_TRANSFER, CASH_ADVANCE, BALANCE_REFUND, ORIGINAL_CREDIT

type

string
Returned

The ledger entry event type.

Allowable Values:

Example: authorization.clearing

id

string
Returned

Eight-digit numeric identifier of the ledger entry, an alternate identifier to the UUID that is useful for remembering and referencing.

Allowable Values:

8 chars

amount

decimal
Returned

Amount of the ledger entry.

Allowable Values:

Any decimal

currency_code

string
Returned

A valid three-digit ISO 4217 currency code

Allowable Values:

USD

memo

string
Returned

Merchant name or description for the ledger entry.

Allowable Values:

Example: Whole Foods Market

request_time

datetime
Returned

For purchases, the date and time of the authorization, which is when the user initiates the ledger entry.

For other ledger entry groups, equivalent to impact_time.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

impact_time

datetime
Returned

Date and time when the ledger entry impacts the account balance.

For purchases, this is the time of the authorization.

For purchase authorization clearings, this is the time when the transaction is settled.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

created_time

datetime
Returned

Date and time when the ledger entry was created on Marqeta’s credit platform.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

dispute_token

string
Conditionally returned

Unique identifier of the dispute, if the ledger entry is disputed.

Allowable Values:

Existing dispute token

detail_token

string
Returned

Unique identifier of the ledger entry’s full details.

Allowable Values:

36 char max

detail_object

object
Conditionally returned

Contains the ledger entry’s full details. The fields returned in this object vary based on the ledger entry type.

The following lists each ledger entry type and the specific fields returned for each type.

Allowable Values:

Existing detail object

detail_object.token

string
Conditionally returned

Unique identifier of the interest charge or fee.

If in the detail_object, unique identifier of the detail object.

Returned for interest or fee ledger entries only.

Allowable Values:

36 char max

detail_object.account_token

string
Conditionally returned

Unique identifier of the credit account on which the interest or fee was charged.

Returned for interest or fee ledger entries only.

Allowable Values:

36 char max

Existing credit account token

detail_object.type

string
Conditionally returned

Type of fee.

Returned for fee ledger entries only.

Allowable Values:

FOREIGN_TRANSACTION_FEE, OVER_LIMIT_FEE, LATE_PAYMENT_FEE, RETURNED_PAYMENT_FEE, CARD_REPLACEMENT_FEE, MINIMUM_INTEREST_FEE, ANNUAL_FEE, MONTHLY_FEE

detail_object.method

string
Conditionally returned

Method used to calculate the fee value.

Returned for fee ledger entries only.

Allowable Values:

PERCENTAGE, FLAT

detail_object.value

decimal
Conditionally returned

Value of the fee configured on the account.

Equivalent to config.fees.schedule.value on the credit account. Send a GET request to /credit/accounts/{account_token} to retrieve an existing credit account.

Returned for fee ledger entries only.

Allowable Values:

detail_object.currency_code

string
Conditionally returned

A valid three-digit ISO 4217 currency code

Allowable Values:

USD

detail_object.amount

decimal
Conditionally returned

Amount of the fee.

Returned for fee ledger entries only.

Allowable Values:

detail_object.applied_to_amount

decimal
Conditionally returned

The total amount to which a percentage fee method is applied (for example, if a 3% fee is applied to 100, then 100 is the applied_to_amount value).

This field is not applicable for a flat fee method.

Returned for fee ledger entries only.

NOTE: This field is currently not supported and returns null.

Allowable Values:

detail_object.description

string
Conditionally returned

Description of the fee.

Returned for fee ledger entries only.

Allowable Values:

detail_object.created

datetime
Conditionally returned

Date and time when the fee was created.

Returned for fee ledger entries only.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

detail_object.statement_token

string
Conditionally returned

Unique identifier of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

Existing statement summary token

detail_object.statement_opening_date

datetime
Conditionally returned

Opening date of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

detail_object.statement_closing_date

datetime
Conditionally returned

Closing date of the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

detail_object.statement_balance

decimal
Conditionally returned

Balance on the statement summary from which you want to retrieve interest details.

Returned for interest ledger entries only.

Allowable Values:

detail_object.average_daily_balance

decimal
Conditionally returned

Average daily balance used to calculate interest.

Returned for interest ledger entries only.

Allowable Values:

detail_object.goto_apr

decimal
Conditionally returned

Annual percentage rate.

Returned for interest ledger entries only.

Allowable Values:

0–100

detail_object.daily_periodic_rate

decimal
Conditionally returned

Daily rate used to calculate interest.

Returned for interest ledger entries only.

Allowable Values:

0–100

detail_object.days_in_billing_cycle

integer
Conditionally returned

Number of days in the billing cycle.

Returned for interest ledger entries only.

Allowable Values:

1–31

detail_object.interest_amount

decimal
Conditionally returned

Amount of interest calculated for the billing period.

Returned for interest ledger entries only.

Allowable Values:

detail_object.created_date

datetime
Conditionally returned

Date and time when the ledger entry was created.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

detail_object.updated_date

datetime
Conditionally returned

Date and time when the ledger entry was last updated.

Allowable Values:

Format: yyyy-MM-dd’T’HH:mm:ss.Z

Sample response body

The following code block shows a sample PURCHASE ledger entry.

JSON
Copied

Is this helpful?

Yes
No

The following code block shows a sample interest ledger entry.

JSON
Copied

Is this helpful?

Yes
No

The following code block shows a sample fee ledger entry.

JSON
Copied

Is this helpful?

Yes
No
Join our developer newsletter