> 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

# GetPayout

# Package: wixPaymentsProvider

# Namespace: PayoutsService

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

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

## Introduction

Retrieves a single payout by ID.

Calls are limited to 100 requests per 10 seconds per caller. Requests
over the limit fail with a `RESOURCE_EXHAUSTED` error and the message
`The request was throttled`.

---

## REST API

### Schema

```
 Method: getPayout
 Description: Retrieves a single payout by GUID.  Calls are limited to 100 requests per 10 seconds per caller. Requests over the limit fail with a `RESOURCE_EXHAUSTED` error and the message `The request was throttled`.
 URL: https://www.wixapis.com/wixpay-payouts/v4/payouts/{payoutId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  payoutId, accountId
 Method parameters: 
   query param name: accountId | type: accountId | description: GUID of the Wix Payments account that owns the payout. The payout must belong to this account. Retrieve account GUIDs from the Accounts API. | required: true | validation: format GUID
   param name: payoutId | type:   none | required: true 
 Return type: GetPayoutResponse
  - name: payout | type: Payout | description: Retrieved payout.  
     - name: id | type: string | description: Payout GUID.  | validation: format GUID
     - name: accountId | type: string | description: GUID of the Wix Payments account that owns the payout. Retrieve account GUIDs from the Accounts API.  | validation: format GUID
     - name: accountProfileId | type: string | description: GUID of the Wix Payments account profile that owns the payout.  A Wix Payments account has 1 or more profiles. Each profile has its own balance and its own payouts. Most merchants have 1 profile. Retrieve profile GUIDs from the Accounts API.  | validation: format GUID
     - name: createdDate | type: string | description: Date and time the payout was created.  The payout is created before the underlying transfer is initiated at the bank. Once initiated, the funds typically reach the merchant's bank account within 3 to 5 business days, depending on the receiving bank.  | validation: format date-time
     - name: amount | type: Money | description: Amount of the transfer to the merchant's bank account.  
        - 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: status | type: PayoutStatus | description: Lifecycle status of the payout.  `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means the receiving bank rejected the transfer.  A `SENT` status doesn't guarantee that the funds were delivered to the merchant. The bank rail doesn't provide a delivery acknowledgement, and a payout in `SENT` can later transition to `FAILED` if the receiving bank rejects the transfer. See the per-value documentation on `PayoutStatus` for details.  
         - enum:
         -     UNKNOWN: Unknown payout status. Not returned by the API.
         -     SENT: The bank rail accepted the transfer. Funds are en route to the merchant's bank account.  Acceptance isn't the same as delivery. A `SENT` payout can still transition to `FAILED` if the receiving bank rejects the transfer. The bank rail's return window is up to 60 days for ACH and up to 13 months for SEPA.
         -     FAILED: The bank rail rejected the transfer. See `failureReason` for the cause. The funds remain in the merchant's Wix Payments balance.
     - name: estimatedArrivalDateV2 | type: string | description: Estimated date for when the funds should arrive at the merchant's bank account, in `YYYY-MM-DD` format.  The estimated arrival date is a prediction, not a guarantee. Actual arrival depends on the receiving bank's processing and may be later.  | validation: format LOCAL_DATE
     - name: failureReason | type: PayoutFailureReason | description: Reason the bank rail rejected the transfer.  Returned only when `status` is `FAILED`.  
        - name: code | type: PayoutFailureCode | description: Why the bank rail rejected the transfer.  
             - enum:
             -     GENERIC_PAYOUT_FAILURE: Generic failure with no more specific reason available from the bank rail. This value is also returned when no failure reason is known. Clients can't distinguish "unknown" from "generic" using this code alone.
             -     ACCOUNT_CLOSED: The merchant's bank account is closed. The merchant must provide new bank account details before further payouts can succeed.
             -     ACCOUNT_FROZEN: The merchant's bank account is frozen, for example due to a hold placed by the bank. The merchant must resolve the hold with their bank before further payouts can succeed.
             -     BANK_ACCOUNT_RESTRICTED: The merchant's bank account is restricted from receiving the transfer. For example, the account type or status doesn't permit incoming credits.
             -     BANK_OWNERSHIP_CHANGED: Ownership of the merchant's bank account changed and the rail no longer recognises the previously-recorded owner. New bank details are required.
             -     COULD_NOT_PROCESS: The receiving bank couldn't process the transfer for an unspecified reason. A subsequent payout attempt may succeed.
             -     DEBIT_NOT_AUTHORIZED: The merchant's bank declined the debit authorisation associated with the transfer. The merchant must contact their bank to authorise Wix Payments payouts.
             -     INCORRECT_ACCOUNT_HOLDER_NAME: The account holder name on file doesn't match the name the receiving bank has on record. The merchant must correct the account holder name.
             -     INVALID_ACCOUNT_DETAILS_CITY: The city in the bank account details is invalid for the receiving bank.
             -     INVALID_ACCOUNT_NUMBER: The bank account number is invalid. The format is wrong or the account doesn't exist.
             -     INVALID_CURRENCY: The payout currency isn't supported by the receiving bank account.
             -     INVALID_ROUTING_NUMBER: The routing number (US) is invalid or doesn't match the receiving bank.
             -     INVALID_SORT_CODE: The sort code (UK) is invalid or doesn't match the receiving bank.
             -     NO_ACCOUNT: No bank account is on file for the merchant. The merchant must add bank details before payouts can succeed.
             -     TECHNICAL_ERROR: A technical error at the bank rail prevented the transfer. A subsequent payout attempt may succeed.
     - name: bankTransferReference | type: string | description: Reference returned by the bank rail once the transfer is initiated. For example, an ACH trace number or a SEPA reference. Use this value to reconcile against the merchant's bank statement.  Empty until the bank rail returns a reference.  | validation: maxLength 500
     - name: cashAdvanceIncluded | type: boolean | description: Whether the payout `amount` includes funds from a Wix Capital cash advance taken out by the merchant. If `false`, the amount comes only from the merchant's sales proceeds.  


```

### Examples

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

```curl
curl -X GET \
'https://www.wixapis.com/wixpay-payouts/v4/payouts/f381e42d-ae6f-4abb-b7c7-e8f7e3eea0db?accountId=e4280592-0121-44d7-ad1c-5ac57a0fb36d' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.payments.payouts.getPayout(payoutId, accountId)
 Description: Retrieves a single payout by GUID.  Calls are limited to 100 requests per 10 seconds per caller. Requests over the limit fail with a `RESOURCE_EXHAUSTED` error and the message `The request was throttled`.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  accountId, payoutId
 Method parameters: 
   param name: accountId | type: string | description: GUID of the Wix Payments account that owns the payout. The payout must belong to this account. Retrieve account GUIDs from the Accounts API. | required: true | validation: format GUID
   param name: payoutId | type: string | description: GUID of the payout to retrieve. | required: true | validation: format GUID
 Return type: PROMISE<Payout>
  - name: _id | type: string | description: Payout GUID.  | validation: format GUID
  - name: accountId | type: string | description: GUID of the Wix Payments account that owns the payout. Retrieve account GUIDs from the Accounts API.  | validation: format GUID
  - name: accountProfileId | type: string | description: GUID of the Wix Payments account profile that owns the payout.  A Wix Payments account has 1 or more profiles. Each profile has its own balance and its own payouts. Most merchants have 1 profile. Retrieve profile GUIDs from the Accounts API.  | validation: format GUID
  - name: _createdDate | type: Date | description: Date and time the payout was created.  The payout is created before the underlying transfer is initiated at the bank. Once initiated, the funds typically reach the merchant's bank account within 3 to 5 business days, depending on the receiving bank.  
  - name: amount | type: Money | description: Amount of the transfer to the merchant's bank account.  
     - 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: status | type: PayoutStatus | description: Lifecycle status of the payout.  `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means the receiving bank rejected the transfer.  A `SENT` status doesn't guarantee that the funds were delivered to the merchant. The bank rail doesn't provide a delivery acknowledgement, and a payout in `SENT` can later transition to `FAILED` if the receiving bank rejects the transfer. See the per-value documentation on `PayoutStatus` for details.  
     - enum:
     -     UNKNOWN: Unknown payout status. Not returned by the API.
     -     SENT: The bank rail accepted the transfer. Funds are en route to the merchant's bank account.  Acceptance isn't the same as delivery. A `SENT` payout can still transition to `FAILED` if the receiving bank rejects the transfer. The bank rail's return window is up to 60 days for ACH and up to 13 months for SEPA.
     -     FAILED: The bank rail rejected the transfer. See `failureReason` for the cause. The funds remain in the merchant's Wix Payments balance.
  - name: estimatedArrivalDateV2 | type: string | description: Estimated date for when the funds should arrive at the merchant's bank account, in `YYYY-MM-DD` format.  The estimated arrival date is a prediction, not a guarantee. Actual arrival depends on the receiving bank's processing and may be later.  | validation: format LOCAL_DATE
  - name: failureReason | type: PayoutFailureReason | description: Reason the bank rail rejected the transfer.  Returned only when `status` is `FAILED`.  
     - name: code | type: PayoutFailureCode | description: Why the bank rail rejected the transfer.  
         - enum:
         -     GENERIC_PAYOUT_FAILURE: Generic failure with no more specific reason available from the bank rail. This value is also returned when no failure reason is known. Clients can't distinguish "unknown" from "generic" using this code alone.
         -     ACCOUNT_CLOSED: The merchant's bank account is closed. The merchant must provide new bank account details before further payouts can succeed.
         -     ACCOUNT_FROZEN: The merchant's bank account is frozen, for example due to a hold placed by the bank. The merchant must resolve the hold with their bank before further payouts can succeed.
         -     BANK_ACCOUNT_RESTRICTED: The merchant's bank account is restricted from receiving the transfer. For example, the account type or status doesn't permit incoming credits.
         -     BANK_OWNERSHIP_CHANGED: Ownership of the merchant's bank account changed and the rail no longer recognises the previously-recorded owner. New bank details are required.
         -     COULD_NOT_PROCESS: The receiving bank couldn't process the transfer for an unspecified reason. A subsequent payout attempt may succeed.
         -     DEBIT_NOT_AUTHORIZED: The merchant's bank declined the debit authorisation associated with the transfer. The merchant must contact their bank to authorise Wix Payments payouts.
         -     INCORRECT_ACCOUNT_HOLDER_NAME: The account holder name on file doesn't match the name the receiving bank has on record. The merchant must correct the account holder name.
         -     INVALID_ACCOUNT_DETAILS_CITY: The city in the bank account details is invalid for the receiving bank.
         -     INVALID_ACCOUNT_NUMBER: The bank account number is invalid. The format is wrong or the account doesn't exist.
         -     INVALID_CURRENCY: The payout currency isn't supported by the receiving bank account.
         -     INVALID_ROUTING_NUMBER: The routing number (US) is invalid or doesn't match the receiving bank.
         -     INVALID_SORT_CODE: The sort code (UK) is invalid or doesn't match the receiving bank.
         -     NO_ACCOUNT: No bank account is on file for the merchant. The merchant must add bank details before payouts can succeed.
         -     TECHNICAL_ERROR: A technical error at the bank rail prevented the transfer. A subsequent payout attempt may succeed.
  - name: bankTransferReference | type: string | description: Reference returned by the bank rail once the transfer is initiated. For example, an ACH trace number or a SEPA reference. Use this value to reconcile against the merchant's bank statement.  Empty until the bank rail returns a reference.  | validation: maxLength 500
  - name: cashAdvanceIncluded | type: boolean | description: Whether the payout `amount` includes funds from a Wix Capital cash advance taken out by the merchant. If `false`, the amount comes only from the merchant's sales proceeds.  


```

### Examples

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

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

const payoutId = "f381e42d-ae6f-4abb-b7c7-e8f7e3eea0db";
const accountId = "e4280592-0121-44d7-ad1c-5ac57a0fb36d";

async function getPayout() {
  const response = await payouts.getPayout(payoutId, accountId);
}

/* Promise resolves to:
 * {
 *   "payout": {
 *     "_id": "f381e42d-ae6f-4abb-b7c7-e8f7e3eea0db",
 *     "accountId": "e4280592-0121-44d7-ad1c-5ac57a0fb36d",
 *     "accountProfileId": "444d5860-2e05-42bd-8743-b544c237657f",
 *     "_createdDate": "2020-10-07T11:32:34.314Z",
 *     "amount": {
 *       "value": "4024.16",
 *       "currency": "USD"
 *     },
 *     "status": "SENT",
 *     "estimatedArrivalDateV2": "2020-10-08",
 *     "cashAdvanceIncluded": false
 *   }
 * }
 */

```

### getPayout (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 { payouts } from '@wix/payments';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getPayout(payoutId,accountId) {
  const response = await myWixClient.payouts.getPayout(payoutId,accountId);
};
```

---