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

# getAvailablePaymentMethods(params)

> Check which payment methods your checkout can offer before you render them

Returns the payment methods available for your organization's checkout. Use
it to decide which payment methods to render with
[initMethod()](/docs/develop/init-method.md).

> [!NOTE]
>
> This method covers checkouts that run through Primer. For Stripe checkouts,
> use [Billing.stripe.getAvailablePaymentMethods()](/docs/develop/stripe.md#get-available-payment-methods).

## Parameters

**orgId** `string` *required*

Your organization ID. This method doesn't read
[configure()](/docs/develop/configure.md).

**baseUrl** `string` *required*

The API base URL. Use `https://billing.funnelfox.com` unless you point to a
custom backend.

**countryCode** `string`

ISO country code to check availability for.

## Returns

A `Promise<PaymentMethod[]>` with the available payment methods:
`PAYMENT_CARD`, `PAYPAL`, `GOOGLE_PAY`, or `APPLE_PAY`.

When Apple Pay is available, the list leaves out Google Pay. The
[default checkout](/docs/develop/checkout-customization.md#default-styles) follows
the same rule.

## Example

```javascript theme={null}
import {
  Billing,
  PaymentMethod,
  getAvailablePaymentMethods,
} from '@funnelfox/billing';

const methods = await getAvailablePaymentMethods({
  orgId: 'your-org-id',
  baseUrl: 'https://billing.funnelfox.com',
  countryCode: 'US',
});

if (methods.includes(PaymentMethod.APPLE_PAY)) {
  await Billing.initMethod(
    PaymentMethod.APPLE_PAY,
    document.getElementById('apple-pay'),
    {
      orgId: 'your-org-id',
      priceId: 'price_123',
      externalId: 'user_456',
    }
  );
}
```

You can also call it as `Billing.getAvailablePaymentMethods()`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.