Marqeta Journal Entries API

// Conditional snippet for beta or internal content include::../../maturity-admonition-banner.adoc[] Use the journal entries endpoints to retrieve journal entries made on an > on Marqeta's credit platform. A journal entry is a record of an entry made on an account journal, such as a purchase transaction, fee, adjustment, and more. For more on the different types of journal entries, see >. Journal entries originate when a journal entry event occurs, such as a cardholder making a purchase or an account holder making a payment. To receive webhook notifications when journal entry events occur, see > in Event Types.

OpenAPI Specification

marqeta-journal-entries-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: support@marqeta.com
    name: Marqeta
  description: Marqeta's Core API endpoints, conveniently annotated to enable code generation (including SDKs), test cases, and documentation. Currently in beta.
  termsOfService: https://www.marqeta.com/api-terms
  title: Core accepted countries Journal Entries API
  version: 3.0.39
servers:
- url: /v3
security:
- mqAppAndAccessToken: []
tags:
- description: '// Conditional snippet for beta or internal content

    include::../../maturity-admonition-banner.adoc[]


    Use the journal entries endpoints to retrieve journal entries made on an <</core-api/credit-accounts, account>> on Marqeta''s credit platform.


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

    For more on the different types of journal entries, see <</developer-guides/about-credit-account-journal-entries, About Credit Account Journal Entries>>.


    Journal entries originate when a journal entry event occurs, such as a cardholder making a purchase or an account holder making a payment.

    To receive webhook notifications when journal entry events occur, see <</core-api/event-types#_credit_journal_entry_events, Credit journal entry events>> in Event Types.'
  name: Journal Entries
paths:
  /accounts/{account_token}/journalentries:
    get:
      description: 'Retrieve an array of journal entries on a credit account.


        This endpoint supports <</core-api/sorting-and-pagination, sorting and pagination>> and <</core-api/object-expansion, object expansion>>.'
      operationId: ListAccountJournalEntries
      parameters:
      - description: 'Unique identifier of the credit account for which you want to retrieve journal entries.


          Send a `GET` request to `/credit/accounts` to retrieve existing credit account tokens.'
        explode: false
        in: path
        name: account_token
        required: true
        schema:
          type: string
          x-allowableValues: Existing account token
        style: simple
      - description: Number of journal entry resources to retrieve.
        explode: true
        in: query
        name: count
        required: false
        schema:
          default: 5
          maximum: 100
          minimum: 1
          type: integer
        style: form
      - description: Sort order index of the first resource in the returned array.
        explode: true
        in: query
        name: start_index
        required: false
        schema:
          default: 0
          minimum: 0
          type: integer
        style: form
      - description: Starting date of the date range from which to return journal entries.
        explode: true
        in: query
        name: start_date
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Ending date of the date range from which to return journal entries.
        explode: true
        in: query
        name: end_date
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Starting `impact_time` of the date range from which to return journal entries.
        explode: true
        in: query
        name: start_impact_time
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Ending `impact_time` of the date range from which to return journal entries.
        explode: true
        in: query
        name: end_impact_time
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Starting `created_date` of the date range from which to return journal entries.
        explode: true
        in: query
        name: start_created_time
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Ending `created_date` of the date range from which to return journal entries.
        explode: true
        in: query
        name: end_created_time
        required: false
        schema:
          type: string
          x-allowableValues: 'Format: yyyy-MM-dd or yyyy-MM-ddThh:mm:ssZ'
        style: form
      - description: Array of statuses by which to filter journal entries.
        explode: true
        in: query
        name: statuses
        required: false
        schema:
          items:
            enum:
            - POSTED
            - PENDING
            type: string
          type: array
        style: form
      - description: Detail token of the journal entries to return.
        explode: true
        in: query
        name: detail_token
        required: false
        schema:
          type: string
          x-allowableValues: 36 char max
        style: form
      - description: 'Array of groups by which to filter journal entries.


          To return all journal entry groups, do not include this query parameter.'
        explode: true
        in: query
        name: groups
        required: false
        schema:
          items:
            enum:
            - PURCHASE
            - ORIGINAL_CREDIT
            - FEE
            - BALANCE_REFUND
            - PAYMENT
            - INTEREST
            - DISPUTE
            - REFUND
            - ADJUSTMENT
            - REWARD
            type: string
          type: array
        style: form
      - description: Embeds the specified object into the response.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            enum:
            - detailObject
            - originalCurrency
            type: string
          type: array
        style: form
      - description: '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`.'
        explode: true
        in: query
        name: sort_by
        required: false
        schema:
          default: -createdTime
          enum:
          - createdTime
          - -createdTime
          - impactTime
          - -impactTime
          type: string
        style: form
      - description: 'Array of card tokens by which to filter journal entries.

          Returns journal entries associated with the specified card tokens.


          Send a `GET` request to `/credit/accounts/{account_token}/cards/` to retrieve existing card tokens.'
        explode: true
        in: query
        name: card_tokens
        required: false
        schema:
          items:
            type: string
          type: array
          x-allowableValues: Existing card token
        style: form
      - description: 'Array of user tokens by which to filter journal entries.

          Returns journal entries associated with the specified user tokens.


          Send a `GET` request to `/users` to retrieve existing user tokens.'
        explode: true
        in: query
        name: user_tokens
        required: false
        schema:
          items:
            type: string
          type: array
          x-allowableValues: Existing user token
        style: form
      - description: 'Array of <</core-api/event-types#_credit_journal_entry_events, event types>> by which to filter journal entries.


          To return all event types, do not include this query parameter.'
        explode: true
        in: query
        name: types
        required: false
        schema:
          items:
            enum:
            - authorization
            - authorization.advice
            - authorization.incremental
            - authorization.reversal
            - authorization.reversal.issuerexpiration
            - authorization.clearing
            - refund
            - refund.authorization
            - refund.authorization.advice
            - refund.authorization.reversal
            - refund.authorization.clearing
            - refund.authorization.reversal.issuerexpiration
            - originalcredit.authorization
            - originalcredit.authorization.clearing
            - originalcredit.authorization.reversal
            - originalcredit.authpluscapture
            - originalcredit.authpluscapture.reversal
            - originalcredit.authorization.reversal.issuerexpiration
            - account.balancerefund
            - account.reward.cashback
            - account.reward.auto.cashback
            - account.reward.auto.cashback.reversal
            - account.payment
            - account.payment.completed
            - account.payment.returned
            - account.payment.canceled
            - account.payment.refunded
            - account.payment.completed.hold.released
            - account.payment.completed.hold
            - account.interest
            - account.fee.payment.late
            - account.fee.payment.returned
            - account.fee.interest.minimum
            - account.dispute
            - account.dispute.reversal
            - account.dispute.won
            - account.dispute.lost
            - account.dispute.lost.graceperiod
            - account.adjustment
            - account.adjustment.purchase
            - account.adjustment.fee
            - account.adjustment.interest
            - account.adjustment.reward
            - pindebit
            - pindebit.authorization.clearing
            - pindebit.refund
            type: string
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              example:
                count: 2
                data:
                - account_token: my_account_token_12
                  amount: 2.31
                  card_token: my_credit_card_token7794
                  created_time: 2023-08-01 07:00:19.756000+00:00
                  currency_code: USD
                  detail_object:
                    account_token: my_account_token_12
                    average_daily_balance: 181.67
                    created_date: 2023-08-01 07:00:19.755000+00:00
                    currency_code: USD
                    daily_periodic_rate: 0.00041068
                    days_in_billing_cycle: 31
                    goto_apr: 14.99
                    interest_amount: 2.31
                    statement_balance: 208.93
                    statement_closing_date: 2023-08-01 03:59:59.999000+00:00
                    statement_opening_date: 2023-07-01 04:00:00
                    statement_token: statement_token_75b
                    token: detail_token_96749
                    updated_date: 2023-08-01 07:00:19.755000+00:00
                  detail_token: detail_token_96749
                  group: INTEREST
                  id: '11112222'
                  impact_time: 2023-08-01 03:59:59.999000+00:00
                  memo: Interest charge on purchases
                  metadata:
                    decline_reason: insufficient balance
                  request_time: 2023-08-01 03:59:59.999000+00:00
                  status: POSTED
                  token: interest_journal_entry_token1111
                  type: account.interest
                  user_token: user_token4632
                - account_token: my_account_token_12
                  amount: 15
                  card_token: my_credit_card_token7794
                  created_time: 2023-07-01 07:00:24.240000+00:00
                  currency_code: USD
                  detail_object:
                    account_token: my_account_token_12
                    amount: 15
                    created: 2023-07-01 07:00:24.239000+00:00
                    currency_code: USD
                    description: Late Payment Fee
                    method: FLAT
                    token: detail_token_11221
                    type: LATE_PAYMENT_FEE
                    value: 25
                  detail_token: detail_token_11221
                  group: FEE
                  id: '44445678'
                  impact_time: 2023-07-01 03:59:59.999000+00:00
                  memo: Late payment fee
                  metadata:
                    decline_reason: insufficient balance
                  request_time: 2023-07-01 03:59:59.999000+00:00
                  status: POSTED
                  token: fee_journal_entry_token2121
                  type: account.fee.payment.late
                  user_token: user_token4632
                - account_token: my_account_token_12
                  amount: 9.11
                  card_token: my_credit_card_token7794
                  created_time: 2023-09-26 11:53:48.228000+00:00
                  currency_code: USD
                  detail_object:
                    acquirer:
                      system_trace_audit_number: 0
                    acquirer_fee_amount: 0
                    acquirer_reference_data: 4.355106395860054E22
                    acting_user_token: user_token4632
                    amount: 9.11
                    approval_code: 946791
                    batch_number: 2021048291031352
                    card:
                      last_four: 4489
                      metadata: {}
                    card_acceptor:
                      city: OAKLAND
                      country_code: US
                      mcc: 5814
                      mid: 555600244811
                      name: SWEET TREATS 0484
                      postal_code: 94612
                      state: CA
                    card_token: my_credit_card_token7794
                    clearing_record_sequence_number: 0
                    created_time: 2023-09-26 11:53:46+00:00
                    currency_code: USD
                    currency_conversion:
                      network:
                        conversion_rate: 1
                        original_amount: 9.11
                        original_currency_code: 840
                    duration: 378
                    fees:
                      amount: 0.19131
                      credit_debit: C
                      type: INTERCHANGE_FEE
                    gpa:
                      available_balance: 0
                      balances:
                        USD:
                          available_balance: 0
                          credit_balance: 0
                          currency_code: USD
                          impacted_amount: -9.11
                          ledger_balance: 61.7
                          pending_credits: 0
                      credit_balance: 0
                      currency_code: USD
                      impacted_amount: -9.11
                      ledger_balance: 61.7
                      pending_credits: 0
                    gpa_order:
                      amount: 9.11
                      created_time: 2023-09-25 20:59:43+00:00
                      currency_code: USD
                      funding:
                        amount: 9.11
                        source:
                          active: true
                          created_time: 2023-06-22 18:41:14+00:00
                          is_default_account: false
                          last_modified_time: 2023-06-22 18:41:14+00:00
                          name: My Funding Source
                          token: funding_source_token6789
                          type: programgateway
                      funding_source_token: funding_source_token6789
                      jit_funding:
                        acting_user_token: user_token4632
                        amount: 9.11
                        method: pgfs.authorization.capture
                        original_jit_funding_token: jit_funding_token4be7
                        token: jit_funding_token43a3
                        user_token: user_token4632
                      last_modified_time: 2023-09-26 11:53:47+00:00
                      response:
                        code: 0
                        memo: Approved or completed successfully
                      state: COMPLETION
                      token: gpa_order_token2c2c5
                      transaction_token: transaction_token42352a
                      user_token: user_token4632
                    identifier: 6457
                    issuer_interchange_amount: 0.19131
                    issuer_payment_node: 042f97a3458b59e3cce0269f66e864d8
                    issuer_received_time: 2023-09-26 11:53:46.886000+00:00
                    network: VISA
                    network_metadata:
                      product_id: VISA_TRADITIONAL
                      program_id: ''
                    network_reference_id: 218552461989029
                    pos:
                      is_installment: false
                      is_recurring: false
                      partial_approval_capable: false
                      pin_present: false
                      purchase_amount_only: false
                      terminal_id: 101
                    preceding_related_transaction_token: journal_entry_token2460
                    request_amount: 9.11
                    response:
                      code: 0
                      memo: Approved or completed successfully
                    settlement_date: 2023-09-26 00:00:00+00:00
                    state: COMPLETION
                    subnetwork: VISANET
                    token: detail_token_645736
                    transaction_metadata:
                      payment_channel: OTHER
                    type: authorization.clearing
                    user:
                      metadata:
                        notification_email: hello@myemail.com
                    user_token: user_token4632
                    user_transaction_time: 2023-09-25 20:59:43+00:00
                  detail_token: detail_token_645736
                  group: PURCHASE
                  id: '12345678'
                  impact_time: 2023-09-26 11:53:48.228000+00:00
                  memo: SWEET TREATS 0484
                  original_currency:
                    amount: 11.53
                    code: CAD
                  related_token: journal_entry_token2460
                  request_time: 2023-09-25 20:59:43
                  root_token: journal_entry_token2460
                  status: POSTED
                  token: purchase_journal_entry_token6789
                  type: authorization.clearing
                  user_token: user_token4632
                end_index: 4
                is_more: true
                start_index: 0
              schema:
                $ref: '#/components/schemas/JournalEntriesPage'
          description: Expected response to a valid request.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      security:
      - zionToken: []
      summary: List account journal entries
      tags:
      - Journal Entries
  /accounts/{account_token}/journalentries/{journal_entry_token}:
    get:
      description: Retrieve a journal entry for a credit account.
      operationId: getAccountJournalEntry
      parameters:
      - description: 'Unique identifier of the credit account for which you want to retrieve journal entries.


          Send a `GET` request to `/credit/accounts` to retrieve existing credit account tokens.'
        explode: false
        in: path
        name: account_token
        required: true
        schema:
          type: string
          x-allowableValues: Existing account token
        style: simple
      - description: 'Unique identifier of the journal entry you want to retrieve.


          Send a `GET` request to `/credit/accounts/{account_token}/journalentries` to retrieve existing journal entry tokens.'
        explode: false
        in: path
        name: journal_entry_token
        required: true
        schema:
          type: string
          x-allowableValues: Existing journal entry token
        style: simple
      responses:
        '200':
          content:
            application/json:
              examples:
                fee_example:
                  summary: The following code block shows a sample `FEE` journal entry.
                  value:
                    account_token: my_account_token_12
                    amount: 15
                    card_token: my_credit_card_token7794
                    created_time: 2023-07-01 07:00:24.240000+00:00
                    currency_code: USD
                    detail_object:
                      account_token: my_account_token_12
                      amount: 15
                      created: 2023-07-01 07:00:24.239000+00:00
                      currency_code: USD
                      description: Late Payment Fee
                      method: FLAT
                      token: detail_token_11221
                      type: LATE_PAYMENT_FEE
                      value: 25
                    detail_token: detail_token_11221
                    group: FEE
                    id: '44445678'
                    impact_time: 2023-07-01 03:59:59.999000+00:00
                    memo: Late payment fee
                    request_time: 2023-07-01 03:59:59.999000+00:00
                    status: POSTED
                    token: fee_journal_entry_token2121
                    type: account.fee.payment.late
                    user_token: user_token4632
                interest_example:
                  summary: The following code block shows a sample `INTEREST` journal entry.
                  value:
                    account_token: my_account_token_12
                    amount: 2.31
                    card_token: my_credit_card_token7794
                    created_time: 2023-08-01 07:00:19.756000+00:00
                    currency_code: USD
                    detail_object:
                      account_token: my_account_token_12
                      average_daily_balance: 181.67
                      created_date: 2023-08-01 07:00:19.755000+00:00
                      currency_code: USD
                      daily_periodic_rate: 0.00041068
                      days_in_billing_cycle: 31
                      goto_apr: 14.99
                      interest_amount: 2.31
                      statement_balance: 208.93
                      statement_closing_date: 2023-08-01 03:59:59.999000+00:00
                      statement_opening_date: 2023-07-01 04:00:00
                      statement_token: statement_token_75b
                      token: detail_token_96749
                      updated_date: 2023-08-01 07:00:19.755000+00:00
                    detail_token: detail_token_96749
                    group: INTEREST
                    id: '11112222'
                    impact_time: 2023-08-01 03:59:59.999000+00:00
                    memo: Interest charge on purchases
                    request_time: 2023-08-01 03:59:59.999000+00:00
                    status: POSTED
                    token: interest_journal_entry_token1111
                    type: account.interest
                    user_token: user_token4632
                purchase_example:
                  summary: The following code block shows a sample `PURCHASE` journal entry.
                  value:
                    account_token: my_account_token_12
                    amount: 9.11
                    card_token: my_credit_card_token7794
                    created_time: 2023-09-26 11:53:48.228000+00:00
                    currency_code: USD
                    detail_object:
                      acquirer:
                        system_trace_audit_number: 0
                      acquirer_fee_amount: 0
                      acquirer_reference_data: 4.355106395860054E22
                      acting_user_token: user_token4632
                      amount: 9.11
                      approval_code: 946791
                      batch_number: 2021048291031352
                      card:
                        last_four: 4489
                        metadata: {}
                      card_acceptor:
                        city: OAKLAND
                        country_code: US
                        mcc: 5814
                        mid: 555600244811
                        name: SWEET TREATS 0484
                        postal_code: 94612
                        state: CA
                      card_token: my_credit_card_token7794
                      clearing_record_sequence_number: 0
                      created_time: 2023-09-26 11:53:46+00:00
                      currency_code: USD
                      currency_conversion:
                        network:
                          conversion_rate: 1
                          original_amount: 9.11
                          original_currency_code: 840
                      duration: 378
                      fees:
                        amount: 0.19131
                        credit_debit: C
                        type: INTERCHANGE_FEE
                      gpa:
                        available_balance: 0
                        balances:
                          USD:
                            available_balance: 0
                            credit_balance: 0
                            currency_code: USD
                            impacted_amount: -9.11
                            ledger_balance: 61.7
                            pending_credits: 0
                        credit_balance: 0
                        currency_code: USD
                        impacted_amount: -9.11
                        ledger_balance: 61.7
                        pending_credits: 0
                      gpa_order:
                        amount: 9.11
                        created_time: 2023-09-25 20:59:43+00:00
                        currency_code: USD
                        funding:
                          amount: 9.11
                          source:
                            active: true
                            created_time: 2023-06-22 18:41:14+00:00
                            is_default_account: false
                            last_modified_time: 2023-06-22 18:41:14+00:00
                            name: My Funding Source
                            token: funding_source_token6789
                            type: programgateway
                        funding_source_token: funding_source_token6789
                        jit_funding:
                          acting_user_token: user_token4632
                          amount: 9.11
                          method: pgfs.authorization.capture
                          original_jit_funding_token: jit_funding_token4be7
                          token: jit_funding_token43a3
                          user_token: user_token4632
                        last_modified_time: 2023-09-26 11:53:47+00:00
                        response:
                          code: 0
                          memo: Approved or completed successfully
                        state: COMPLETION
                        token: gpa_order_token2c2c5
                        transaction_token: transaction_token42352a
                        user_token: user_token4632
                      identifier: 6457
                      issuer_interchange_amount: 0.19131
                      issuer_payment_node: 042f97a3458b59e3cce0269f66e864d8
                      issuer_received_time: 2023-09-26 11:53:46.886000+00:00
                      network: VISA
                      network_metadata:
                        product_id: VISA_TRADITIONAL
                        program_id: ''
                      network_reference_id: 218552461989029
                      pos:
                        is_installment: false
                        is_recurring: false
                        partial_approval_capable: false
                        pin_present: false
                        purchase_amount_only: false
                        terminal_id: 101
                      preceding_related_transaction_token: journal_entry_token2460
                      request_amount: 9.11
                      response:
                        code: 0
                        memo: Approved or completed successfully
                      settlement_date: 2023-09-26 00:00:00+00:00
                      state: COMPLETION
                      subnetwork: VISANET
                      token: detail_token_645736
                      transaction_metadata:
                        payment_channel: OTHER
                      type: authorization.clearing
                      user:
                        metadata:
                          notification_email: hello@myemail.com
                      user_token: user_token4632
                      user_transaction_time: 2023-09-25 20:59:43+00:00
                    detail_token: detail_token_645736
                    group: PURCHASE
                    id: '12345678'
                    impact_time: 2023-09-26 11:53:48.228000+00:00
                    memo: SWEET TREATS 0484
                    original_currency:
                      amount: 9.11
                      code: USD
                    related_token: journal_entry_token2460
                    request_time: 2023-09-25 20:59:43
                    root_token: journal_entry_token2460
                    status: POSTED
                    token: journal_entry_token6789
                    type: authorization.clearing
                    user_token: user_token4632
              schema:
                $ref: '#/components/schemas/JournalEntry'
          description: Expected response to a valid request
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      security:
      - zionToken: []
      summary: Retrieve account journal entry
      tags:
      - Journal Entries
  /webhooks/{event_type}/{resource_token}:
    post:
      description: 'Resends a credit event notification to your webhook endpoint.


        Although you send this request as a `POST`, all parameters are passed in the URL and the body is empty.

        The event notification is resent to your webhook endpoint and also returned in the response to this request.


        For details on how to configure your webhook endpoint, see the About Webhooks <</developer-guides/about-webhooks#_tutorial, tutorial>>.

        For the complete `/webhooks` endpoint reference, see <</core-api/webhooks, Webhooks>>.'
      operationId: resendWebhookEvent
      parameters:
      - description: Specifies the type of event you want to resend.
        explode: false
        in: path
        name: event_type
        required: true
        schema:
          enum:
          - ledgerentry
          - journalentry
          - accounttransition
          - accountstatement
          - paymenttransition
          - delinquencytransition
          - paymentreminders
          - substatus
          - accountsignupbonus
          type: string
        style: simple
      - description: 'Unique identifier of the resource for which you want to resend a notification.


          * Send a `GET` request to `/credit/accounts/{account_token}/journalentries` to retrieve existing journal entry tokens.

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

          * Send a `GET` request to `/accounts/{account_token}/accounttransitions` to retrieve existing account transition tokens.

          * Send a `GET` request to `/credit/accounts/{account_token}/payments/{payment_token}` to retrieve existing payment transition tokens.

          * Send a `GET` request to `/accounts/{account_token}/statements` to retrieve existing statement summary tokens.

          * Send a `GET` request to `/accounts/{account_token}/delinquencystate/transitions` to retrieve existing delinquency state transition tokens.

          * Send a `GET` request to `/accounts/{account_token}/statements/{statement_summary_token}/paymentreminders/{token}` to retrieve existing payment reminder tokens.

          * Send a `GET` request to `/credit/s

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/marqeta/refs/heads/main/openapi/marqeta-journal-entries-api-openapi.yml