Warning
This page is currently deprecated and the functionality it describes will soon be unavailable. To learn more, contact your Marqeta representative.
This page is currently deprecated and the functionality it describes will soon be unavailable. To learn more, contact your Marqeta representative.
- About Credit Account Journal Entries - Developer guide
- Journal Entries - API reference
- Credit journal entry event types - Webhook notifications
/credit/accounts/{account_token}/ledgerentries endpoint. For the complete endpoint reference, see Credit Account Ledger Entries.
At the end of this guide, you should understand:
- What ledger entries are and how they originate.
- What the ledger entry groups.
- Each ledger entry group’s details and event types.
Ledger entry statuses
Ledger entries can have one of two statuses.-
PENDING– The ledger entry is pending; the account’s available credit is temporarily decreased in the ledger entry amount. -
POSTED– The ledger entry is posted to the account; the account balance is increased in the ledger entry amount.
Ledger entry groups
Every ledger entry belongs to a group, which is represented by thegroup field and useful for categorizing ledger entries.
Ledger entries can belong to one of the following groups:
-
PURCHASE -
FEE -
REWARD -
INTEREST -
PAYMENT -
ADJUSTMENT -
BALANCE_REFUND -
ORIGINAL_CREDIT
Ledger entry details
Each ledger entry contains a detail object, which is represented bydetail_object and contains fields specific to the ledger entry’s group. These fields vary based on the group.
For example, a ledger entry belonging to the purchase group returns purchase details, which are fields that come from the card network and are relevant to purchase transactions. A ledger entry belonging to the reward group won’t return purchase details but rather, reward details, which are fields relevant to rewards.
Each ledger entry also contains the detail_token field, which identifies a ledger entry’s details and populates fields in detail_object with values specific to that ledger entry.
Purchases
When a cardholder makes a purchase, a ledger entry belonging to thePURCHASE group is created on the credit account.
Purchase details
When retrieving a purchase ledger entry, purchase details are the fields returned in thedetail_object. These fields come from the card network and are conditionally returned based on the ledger entry’s type. For more on these fields, see Transactions.
The following code sample shows a ledger entry’s detail_object containing purchase details for an authorization clearing:
JSON
Purchase events
Marqeta’s credit platform sends webhook notifications when purchase authorizations and purchase authorization clearings occur. You can configure a webhook to capture the following purchase events:-
authorization -
authorization.incremental -
refund.authorization -
authorization.clearing -
authorization.reversal -
authorization.advice -
authorization.reversal.issuerexpiration -
refund.authorization.reversal -
refund.authorization.clearing -
refund -
pindebit -
pindebit.authorization.clearing -
pindebit.refund
Interest
When the conditions that cause an interest charge to be applied on a credit account are met, such as a cardholder carrying a balance from the previous month at the end of a billing period, a ledger entry belonging to theINTEREST group is created on the account.
You can configure interest calculation during credit product creation. For more, see Creating a credit product in Credit Products in the Marqeta Dashboard.
Interest details
When retrieving an interest ledger entry, interest details are the fields that are returned in thedetail_object, including interest charge calculation data. For field descriptions, see the Retrieve account ledger entry response fields.
The following code sample shows a ledger entry’s detail_object containing interest details:
JSON
Interest event
Marqeta’s credit platform sends webhook notifications when interest charges are applied on a credit account. You can configure a webhook to capture this interest event:account.interest
Fees
When the conditions that cause a fee to be applied on a credit account are met, a ledger entry belonging to theFEES group is created on the account.
- A late payment fee is applied when a payment is made past the payment due date.
- A returned payment fee is applied when a completed payment is returned.
- A minimum interest fee is applied when an account is charged interest that is lower than the minimum interest amount.
- An annual fee is applied when a periodic fee with an annual frequency is configured on a credit program.
- A monthly fee is applied when a periodic fee with an monthly frequency is configured on a credit program.
Fee details
When retrieving a fee ledger entry, fee details are the fields that are returned in thedetail_object. For field descriptions, see the Retrieve account ledger entry response fields.
The following code sample shows a ledger entry’s detail_object containing fee details:
JSON
Fee events
Marqeta’s credit platform sends webhook notifications when late payment, returned payment, and minimum interest fees are applied on a credit account. You can configure a webhook to capture the following fee events:-
account.fee.annual -
account.fee.latepayment -
account.fee.minimum.interest -
account.fee.monthly -
account.fee.returnpayment
Rewards
When the conditions that cause a reward to be applied on a credit account are met, a ledger entry belonging to theREWARD group is created on the account.
- A cash back reward is applied as cash back statement credits when a cardholder makes a qualifying purchase that results in cash back.
/credit/accounts/{account_token}/rewards endpoint. For the endpoint reference, see Account Rewards.
Reward details
When retrieving a reward ledger entry, reward details are the fields that are returned in thedetail_object. For field descriptions, see the Create account reward response fields.
The following code sample shows a ledger entry’s detail_object containing reward details:
JSON
Reward events
Marqeta’s credit platform sends webhook notifications when rewards are applied on a credit account. You can configure a webhook to capture the following reward events:account.reward.cashback
Payments
When an account holder makes a payment toward their credit account balance, a ledger entry belonging to thePAYMENT group is created on the account.
You can create a payment using the /credit/accounts/{account_token}/payments endpoint. For the endpoint reference, see Payments. For the guide, see the About Credit Account Payments.
Payment details
When retrieving a payment ledger entry, payment details are the fields that are returned in thedetail_object. For field descriptions, see the Retrieve account payment response fields.
The following code sample shows a ledger entry’s detail_object containing payment details:
JSON
Payment events
Marqeta’s credit platform sends webhook notifications when payment activity occurs on a credit account. You can configure a webhook to capture the following payment events:-
account.payment.pending -
account.payment.completed -
account.payment.returned -
account.payment.canceled -
account.payment.refunded
Adjustments
When the amount of an existing ledger entry or the account balance is adjusted, a ledger entry belonging to theADJUSTMENT group is created on the credit account.
There are many reasons to adjust a ledger entry or account balance, including provisional credits for disputes, returned or canceled payments, waived fees, account write-offs, and more. For more on provisional credits and adjustments for disputes, see About Credit Account Disputes.
You can adjust the amount of a ledger entry or account balance using the /credit/accounts/{account_token}/adjustments endpoint. To adjust a ledger entry amount, pass the ledger entry’s token in the original_ledger_entry_token field. To adjust an account balance, do not pass original_ledger_entry_token and pass a negative value in amount, which is the adjustment amount.
For the endpoint reference, see Adjustments.
Adjustment details
When retrieving an adjustment ledger entry, adjustment details are the fields that are returned in thedetail_object. For field descriptions, see the Retrieve account adjustment response fields.
The following code sample shows a ledger entry’s detail_object containing adjustment details:
JSON
Adjustment events
Marqeta’s credit platform sends webhook notifications when adjustments are applied on a credit account. You can configure a webhook to capture the following adjustment events:-
account.adjustment -
account.adjustment.purchase -
account.adjustment.purchase.graceperiod -
account.adjustment.fee -
account.adjustment.interest -
account.adjustment.reward
Balance refunds
When an account holder’s credit account balance is negative and a balance refund is issued to bring the balance to, or closer to, 0, a ledger entry belonging to theBALANCE_REFUND group is created on the credit account.
You can create a balance refund using the /credit/accounts/{account_token}/creditbalancerefunds endpoint. For the endpoint reference, see Balance Refunds.
Balance refund details
When retrieving a balance refund ledger entry, balance refund details are the fields that are returned in thedetail_object. For field descriptions, see the Create balance refund response fields.
The following code sample shows a ledger entry’s detail_object containing balance refund details:
JSON
Balance refund event
Marqeta’s credit platform sends webhook notifications when balance refunds are issued on a credit account. You can configure a webhook to capture the following balance refund event:account.balance.refund
Original credit transactions (OCT)
When the card network pushes an OCT payment that disburses funds to a credit card, a ledger entry belonging to theORIGINAL_CREDIT group is created on the credit account.
OCT details
When retrieving an OCT ledger entry, OCT details are the fields returned in thedetail_object. These fields come from the card network and are conditionally returned based on the ledger entry’s type. For more, see the original_credit object in Transactions.
The following code sample shows a ledger entry’s detail_object containing OCT details:
JSON
OCT events
Marqeta’s credit platform sends webhook notifications when OCT events occur. You can configure a webhook to capture the following OCT events:-
original.credit.authorization -
original.credit.authorization.reversal -
original.credit.authorization.clearing -
original.credit.authpluscapture -
original.credit.authpluscapture.reversal