> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetBalanceRecord

# Package: wixPaymentsProvider

# Namespace: BalanceRecordsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/balances/get-balance-record.md

## Permission Scopes:
View settlement reports and payouts: SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE

## Introduction

Retrieves a single balance record by ID for the specified account.

Returns an error if the record doesn't exist or doesn't belong to the specified account.

---

## REST API

### Schema

```
 Method: getBalanceRecord
 Description: Retrieves a single balance record by GUID for the specified account.  Returns an error if the record doesn't exist or doesn't belong to the specified account.
 URL: https://www.wixapis.com/wixpay-balances/v5/balance-records/{balanceRecordId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  balanceRecordId, accountId
 Method parameters: 
   query param name: accountId | type: accountId | description: GUID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account GUIDs from the Accounts API. | required: true | validation: format GUID
   param name: balanceRecordId | type:   none | required: true 
 Return type: GetBalanceRecordResponse
  - name: record | type: BalanceRecord | description: Retrieved balance record.  
     - name: id | type: string | description: Balance record GUID.  Not returned for virtual records produced by `ESTIMATED_RESERVE_HOLD` or `ESTIMATED_RESERVE_RELEASE` tags.  | validation: format GUID
     - name: accountId | type: string | description: GUID of the Wix Payments account this balance record belongs to.  | validation: format GUID
     - name: accountProfileId | type: string | description: GUID of the Wix Payments account profile this balance record belongs to.  | validation: format GUID
     - name: amount | type: Money | description: Gross amount of the balance record, including fees.  Positive for credits to the account, negative for deductions.  
        - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.  | validation: format DECIMAL_VALUE
        - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
        - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.  
     - name: fee | type: Money | description: Fee that Wix Payments collected on this balance record.  
     - name: net | type: Money | description: Net amount of the balance record after subtracting `fee`.  
     - name: recordType | type: BalanceRecordType | description: Type of the balance record. Describes what kind of money movement this record represents.  
         - enum:
         -     UNKNOWN: Unknown balance record type.
         -     CREDIT: Payment from a buyer for a sale, credited to the merchant's Wix Payments account.
         -     REFUND: Refund issued back to a buyer.
         -     CHARGEBACK: Chargeback initiated by a buyer against a previous payment.
         -     REFUND_REVERSAL: Reversal of a previously issued refund.
         -     CHARGEBACK_REVERSAL: Reversal of a previously issued chargeback.
         -     RESERVE_HOLD: Funds withheld from the available balance as part of a reserve.
         -     RESERVE_RELEASE: Funds returned to the available balance from a previously held reserve.
         -     TOPUP: Transfer of funds from the merchant's external account into their Wix Payments account.
         -     CREDIT_FAILED: Failure on a previously credited payment, resulting in a deduction from the balance.
         -     CHARGEBACK_FEE: Fee charged for processing a chargeback.
         -     CHARGEBACK_FEE_REVERSAL: Reversal of a previously charged chargeback fee.
         -     CAPITAL_CASH_ADVANCE: Cash advance disbursed to the merchant from Wix Capital.
         -     CAPITAL_AUTOMATIC_REMITTANCE: Automatic remittance taken from sales to repay a Wix Capital cash advance.
         -     CAPITAL_ADJUSTMENT: Adjustment applied to a Wix Capital cash advance balance.
     - name: recordStatus | type: BalanceRecordStatus | description: Current effect of this record on the account balance.  The value depends on the record's `recordType`, whether it has a `payoutInfo` or `bookTransferInfo`, and its `payoutAvailabilityDate`. This field is returned on responses only and can't be passed as a filter on list or query requests. To filter by effect on the balance, use `tags` instead.  
         - enum:
         -     UNKNOWN: Unknown balance record status.
         -     PENDING_CREDIT: Funds from this record are added to the available balance once they settle. They aren't yet part of the available balance.
         -     CREDITED: Funds from this record are part of the available balance.
         -     RESERVED: Funds from this record are held in reserve and aren't part of the available balance.  Applied to `RESERVE_HOLD` records, and to `RESERVE_RELEASE` records whose `payoutAvailabilityDate` hasn't yet passed.
         -     PENDING_DEBIT: Funds from this record have already been deducted from the available balance. The status moves to `DEBITED` once the operation that produced the debit finalizes.
         -     DEBITED: Funds from this record have been deducted from the available balance.
         -     PAID_OUT: The record has been included in a payout (regular payout) or made instantly available via a Wix Checking book transfer (Instant Access). Applies to both credits and debits. The only record type bundled into a payout that ends at a different status is `RESERVE_HOLD` (see `DEDUCTED_FROM_PAYOUT`). Check `payoutInfo` versus `bookTransferInfo` to tell them apart.
         -     DEDUCTED_FROM_PAYOUT: A `RESERVE_HOLD` record that has been included in a payout. The held amount was subtracted from the payout total instead of being sent to the merchant. Only reserve hold records end at this status; refunds, chargebacks, and other debits in a payout end at `PAID_OUT`.
         -     PAYOUT_REVERSED: Funds from this record were in a payout that has since failed and been reversed. The reversal returns the funds to the available balance.
     - name: appliedDate | type: string | description: Date and time the balance record was applied to the account balance.  Not returned for virtual records.  | validation: format date-time
     - name: payoutAvailabilityDate | type: string | description: Date the balance record becomes available for payout, in `YYYY-MM-DD` format.  | validation: format LOCAL_DATE
     - name: createdDate | type: string | description: Date and time the balance record was created.  | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the balance record was last updated.  | validation: format date-time
     - name: paymentInfo | type: PaymentInfo | description: Information about the payment that produced this balance record.  Returned for records related to a payment, refund, or chargeback.  
        - name: transactionId | type: string | description: GUID of the Wix Payments transaction that produced this balance record.  | validation: format GUID
        - name: createdDate | type: string | description: Date and time the underlying payment was created.  | validation: format date-time
        - name: externalTransactionId | type: string | description: External transaction GUID supplied by the merchant's order system, if any.  | validation: maxLength 100
        - name: externalOrderId | type: string | description: External order GUID supplied by the merchant's order system, if any.  | validation: maxLength 100
        - name: externalDisplayOrderId | type: string | description: Display-friendly external order GUID, suitable for showing in a UI.  | validation: maxLength 100
        - name: externalOrderLink | type: string | description: Link to the order in the merchant's external order management system.  | validation: maxLength 1000
        - name: customerName | type: string | description: Customer's name as captured by the payment flow.  | validation: maxLength 1000
        - name: cardHolderName | type: string | description: Cardholder's name as captured at payment time.  | validation: maxLength 1000
     - name: payoutInfo | type: PayoutInfo | description: Information about the payout that includes this balance record.  Returned only after the record has been included in a payout. The presence of `payoutInfo` (versus `bookTransferInfo`) distinguishes a regular payout from an Instant Access book transfer.  
        - name: payoutId | type: string | description: GUID of the payout that this balance record belongs to.  | validation: format GUID
        - name: createdDate | type: string | description: Date and time the payout was created.  Returned only for payouts that have already occurred, not those that are scheduled.  | validation: format date-time
     - name: reserveInfo | type: ReserveInfo | description: Reserve details for this balance record.  Returned for records with `recordType` `RESERVE_HOLD` or `RESERVE_RELEASE`.  
        - name: hold | type: PayoutInfo | description: Payout details for the hold portion of the reserve, where funds are removed from the available balance.  
        - name: release | type: PayoutInfo | description: Payout details for the release portion of the reserve, where funds are returned to the available balance.  
        - name: reserveHistoryItems | type: array<ReserveHistoryItem> | description: History of changes applied to this reserve, ordered by event time.  | validation: maxItems 100
           - name: releaseDate | type: string | description: Date the reserve was scheduled to be released, in `YYYY-MM-DD` format.  | validation: format LOCAL_DATE
           - name: createdDate | type: string | description: Date and time the reserve was created.  | validation: format date-time
        - name: reserveType | type: ReserveType | description: Reserve type that determines how the reserve was created.  
             - enum:
             -     ONE_TIME: Reserve that was created manually for a 1-time event.
             -     ROLLING: Reserve that was created automatically by an active reserve policy on the account.
     - name: bookTransferInfo | type: BookTransferInfo | description: Book transfer details for this balance record.  Returned for records funded through a Wix Checking book transfer (Instant Access) rather than a payout. Funds backed by a book transfer are immediately available in the merchant's Wix Checking account.  
        - name: bookTransferId | type: string | description: GUID of the book transfer that funded this balance record.  | validation: format GUID
        - name: transactionReference | type: string | description: External reference for the book transfer transaction.  | validation: maxLength 100
        - name: createdDate | type: string | description: Date and time the funds became instantly available through the book transfer.  | validation: format date-time


```

### Examples

### Get a balance record by ID
Retrieves a single balance record that belongs to the specified Wix Payments account.

```curl
curl -X GET \
'https://www.wixapis.com/wixpay-balances/v5/balance-records/0e213eb6-1f80-43a6-95a3-60c9cf5e31ae?accountId=807c52a7-7d74-4ebf-ba2f-3e58a604f053' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.payments.balanceRecords.getBalanceRecord(balanceRecordId, accountId)
 Description: Retrieves a single balance record by GUID for the specified account.  Returns an error if the record doesn't exist or doesn't belong to the specified account.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  accountId, balanceRecordId
 Method parameters: 
   param name: accountId | type: string | description: GUID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account GUIDs from the Accounts API. | required: true | validation: format GUID
   param name: balanceRecordId | type: string | description: Balance record GUID. | required: true | validation: format GUID
 Return type: PROMISE<BalanceRecord>
  - name: _id | type: string | description: Balance record GUID.  Not returned for virtual records produced by `ESTIMATED_RESERVE_HOLD` or `ESTIMATED_RESERVE_RELEASE` tags.  | validation: format GUID
  - name: accountId | type: string | description: GUID of the Wix Payments account this balance record belongs to.  | validation: format GUID
  - name: accountProfileId | type: string | description: GUID of the Wix Payments account profile this balance record belongs to.  | validation: format GUID
  - name: amount | type: Money | description: Gross amount of the balance record, including fees.  Positive for credits to the account, negative for deductions.  
     - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.  | validation: format DECIMAL_VALUE
     - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
     - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.  
  - name: fee | type: Money | description: Fee that Wix Payments collected on this balance record.  
  - name: net | type: Money | description: Net amount of the balance record after subtracting `fee`.  
  - name: recordType | type: BalanceRecordType | description: Type of the balance record. Describes what kind of money movement this record represents.  
     - enum:
     -     UNKNOWN: Unknown balance record type.
     -     CREDIT: Payment from a buyer for a sale, credited to the merchant's Wix Payments account.
     -     REFUND: Refund issued back to a buyer.
     -     CHARGEBACK: Chargeback initiated by a buyer against a previous payment.
     -     REFUND_REVERSAL: Reversal of a previously issued refund.
     -     CHARGEBACK_REVERSAL: Reversal of a previously issued chargeback.
     -     RESERVE_HOLD: Funds withheld from the available balance as part of a reserve.
     -     RESERVE_RELEASE: Funds returned to the available balance from a previously held reserve.
     -     TOPUP: Transfer of funds from the merchant's external account into their Wix Payments account.
     -     CREDIT_FAILED: Failure on a previously credited payment, resulting in a deduction from the balance.
     -     CHARGEBACK_FEE: Fee charged for processing a chargeback.
     -     CHARGEBACK_FEE_REVERSAL: Reversal of a previously charged chargeback fee.
     -     CAPITAL_CASH_ADVANCE: Cash advance disbursed to the merchant from Wix Capital.
     -     CAPITAL_AUTOMATIC_REMITTANCE: Automatic remittance taken from sales to repay a Wix Capital cash advance.
     -     CAPITAL_ADJUSTMENT: Adjustment applied to a Wix Capital cash advance balance.
  - name: recordStatus | type: BalanceRecordStatus | description: Current effect of this record on the account balance.  The value depends on the record's `recordType`, whether it has a `payoutInfo` or `bookTransferInfo`, and its `payoutAvailabilityDate`. This field is returned on responses only and can't be passed as a filter on list or query requests. To filter by effect on the balance, use `tags` instead.  
     - enum:
     -     UNKNOWN: Unknown balance record status.
     -     PENDING_CREDIT: Funds from this record are added to the available balance once they settle. They aren't yet part of the available balance.
     -     CREDITED: Funds from this record are part of the available balance.
     -     RESERVED: Funds from this record are held in reserve and aren't part of the available balance.  Applied to `RESERVE_HOLD` records, and to `RESERVE_RELEASE` records whose `payoutAvailabilityDate` hasn't yet passed.
     -     PENDING_DEBIT: Funds from this record have already been deducted from the available balance. The status moves to `DEBITED` once the operation that produced the debit finalizes.
     -     DEBITED: Funds from this record have been deducted from the available balance.
     -     PAID_OUT: The record has been included in a payout (regular payout) or made instantly available via a Wix Checking book transfer (Instant Access). Applies to both credits and debits. The only record type bundled into a payout that ends at a different status is `RESERVE_HOLD` (see `DEDUCTED_FROM_PAYOUT`). Check `payoutInfo` versus `bookTransferInfo` to tell them apart.
     -     DEDUCTED_FROM_PAYOUT: A `RESERVE_HOLD` record that has been included in a payout. The held amount was subtracted from the payout total instead of being sent to the merchant. Only reserve hold records end at this status; refunds, chargebacks, and other debits in a payout end at `PAID_OUT`.
     -     PAYOUT_REVERSED: Funds from this record were in a payout that has since failed and been reversed. The reversal returns the funds to the available balance.
  - name: appliedDate | type: Date | description: Date and time the balance record was applied to the account balance.  Not returned for virtual records.  
  - name: payoutAvailabilityDate | type: string | description: Date the balance record becomes available for payout, in `YYYY-MM-DD` format.  | validation: format LOCAL_DATE
  - name: _createdDate | type: Date | description: Date and time the balance record was created.  
  - name: _updatedDate | type: Date | description: Date and time the balance record was last updated.  
  - name: paymentInfo | type: PaymentInfo | description: Information about the payment that produced this balance record.  Returned for records related to a payment, refund, or chargeback.  
     - name: transactionId | type: string | description: GUID of the Wix Payments transaction that produced this balance record.  | validation: format GUID
     - name: _createdDate | type: Date | description: Date and time the underlying payment was created.  
     - name: externalTransactionId | type: string | description: External transaction GUID supplied by the merchant's order system, if any.  | validation: maxLength 100
     - name: externalOrderId | type: string | description: External order GUID supplied by the merchant's order system, if any.  | validation: maxLength 100
     - name: externalDisplayOrderId | type: string | description: Display-friendly external order GUID, suitable for showing in a UI.  | validation: maxLength 100
     - name: externalOrderLink | type: string | description: Link to the order in the merchant's external order management system.  | validation: maxLength 1000
     - name: customerName | type: string | description: Customer's name as captured by the payment flow.  | validation: maxLength 1000
     - name: cardHolderName | type: string | description: Cardholder's name as captured at payment time.  | validation: maxLength 1000
  - name: payoutInfo | type: PayoutInfo | description: Information about the payout that includes this balance record.  Returned only after the record has been included in a payout. The presence of `payoutInfo` (versus `bookTransferInfo`) distinguishes a regular payout from an Instant Access book transfer.  
     - name: payoutId | type: string | description: GUID of the payout that this balance record belongs to.  | validation: format GUID
     - name: _createdDate | type: Date | description: Date and time the payout was created.  Returned only for payouts that have already occurred, not those that are scheduled.  
  - name: reserveInfo | type: ReserveInfo | description: Reserve details for this balance record.  Returned for records with `recordType` `RESERVE_HOLD` or `RESERVE_RELEASE`.  
     - name: hold | type: PayoutInfo | description: Payout details for the hold portion of the reserve, where funds are removed from the available balance.  
     - name: release | type: PayoutInfo | description: Payout details for the release portion of the reserve, where funds are returned to the available balance.  
     - name: reserveHistoryItems | type: array<ReserveHistoryItem> | description: History of changes applied to this reserve, ordered by event time.  | validation: maxItems 100
        - name: releaseDate | type: string | description: Date the reserve was scheduled to be released, in `YYYY-MM-DD` format.  | validation: format LOCAL_DATE
        - name: _createdDate | type: Date | description: Date and time the reserve was created.  
     - name: reserveType | type: ReserveType | description: Reserve type that determines how the reserve was created.  
         - enum:
         -     ONE_TIME: Reserve that was created manually for a 1-time event.
         -     ROLLING: Reserve that was created automatically by an active reserve policy on the account.
  - name: bookTransferInfo | type: BookTransferInfo | description: Book transfer details for this balance record.  Returned for records funded through a Wix Checking book transfer (Instant Access) rather than a payout. Funds backed by a book transfer are immediately available in the merchant's Wix Checking account.  
     - name: bookTransferId | type: string | description: GUID of the book transfer that funded this balance record.  | validation: format GUID
     - name: transactionReference | type: string | description: External reference for the book transfer transaction.  | validation: maxLength 100
     - name: _createdDate | type: Date | description: Date and time the funds became instantly available through the book transfer.  


```

### Examples

### Get a balance record by ID
Retrieves a single balance record that belongs to the specified Wix Payments account.

```javascript
import { balanceRecords } from "@wix/payments";

const balanceRecordId = "0e213eb6-1f80-43a6-95a3-60c9cf5e31ae";
const accountId = "807c52a7-7d74-4ebf-ba2f-3e58a604f053";

async function getBalanceRecord() {
  const response = await balanceRecords.getBalanceRecord(balanceRecordId, accountId);
}

/* Promise resolves to:
 * {
 *   "record": {
 *     "_id": "0e213eb6-1f80-43a6-95a3-60c9cf5e31ae",
 *     "accountId": "807c52a7-7d74-4ebf-ba2f-3e58a604f053",
 *     "accountProfileId": "6c9c8cf3-1e28-47f4-b77c-af66d3c2a5f2",
 *     "amount": {
 *       "value": "76.88",
 *       "currency": "USD"
 *     },
 *     "fee": {
 *       "value": "4.41",
 *       "currency": "USD"
 *     },
 *     "net": {
 *       "value": "72.47",
 *       "currency": "USD"
 *     },
 *     "recordType": "CREDIT",
 *     "recordStatus": "CREDITED",
 *     "appliedDate": "2021-02-10T05:00:00Z",
 *     "payoutAvailabilityDate": "2021-02-10",
 *     "_createdDate": "2021-02-03T02:42:10Z",
 *     "_updatedDate": "2021-02-10T05:00:00Z",
 *     "paymentInfo": {
 *       "transactionId": "75c1f6f3-75dd-4c63-8d3d-6fb28a867fb7",
 *       "createdDate": "2021-02-02T19:55:55.002Z",
 *       "externalTransactionId": "55acca51-e619-4686-b416-6191f5075168",
 *       "externalOrderId": "FVIE-DQCG-O0",
 *       "externalDisplayOrderId": "75c1f6f3-75dd-4c63-8d3d-6fb28a867fb7",
 *       "customerName": "John Doe"
 *     }
 *   }
 * }
 */

```

### getBalanceRecord (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { balanceRecords } from '@wix/payments';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { balanceRecords },
  // Include the auth strategy and host as relevant
});


async function getBalanceRecord(balanceRecordId,accountId) {
  const response = await myWixClient.balanceRecords.getBalanceRecord(balanceRecordId,accountId);
};
```

---