> 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

# GetPaymentDetails

# Package: googleAds

# Namespace: PaymentDetailsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/payment-details-v1/get-payment-details.md

## Permission Scopes:
View google ads campaigns: SCOPE.PROMOTE.VIEW-GOOGLE-ADS

## Introduction

Retrieves billing and payment details for the current site's Google Ads account.

Billing data is calculated from cached subscription information, not fetched live from Google Ads.
This method has a response-time SLA of 30 seconds due to charge calculation complexity.

Errors:
- ACCOUNT_NOT_FOUND: Couldn't find the account.

---

## REST API

### Schema

```
 Method: getPaymentDetails
 Description: Retrieves billing and payment details for the current site's Google Ads account.  Billing data is calculated from cached subscription information, not fetched live from Google Ads. This method has a response-time SLA of 30 seconds due to charge calculation complexity.  Errors: - ACCOUNT_NOT_FOUND: Couldn't find the account.
 URL: https://www.wixapis.com/_serverless/pa-google/v1/payment-details
 Method: GET
 Return type: GetPaymentDetailsResponse
  - name: paymentDetails | type: PaymentDetails | description: Payment details for the current site's Google Ads account.  
     - name: currency | type: string | description: The account's billing currency in ISO-4217 format. All monetary amounts in this entity are expressed in this currency.  | validation: format CURRENCY
     - name: upcomingPayments | type: array<Payment> | description: Breakdown of payments for the current billing period.  | validation: maxItems 2
        - name: usageAmount | type: string | description: Ad spend for the billing period, excluding the Wix service fee.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: wixServiceFee | type: string | description: Wix platform fee for the billing period.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: totalAmount | type: string | description: Total charge for the billing period: usageAmount plus wixServiceFee, minus any couponAdjustmentAmount.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: billingPeriod | type: BillingPeriod | description: The date range covered by this payment record.  
           - name: from | type: string | description: Start date of the billing period in YYYY-MM-DD format.  | validation: maxLength 10
           - name: to | type: string | description: End date of the billing period in YYYY-MM-DD format.  | validation: maxLength 10
        - name: couponAdjustmentAmount | type: string | description: Discount applied from a promotional coupon for this billing period.  | validation: decimalValue {"maxScale":2}
     - name: creditBalance | type: string | description: The site's current credit balance in the account's billing currency. A positive value indicates available credits; a negative value indicates outstanding debt that has not yet been charged. The final amount may differ once the charge is processed.  | validation: decimalValue {"maxScale":2}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: none


```

### Examples

### Get Payment Details
```curl
curl -X GET \
  'https://www.wixapis.com/google-ads/v1/payment-details' \
  -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.paymentDetails.getPaymentDetails()
 Description: Retrieves billing and payment details for the current site's Google Ads account.  Billing data is calculated from cached subscription information, not fetched live from Google Ads. This method has a response-time SLA of 30 seconds due to charge calculation complexity.  Errors: - ACCOUNT_NOT_FOUND: Couldn't find the account.
 Return type: PROMISE<GetPaymentDetailsResponse>
  - name: paymentDetails | type: PaymentDetails | description: Payment details for the current site's Google Ads account.  
     - name: currency | type: string | description: The account's billing currency in ISO-4217 format. All monetary amounts in this entity are expressed in this currency.  | validation: format CURRENCY
     - name: upcomingPayments | type: array<Payment> | description: Breakdown of payments for the current billing period.  | validation: maxItems 2
        - name: usageAmount | type: string | description: Ad spend for the billing period, excluding the Wix service fee.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: wixServiceFee | type: string | description: Wix platform fee for the billing period.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: totalAmount | type: string | description: Total charge for the billing period: usageAmount plus wixServiceFee, minus any couponAdjustmentAmount.  | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: billingPeriod | type: BillingPeriod | description: The date range covered by this payment record.  
           - name: from | type: string | description: Start date of the billing period in YYYY-MM-DD format.  | validation: maxLength 10
           - name: to | type: string | description: End date of the billing period in YYYY-MM-DD format.  | validation: maxLength 10
        - name: couponAdjustmentAmount | type: string | description: Discount applied from a promotional coupon for this billing period.  | validation: decimalValue {"maxScale":2}
     - name: creditBalance | type: string | description: The site's current credit balance in the account's billing currency. A positive value indicates available credits; a negative value indicates outstanding debt that has not yet been charged. The final amount may differ once the charge is processed.  | validation: decimalValue {"maxScale":2}

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ACCOUNT_NOT_FOUND | Description: none


```

### Examples

### Get payment details for the current site
```javascript
import { paymentDetails } from '@wix/promote-google-ads';

const response = await paymentDetails.getPaymentDetails();

/* Promise resolves to:
 * {
 *   "paymentDetails": {
 *     "currency": "USD",
 *     "upcomingPayments": [
 *       {
 *         "usageAmount": "123.45",
 *         "wixServiceFee": "12.35",
 *         "totalAmount": "135.80",
 *         "billingPeriod": {
 *           "from": "2026-03-01",
 *           "to": "2026-03-31"
 *         },
 *         "couponAdjustmentAmount": "0.00"
 *       }
 *     ],
 *     "creditBalance": "0.00"
 *   }
 * }
 */

```

### getPaymentDetails (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 { paymentDetails } from '@wix/promote-google-ads';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getPaymentDetails() {
  const response = await myWixClient.paymentDetails.getPaymentDetails();
};
```

---