Skip to main content
Use this method to remove a stored payment method — for example, when a customer asks to forget a card, or after a one-off purchase where you don’t want to retain card details. For request and response details, see the Delete payment method API. To obtain a paymentMethodId, list the customer’s stored payment methods with client.getPaymentMethods().
Delete a payment method

Parameters

Result

client.deletePaymentMethod() returns a Result<void, DevPlatformApiError>. The API responds with 204 No Content on success, so result.value is undefined — there is no response body to read. Check result.ok to confirm the delete succeeded.

Result envelope

Result<void, DevPlatformApiError>

DevPlatformApiError

The standard MoonPay Platform API error shape.
types.ts