Use this file to discover all available pages before exploring further.
Use this method to list the customer’s available payment methods, plus any cards they have on file. For request and response details, see the List payment methods API.
Get payment methods
import { useMoonPay } from "@moonpay/platform-sdk-react-native";export function PaymentMethodsList() { const { client } = useMoonPay(); const load = async () => { // Call this after the client has an active connection (for example, after // `client.getConnection()` returns `status: "active"` or after `client.connect()` // completes). const result = await client.getPaymentMethods(); if (!result.ok) { // Handle error console.error(result.error.code, result.error.message); return; } console.log(result.value.data); // Available payment-method configs console.log(result.value.storedCards); // Saved cards on file (if any) }; // ...}
A card the customer has saved on file. Use the id directly in client.getQuote() to quote against a specific stored card. See the API reference for the full shape, including network brand, expiry, and last4.
Field
Type
Required
Description
id
string
✅
The stored card identifier. Pass this to getQuote({ paymentMethod: { type: "card", id } }).