The Payment Customization API enables you to rename, reorder, and sort the payment methods available to buyers during checkout. ## Extension targets The Payment Customization API exposes the following [targets](/docs/apps/build/app-extensions/configure-app-extensions#targets): | Target | Output type | Description | | ------ | ----------- | ----------- | | `purchase.payment-customization.run` | [FunctionRunResult](#functionrunresult) | Outputs the list of operations to apply to payment methods | ## Input The `RunInput` object is the complete schema that your function can receive as [input](/docs/apps/build/functions/input-output#input). For a list of fields that the Payment Customization API's `Input` object accepts, refer to [Input](/docs/api/functions/reference/payment-customization/graphql/input). ### Example The following example shows an input query: ```graphql query Input { cart { cost { subtotalAmount { amount currencyCode } } } paymentMethods { id } } ``` The following example shows the resulting input to the query: ```json { "cart": { "cost": { "subtotalAmount": { "amount": 200.0, "currencyCode": "CAD" } } }, "paymentMethods": { "id": "gid://shopify/PaymentCustomizationPaymentMethod/1" } } ``` ## FunctionRunResult The [`FunctionRunResult`](/docs/api/functions/reference/payment-customization/graphql/functionrunresult) object is the expected [output](/docs/apps/build/functions/input-output#output) for the `purchase.payment-customization.run` target. ### Example The following function result hides a payment method: ```json { "operations": { "hide": { "paymentMethodId": "gid://shopify/PaymentCustomizationPaymentMethod/1" } } } ```