Anchor to customerPaymentMethodRemoteCreditCardCreatecustomer
customerPaymentMethodRemoteCreditCardCreate
mutationDeprecated
Requires access scope. Also: Requires
scope.
Create a payment method from a credit card stored by Stripe. Use instead.
Anchor to Arguments
Arguments
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to stripeCustomerIdstripe•
Customer Id String!required The Stripe Customer ID.
- Anchor to stripePaymentMethodIdstripe•
Payment Method Id The Stripe Payment Method ID. Starting on 2025, stripe_payment_method_id will become mandatory for all API versions.
Was this section helpful?
Anchor to CustomerPaymentMethodRemoteCreditCardCreatePayload returnsCustomerPaymentMethodRemoteCreditCardCreatePayload returns
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation customerPaymentMethodRemoteCreditCardCreate($customerId: ID!, $stripeCustomerId: String!, $stripePaymentMethodId: String) {
customerPaymentMethodRemoteCreditCardCreate(customerId: $customerId, stripeCustomerId: $stripeCustomerId, stripePaymentMethodId: $stripePaymentMethodId) {
customerPaymentMethod {
# CustomerPaymentMethod fields
}
userErrors {
field
message
}
}
}
Input
{
"customerId": "gid://shopify/<objectName>/10079785100",
"stripeCustomerId": "<your-stripeCustomerId>",
"stripePaymentMethodId": "<your-stripePaymentMethodId>"
}
{
"customerId": "gid://shopify/<objectName>/10079785100",
"stripeCustomerId": "<your-stripeCustomerId>",
"stripePaymentMethodId": "<your-stripePaymentMethodId>"
}