Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Payments API

The API for interacting with the payment options.

The base API object provided to purchase extension targets.

Anchor to availablePaymentOptions
availablePaymentOptions
StatefulRemoteSubscribable<[]>
required

All available payment options.

Anchor to selectedPaymentOptions
selectedPaymentOptions
StatefulRemoteSubscribable<[]>
required

Payment options selected by the buyer.

Anchor to useAvailablePaymentOptions
useAvailablePaymentOptions()

Returns all available payment options.

[]

Anchor to useSelectedPaymentOptions
useSelectedPaymentOptions()

Returns payment options selected by the buyer.

[]
Examples

React

import {
reactExtension,
Banner,
useAvailablePaymentOptions,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);

function Extension() {
const options = useAvailablePaymentOptions();

if (
options.some(
(option) => option.type === 'wallet',
)
) {
return (
<Banner>
Select an express payment method for
faster checkout
</Banner>
);
}

return null;
}
Was this page helpful?