Hi everyone,
I’m developing a payment customization app using the purchase.payment-customization.run API, and I’ve encountered an issue where customizations don’t apply to re-payment flows.
The Problem
- Works: Payment methods are correctly hidden/reordered during normal checkout
- Doesn’t work: When customers retry payment via the link in payment error notification emails, hidden payment methods reappear
Current Implementation
// extensions/payment-customization/src/run.ts
export function run(input: RunInput): FunctionRunResult {
if (!input.paymentCustomization?.metafield?.value) {
return { operations: [] };
}
// Apply hide/rename/reorder operations based on metafield config
const operations: Operation[] = [];
paymentCustomizations.forEach((customization) => {
// ... hide/rename/reorder logic
if (customization.action === Action.HIDE) {
operations.push({
hide: { paymentMethodId: method.id }
});
}
});
return { operations };
}
Extension config:
- Target: purchase.payment-customization.run
- API Version: 2024-10
Reproduction Steps
- Configure app to hide specific payment method (e.g., “Cash on Delivery”)
- Verify it works in normal checkout

- Initiate payment with external gateway, let it fail
- Customer receives payment error notification email
- Customer clicks retry link → Hidden payment methods are visible again

Questions
- Is purchase.payment-customization.run supposed to apply to re-payment flows from failed payment notifications?
- Are these re-payment screens considered a different context than regular checkout?
- What’s the recommended approach to ensure consistent payment method customization across all payment flows?
Additional Context
The Payment Customization API docs list “Checkout” as a supported surface but don’t explicitly mention re-payment flows. Has anyone successfully applied payment customizations to re-payment scenarios? Any insights would be greatly appreciated! Thanks in advance!