> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# About Credit Account Journal Entries

> Learn about credit account journal entries, which include purchases, fees, rewards, interest, payments, adjustments, and more.

A credit account journal entry is a record of an entry made on a credit account journal, such as a purchase transaction, fee, adjustment, and more.

Journal entries originate when a journal entry event occurs, such as a cardholder making a purchase, which creates purchase journal entry, or an account holder making a payment past due, which creates a late payment fee journal entry. For more on journal entry events, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events).

On Marqeta’s credit platform, you can retrieve journal entries on a credit account by using the `/credit/accounts/{account_token}/journalentries` endpoint. For the complete endpoint reference, see [Journal Entries](/core-api/credit-account-journal-entries/).

At the end of this guide, you should understand:

* What journal entries are and how they originate.

* What the journal entry groups.

* Each journal entry group’s details and event types.

<h2 id="_journal_entry_statuses">
  Journal entry statuses
</h2>

Journal entries can have one of two statuses.

* `PENDING` — The journal entry affects the account’s pending balance. The account’s available credit is temporarily decreased in the journal entry amount, unless the journal entry is an initiated dispute or initiated payment.

* `POSTED` — The journal entry is posted to the account and the account balance is increased in the journal entry amount. In the case of a dispute resolved in the account holder’s favor or a completed payment, the hold on available credit is released.

<h2 id="_journal_entry_groups">
  Journal entry groups
</h2>

Every journal entry belongs to a group, which is represented by the `group` field and useful for categorizing journal entries.

Journal entries can belong to one of the following groups:

* `PURCHASE`

* `REFUND`

* `DISPUTE`

* `FEE`

* `REWARD`

* `INTEREST`

* `PAYMENT`

* `ADJUSTMENT`

* `BALANCE_REFUND`

* `ORIGINAL_CREDIT`

For more on each group, see their respective sections in this guide.

<h2 id="_differences_between_the_state_and_status_fields">
  Differences between the state and status fields
</h2>

Although the `status` and `state` fields may appear similar at first, they are not related to each other.

`status` is passed directly to, or returned directly from, the `/credit/accounts/{account_token}/journalentries` endpoint and indicates how the journal entry impacts the present or future account balance. Every journal entry type maps to an immutable `status` value. For example, `status` fields for journal entries of the type `authorization` are always `PENDING`, those of type `authorization.clearing` are always `POSTED`, and so on. Every time a journal entry of a given type is retrieved, it includes the original `status` value with which it was created, and that value is the same as every other journal entry of that type.

`state` is a field of the `detail_object` that is returned with a journal entry when it is requested from the endpoint. It represents the state of the journal entry at a point in time, such as whether a purchase is `PENDING` or `DECLINED` or whether a dispute is `ACTIVE` or `REVERSED`. Unlike the value of the `status` field, the value of the `state` field can change over time for many types of journal entries. For example, a journal entry with a type of `authorization` might have a `detail_object.state` value of `PENDING` when initially retrieved, but that value might change to `CLEARED` when the journal entry is retrieved again.

<h2 id="_journal_entry_details">
  Journal entry details
</h2>

Each journal entry contains a detail object, which is represented by `detail_object` and contains fields specific to the journal entry’s group. These fields vary based on the group.

For example, a journal 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 journal entry belonging to the reward group will not return purchase details but rather, reward details, which are fields relevant to rewards.

Each journal entry also contains the `detail_token` field, which identifies a journal entry’s details and populates fields in `detail_object` with values specific to that journal entry.

<h2 id="_time_fields">
  Time fields
</h2>

The meanings of the `created_time`, `request_time`, and `impact_time` fields on a journal entry depend on the journal entry’s group. These fields are not present for journal entries with certain `status` values.

In this section, you will learn:

* What these fields mean for different journal entry groups

* For which `status` values these fields are returned empty.

<h3 id="_different_meanings_of_impact_time_by_transaction_type">
  Different meanings of impact\_time by transaction type
</h3>

The meaning of `impact_time` differs between purchases and purchase authorization clearings. In purchases, the `impact_time` field represents the time when the purchase was authorized. In purchase authorization clearings, `impact_time` refers to the settlement time. In both cases, the impact time is the time at which an account balance is affected. For a purchase, the impact time is typically the time at which the available credit changes. For a purchase authorization clearing, the impact time is the time at which the credit balance changes.

<h3 id="_conditions_where_blank_fields_are_returned">
  Conditions where blank fields are returned
</h3>

The three fields discussed in this section, `created_time`, `request_time`, and `impact_time`, as well as two others, `token` and `id`, are returned empty when `status` is `CLEARED`, `DECLINED`, or `ERROR`.

<h2 id="_purchases">
  Purchases
</h2>

When a cardholder makes a purchase, a journal entry belonging to the `PURCHASE` group is created on the credit account. Merchants may send purchases as single-message or dual-message transactions. For more, see [Transactions in the payments ecosystem](/developer-guides/about-transactions/#_transactions_in_the_payments_ecosystem) in the About Transactions guide.

<h3 id="_purchase_details">
  Purchase details
</h3>

When retrieving a purchase journal entry, purchase details are the fields returned in the `detail_object`. These fields come from the card network and are conditionally returned based on the journal entry’s `type`. For more on these fields, see [Transactions](/core-api/transactions/).

The following code sample shows a journal entry’s `detail_object` containing purchase details for an authorization clearing:

```json JSON expandable lines wrap theme={null}
{
    "detail_object": {
        "type": "authorization.clearing",
        "state": "COMPLETION",
        "identifier": "6457",
        "token": "detail_token_645736",
        "user_token": "user_token4632",
        "acting_user_token": "user_token4632",
        "card_token": "my_credit_card_token7794",
        "preceding_related_transaction_token": "journal_entry_token2460",
        "gpa": {
            "currency_code": "USD",
            "journal_balance": 61.70,
            "available_balance": 0.00,
            "credit_balance": 0.00,
            "pending_credits": 0.00,
            "impacted_amount": -9.11,
            "balances": {
                "USD": {
                    "currency_code": "USD",
                    "journal_balance": 61.70,
                    "available_balance": 0.00,
                    "credit_balance": 0.00,
                    "pending_credits": 0.00,
                    "impacted_amount": -9.11
                }
            }
        },
        "gpa_order": {
            "token": "gpa_order_token2c2c5",
            "amount": 9.11,
            "created_time": "2021-09-25T20:59:43Z",
            "last_modified_time": "2021-09-26T11:53:47Z",
            "transaction_token": "transaction_token42352a",
            "state": "COMPLETION",
            "response": {
                "code": "0000",
                "memo": "Approved or completed successfully"
            },
            "funding": {
                "amount": 9.11,
                "source": {
                    "type": "programgateway",
                    "token": "**********oken",
                    "active": true,
                    "name": "My Funding Source",
                    "is_default_account": false,
                    "created_time": "2021-06-22T18:41:14Z",
                    "last_modified_time": "2021-06-22T18:41:14Z"
                }
            },
            "funding_source_token": "**********oken",
            "jit_funding": {
                "token": "jit_funding_token43a3",
                "method": "pgfs.authorization.capture",
                "user_token": "user_token4632",
                "acting_user_token": "user_token4632",
                "amount": 9.11,
                "original_jit_funding_token": "jit_funding_token4be7"
            },
            "user_token": "user_token4632",
            "currency_code": "USD"
        },
        "duration": 378,
        "created_time": "2021-09-26T11:53:46Z",
        "user_transaction_time": "2021-09-25T20:59:43Z",
        "settlement_date": "2021-09-26T00:00:00Z",
        "request_amount": 9.11,
        "amount": 9.11,
        "currency_conversion": {
            "network": {
                "original_amount": 9.11,
                "conversion_rate": 1.000000,
                "original_currency_code": "840"
            }
        },
        "issuer_interchange_amount": 0.191310,
        "currency_code": "USD",
        "approval_code": "946791",
        "response": {
            "code": "0000",
            "memo": "Approved or completed successfully"
        },
        "network": "VISA",
        "subnetwork": "VISANET",
        "acquirer_fee_amount": 0,
        "acquirer": {
            "system_trace_audit_number": "000000"
        },
        "fees": [
            {
                "type": "INTERCHANGE_FEE",
                "amount": 0.191310,
                "credit_debit": "C"
            }
        ],
        "user": {
            "metadata": {
                "notification_email": "hello@myemail.com"
            }
        },
        "card": {
            "last_four": "4489",
            "metadata": {}
        },
        "issuer_received_time": "2021-09-26T11:53:46.886Z",
        "issuer_payment_node": "042f97a3458b59e3cce0269f66e864d8",
        "network_reference_id": "000218552461989029",
        "clearing_record_sequence_number": "00",
        "batch_number": "2021048291031352",
        "acquirer_reference_data": "43551063958600534001332",
        "card_acceptor": {
            "mid": "000555600244811",
            "mcc": "5814",
            "name": "SWEET TREATS 0484",
            "city": "OAKLAND",
            "state": "CA",
            "postal_code": "94612",
            "country_code": "US"
        },
        "pos": {
            "terminal_id": "00000101",
            "pin_present": false,
            "partial_approval_capable": false,
            "purchase_amount_only": false,
            "is_recurring": false,
            "is_installment": false
        },
        "transaction_metadata": {
            "payment_channel": "OTHER"
        },
        "network_metadata": {
            "product_id": "VISA_TRADITIONAL",
            "program_id": ""
        }
    }
}
```

<h3 id="_purchase_events">
  Purchase events
</h3>

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`

* `authorization.clearing`

* `authorization.reversal`

* `authorization.advice`

* `authorization.reversal.issuerexpiration`

* `pindebit`

* `pindebit.authorization.clearing`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_purchase_refunds">
  Purchase refunds
</h2>

When a merchant initiates a purchase refund, a journal entry belonging to the `REFUND` group is created on the credit account. Merchants may send refunds as single-message or dual-message transactions. For more, see [Transactions in the payments ecosystem](/developer-guides/about-transactions/#_transactions_in_the_payments_ecosystem) in the About Transactions guide.

<h3 id="_purchase_refund_details">
  Purchase refund details
</h3>

When retrieving a purchase refund journal entry, refund details are the fields returned in the `detail_object`. These fields come from the card network and are conditionally returned based on the journal entry’s `type`. For more on these fields, see [Transactions](/core-api/transactions/).

The following code sample shows a journal entry’s `detail_object` containing purchase details for a refund:

```json JSON expandable lines wrap theme={null}
{
    "detail_object": {
            "identifier": "1244",
            "token": "3db9e8ef-14dc-471e-9a37-90c8ae0c982b",
            "user_token": "76660fc8-f604-4836-8fe3-76a6d9c2f732",
            "business_token": null,
            "acting_user_token": "76660fc8-f604-4836-8fe3-76a6d9c2f732",
            "card_token": "9c2fcf39-979a-4123-909f-0820f6643a55",
            "type": "refund",
            "state": "COMPLETION",
            "duration": 144,
            "created_time": 1651169714.000000000,
            "user_transaction_time": 1651169714.000000000,
            "request_amount": 25.0,
            "amount": 25.0,
            "cash_back_amount": null,
            "currency_code": "USD",
            "approval_code": "765924",
            "response": {
                "code": "0000",
                "memo": "Approved or completed successfully"
            },
            "preceding_related_transaction_token": null,
            "merchant": null,
            "card_acceptor": {
                "mid": "1234",
                "mcc": null,
                "network_mid": "1234",
                "mcc_groups": [
                    "NONE"
                ],
                "name": "Jane The Bakery",
                "address": "1881 Geary Blvd",
                "city": "San Francisco",
                "state": "CA",
                "zip": null,
                "country": "USA",
                "poi": {
                    "tid": null,
                    "partial_approval_capable": "0",
                    "card_presence": null,
                    "cardholder_presence": null,
                    "channel": null,
                    "processing_type": null,
                    "pin_present": null
                }
            },
            "currency_conversion": null,
            "gpa": {
                "currency_code": "USD",
                "ledger_balance": 0.0,
                "available_balance": 0.0,
                "credit_balance": 0.0,
                "pending_credits": 0.0,
                "impacted_amount": 25.0
            },
            "gpa_order": null,
            "gpa_order_unload": {
                "funding": {
                    "amount": 25.0,
                    "funding_source": null,
                    "source_address": null,
                    "gateway_log": null
                },
                "jit_funding": {
                    "token": "3ecdd42d-c798-4a84-a755-1948f95eb35a",
                    "method": "pgfs.refund",
                    "user_token": "76660fc8-f604-4836-8fe3-76a6d9c2f732",
                    "acting_user_token": "76660fc8-f604-4836-8fe3-76a6d9c2f732",
                    "business_token": null,
                    "amount": 25.0,
                    "memo": null,
                    "tags": null,
                    "decline_reason": null,
                    "original_jit_funding_token": null,
                    "incremental_authorization_jit_funding_tokens": null,
                    "address_verification": null,
                    "balances": null
                },
                "tags": null
            },
            "card": {
                "last_four": "7692",
                "metadata": {

                }
            },
            "fee": null,
            "chargeback": null,
            "network": "DISCOVER",
            "subnetwork": null,
            "fees": null,
            "user": {
                "metadata": {

                }
            },
            "pos": null,
            "multi_clearing_sequence_number": null,
            "unparsed": null,
            "standin_approved_by": null,
            "standin_by": null,
            "standin_reason": null
        }
    }
}
```

<h3 id="_purchase_refund_events">
  Purchase refund events
</h3>

Marqeta’s credit platform sends webhook notifications when purchase refunds occur. You can configure a webhook to capture the following refund events:

* `pindebit.refund`

* `refund`

* `refund.authorization`

* `refund.authorization.reversal`

* `refund.authorization.clearing`

* `refund.authorization.reversal.issuerexpiration`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_interest">
  Interest
</h2>

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 journal entry belonging to the `INTEREST` group is created on the account.

You can configure interest calculation during the creation of a credit product policy. For more, see [Creating a credit product policy](/developer-guides/credit-programs-dashboard/#_creating_a_credit_product_policy) in the Credit Programs in the Marqeta Dashboard guide.

<h3 id="_interest_details">
  Interest details
</h3>

When retrieving an interest journal entry, interest details are the fields that are returned in the `detail_object`, including interest charge calculation data. For field descriptions, see the [Retrieve account journal entry](/core-api/credit-account-journal-entries/#get_account_journal_entry) response fields.

The following code sample shows a journal entry’s `detail_object` containing interest details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_96749",
        "account_token": "my_account_token_12",
        "statement_token": "statement_token_75b",
        "statement_opening_date": "2021-07-01T04:00:00.000Z",
        "statement_closing_date": "2021-08-01T03:59:59.999Z",
        "statement_balance": 208.93,
        "average_daily_balance": 181.67,
        "goto_apr": 14.99,
        "daily_periodic_rate": 0.00041068,
        "days_in_billing_cycle": 31,
        "interest_amount": 2.31,
        "currency_code": "USD",
        "created_date": "2021-08-01T07:00:19.755Z",
        "updated_date": "2021-08-01T07:00:19.755Z"
    }
}
```

<h3 id="_interest_event">
  Interest event
</h3>

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`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_fees">
  Fees
</h2>

When the conditions that cause a fee to be applied on a credit account are met, a journal entry belonging to the `FEES` 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.

When creating a fee policy, you can select the fees that you want to include in the bundle that contains the fee policy. Then, when creating a credit account based on that bundle, you can define the selected fee’s schedule, method, value, and effective date. You cannot define fees that you did not select during fee policy creation, and only defined fees can be entries on the credit account journal, provided the conditions to apply the fee are met. For more on including fees when creating a fee policy, see [Creating a fee policy](/developer-guides/credit-programs-dashboard/#_creating_a_fee_policy) in the Credit Programs in the Marqeta Dashboard guide.

<h3 id="_fee_details">
  Fee details
</h3>

When retrieving a fee journal entry, fee details are the fields that are returned in the `detail_object`. For field descriptions, see the [Retrieve account journal entry](/core-api/credit-account-journal-entries/#get_account_journal_entry) response fields.

The following code sample shows a journal entry’s `detail_object` containing fee details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_11221",
        "account_token": "my_account_token_12",
        "type": "LATE_PAYMENT_FEE",
        "method": "FLAT",
        "value": 25.0000,
        "currency_code": "USD",
        "amount": 15.00,
        "applied_to_amount": null,
        "description": "Late Payment Fee",
        "created": "2021-07-01T07:00:24.239Z"
    }
}
```

<h3 id="_fee_events">
  Fee events
</h3>

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.payment.late`

* `account.fee.payment.returned`

* `account.fee.interest.minimum`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_rewards">
  Rewards
</h2>

When the conditions that cause a reward to be applied on a credit account are met, a journal entry belonging to the `REWARD` 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.

You can create a reward using the `/credit/accounts/{account_token}/rewards` endpoint. For the complete endpoint reference, see [Account Rewards](/core-api/credit-account-rewards/).

<h3 id="_reward_details">
  Reward details
</h3>

When retrieving a reward journal entry, reward details are the fields that are returned in the `detail_object`. For field descriptions, see the [Create account reward](/core-api/credit-account-rewards/#create_reward) response fields.

The following code sample shows a journal entry’s `detail_object` containing reward details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_76001",
        "account_token": "my_account_token_12",
        "type": "CASH_BACK",
        "description": "$20 reward",
        "currency_code": "USD",
        "amount": 20.00,
        "applied_to_amount": null,
        "method": null,
        "value": null,
        "note": "string",
        "updated_time": "2021-09-03T22:53:57.895Z",
        "created_time": "2021-09-03T22:53:57.895Z"

    }
}
```

<h3 id="_reward_events">
  Reward events
</h3>

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`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_payments">
  Payments
</h2>

When an account holder makes a payment toward their credit account balance, a journal entry belonging to the `PAYMENT` group is created on the account.

You can create a payment using the `/credit/accounts/{account_token}/payments` endpoint. For the complete endpoint reference, see [Payments](/core-api/credit-account-payments/).

For more on payments, see [About Credit Account Payments](/developer-guides/about-credit-account-payments/).

<h3 id="_payment_details">
  Payment details
</h3>

When retrieving a payment journal entry, payment details are the fields that are returned in the `detail_object`. For field descriptions, see the [Retrieve account payment](/core-api/credit-account-payments/#retrieve_payment) response fields.

The following code sample shows a journal entry’s `detail_object` containing payment details:

```json JSON expandable lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_2551",
        "account_token": "my_account_token_12",
        "method": "CHECK",
        "payment_source_token": null,
        "amount": 25.00,
        "currency_code": "USD",
        "status": "COMPLETED",
        "description": "minimum payment",
        "hold_days": 5,
        "hold_end_time": "2021-09-16T23:01:18.316Z",
        "is_manually_released": false,
        "on_hold": true,
        "created_time": "2021-09-09T23:01:18.316Z",
        "updated_time": "2021-09-09T23:01:18.347Z",
        "transitions": [
            {
                "token": "my_transition_token1234",
                "account_token": "my_account_token_12",
                "payment_token": "my_payment_25",
                "status": "COMPLETED",
                "refund_details": null,
                "created_time": "2021-09-09T23:01:18.323Z"
            }
        ]
    }
}
```

<h3 id="_payment_events">
  Payment events
</h3>

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`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial). For more on payments, see [About Credit Account Payments](/developer-guides/about-credit-account-payments/).

<h2 id="_disputes">
  Disputes
</h2>

When a purchase is disputed, a journal entry belonging to the `DISPUTE` group is created on the credit account.

You can create a dispute using the `/credit/accounts/{account_token}/disputes` endpoint. For the complete endpoint reference, see [Credit Disputes](/core-api/credit-account-disputes/).

For more on disputes, see [About Credit Account Disputes](/developer-guides/about-credit-account-disputes/).

<h3 id="_dispute_details">
  Dispute details
</h3>

When retrieving a dispute journal entry, dispute details are the fields that are returned in the `detail_object`. For field descriptions, see the [Retrieve account dispute](/core-api/credit-account-disputes/#retrieve_dispute) response fields.

The following code sample shows a journal entry’s `detail_object` containing dispute details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "dispute_token_1234",
        "ledger_entry_token": "ledger_entry_token1222",
        "account_token": "account_token_12",
        "amount": 500,
        "status": "ACTIVE",
        "category": "FRAUD",
        "notes": "string",
        "resolved_at": "2021-07-01T00:27:09.000Z",
        "updated_time": "2021-07-01T00:27:09.000Z",
        "created_time": "2021-07-01T00:27:09.000Z"

    }
}
```

<h3 id="_dispute_events">
  Dispute events
</h3>

Marqeta’s credit platform sends webhook notifications when dispute events occur on a credit account. You can configure a webhook to capture the following dispute events:

* account.dispute

* account.dispute.reversed

* account.dispute.won

* account.adjustment.lost

* account.adjustment.lost.graceperiod

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_adjustments">
  Adjustments
</h2>

When the amount of an existing journal entry or the account balance is adjusted, a journal entry belonging to the `ADJUSTMENT` group is created on the credit account.

There are many reasons to adjust a journal entry or account balance, including interest adjustments due to returned or canceled payments, waived fees, account write-offs, and more.

You can adjust the amount of a journal entry or account balance by creating an adjustment using the `/credit/accounts/{account_token}/adjustments` endpoint.

To adjust a journal entry amount, pass the journal entry’s token in the `original_journal_entry_token` field. To adjust an account balance, which creates a general credit adjustment that does not affect a journal entry, do not pass `original_journal_entry_token` and pass a negative value in `amount`, which is the adjustment amount.

For the complete endpoint reference, see [Adjustments](/core-api/credit-account-adjustments/).

<h3 id="_adjustment_details">
  Adjustment details
</h3>

When retrieving an adjustment journal entry, adjustment details are the fields that are returned in the `detail_object`. For field descriptions, see the [Retrieve account adjustment](/core-api/credit-account-adjustments/#retrieve_adjustment) response fields.

The following code sample shows a journal entry’s `detail_object` containing adjustment details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_45362",
        "account_token": "my_account_token_12",
        "type": "INTEREST",
        "original_journal_entry_token": null,
        "external_adjustment_id": null,
        "detail_token": null,
        "adjustment_detail_object": null,
        "related_detail_token": null,
        "related_detail_object": null,
        "amount": -100.00,
        "currency_code": "USD",
        "description": "interest adjustment",
        "note": null,
        "reason": "OTHER"
    }
}
```

<h3 id="_adjustment_events">
  Adjustment events
</h3>

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`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_credit_balance_refunds">
  Credit balance refunds
</h2>

When an account holder’s credit account balance is negative and a balance refund is issued to bring the balance closer to 0.00, a journal entry belonging to the `BALANCE_REFUND` group is created on the credit account.

You can create a balance refund using the `/credit/accounts/{account_token}/creditbalancerefunds` endpoint. For the complete endpoint reference, see [Balance Refunds](/core-api/credit-account-balance-refunds/).

<h3 id="_balance_refund_details">
  Balance refund details
</h3>

When retrieving a balance refund journal entry, balance refund details are the fields that are returned in the `detail_object`. For field descriptions, see the [Create balance refund](/core-api/credit-account-balance-refunds/#create_balance_refund) response fields.

The following code sample shows a journal entry’s `detail_object` containing balance refund details:

```json JSON lines wrap theme={null}
{
    "detail_object": {
        "token": "detail_token_77804",
        "account_token": "my_account_token_12",
        "status": "COMPLETED",
        "method": "CHECK",
        "amount": 0,
        "description": "credit balance refund",
        "created_time": "2021-07-14T20:17:28Z",
        "updated_time": "2021-07-14T20:17:28Z"
    }
}
```

<h3 id="_balance_refund_event">
  Balance refund event
</h3>

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.balancerefund`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).

<h2 id="_original_credit_transactions_oct">
  Original credit transactions (OCT)
</h2>

When the card network pushes an OCT payment that disburses funds to a credit card, a journal entry belonging to the `ORIGINAL_CREDIT` group is created on the credit account.

<h3 id="_oct_details">
  OCT details
</h3>

When retrieving an OCT journal entry, OCT details are the fields returned in the `detail_object`. These fields come from the card network and are conditionally returned based on the journal entry’s `type`. For more, see the `original_credit` object in [Transactions](/core-api/transactions/).

The following code sample shows a journal entry’s `detail_object` containing OCT details:

```json JSON expandable lines wrap theme={null}
{
  "detail_object": {
    "type": "original.credit.auth_plus_capture",
    "state": "COMPLETION",
    "token": "journal_entry_token77104c",
    "user_token": "user_token4d090",
    "acting_user_token": "user_token4d090",
    "card_token": "card_token8445",
    "original_credit": {
      "transaction_type": "disbursement"
    },
    "gpa": {
      "currency_code": "USD",
      "journal_balance": 10,
      "available_balance": 10,
      "credit_balance": 0,
      "pending_credits": 0,
      "impacted_amount": 10,
      "balances": {
        "USD": {
          "currency_code": "USD",
          "journal_balance": 10,
          "available_balance": 10,
          "credit_balance": 0,
          "pending_credits": 0,
          "impacted_amount": 10
        }
      }
    },
    "duration": 199,
    "created_time": "2020-07-08T23:47:04Z",
    "user_transaction_time": "2020-07-08T23:47:04Z",
    "request_amount": 10,
    "amount": 10,
    "currency_code": "USD",
    "approval_code": "206645",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "merchant": {
      "name": "John Doe Merchant Inc.",
      "active": true,
      "contact": "John D. Doe",
      "contact_email": "jdoe@domain.com",
      "longitude": 0,
      "latitude": 0,
      "address1": "180 Grand Avenue",
      "address2": "Suite 2303",
      "city": "Oakland",
      "state": "CA",
      "zip": "94612",
      "country": "USA",
      "token": "merchant_token623dd37",
      "partial_auth_flag": true,
      "created_time": "2020-02-14T00:57:02Z",
      "last_modified_time": "2020-02-14T00:57:02Z"
    },
    "store": {
      "name": "Sally's Sweet Tooth",
      "active": false,
      "longitude": 0,
      "latitude": 0,
      "address1": "111 Main St",
      "city": "Berkeley",
      "state": "CA",
      "zip": "94702",
      "token": "store_token17500",
      "partial_auth_flag": true,
      "mid": "11111",
      "merchant_token": "merchant_token623dd37",
      "partial_approval_capable": true,
      "keyed_auth_cvv_enforced": false,
      "created_time": "2020-02-14T01:18:38Z",
      "last_modified_time": "2020-02-14T01:18:38Z"
    },
    "network": "VISA",
    "subnetwork": "VISANET",
    "acquirer_fee_amount": 0,
    "acquirer": {
      "institution_id_code": "05779900106",
      "retrieval_reference_number": "726213433770",
      "system_trace_audit_number": "881236"
    },
    "fees": [
      {
        "type": "ISSUER_LOAD_SURCHARGE_FEE",
        "amount": 0
      }
    ],
    "user": {
      "metadata": {}
    },
    "card": {
      "last_four": "3201",
      "metadata": {}
    },
    "issuer_received_time": "2020-07-08T23:47:04.577Z",
    "issuer_payment_node": "715de90f8dd6eeb2d87251dd691d7de2",
    "card_acceptor": {
      "mid": "11111",
      "mcc": "00",
      "country_code": "USA"
    },
    "pos": {
      "terminal_id": "TR100000",
      "partial_approval_capable": false,
      "purchase_amount_only": false,
      "is_recurring": false
    }
  },
    "raw_iso8583": {
      "0": "2210",
      "2": "1111119311153201",
      "3": "260000",
      "4": 10,
      "5": 10,
      "7": "0708234704",
      "11": "881236",
      "12": "114704",
      "13": "0708",
      "14": "2307",
      "15": "0708",
      "17": "0708",
      "22": "10000000020000000100000001000000",
      "26": "00",
      "32": "05779900106",
      "33": "13747132476",
      "37": "726213433770",
      "38": "206645",
      "39": "0000",
      "41": "TR100000",
      "42": "11111",
      "43": {
        "7": "840"
      },
      "44": {
        "1": "Approved or completed successfully",
        "3": "00",
        "4": "Approved or completed successfully"
      },
      "48": "OCT        07012020",
      "50": "840",
      "54": "00028402C00000000100000018402C000000001000",
      "58": "00000000022",
      "59": "0000000",
      "63": "VISA",
      "112": {
        "101": "10.00",
        "102": "10.00",
        "103": "840"
      },
      "113": {
        "2": "106",
        "32": "VISANET",
        "35": "API",
        "42": "DISBURSEMENT",
        "46": "true"
      },
      "123": "123 Main St."
    }
}
```

<h3 id="_oct_events">
  OCT events
</h3>

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`

For more on events, including event descriptions, see [Credit journal entry events](/core-api/event-types/#_credit_journal_entry_events). For more on subscribing to webhook notifications, see the About Webhooks [tutorial](/developer-guides/about-webhooks/#_tutorial).
