customerPaymentMethodRemoteCreditCardCreate mutation
Create a payment method from a credit card stored by Stripe.
Required access
write_customers
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation customerPaymentMethodRemoteCreditCardCreate($customerId: ID!, $stripeCustomerId: String!) { customerPaymentMethodRemoteCreditCardCreate(customerId: $customerId, stripeCustomerId: $stripeCustomerId) {} } { “customerId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “stripeCustomerId”: “placeholder” }
<font style="color:#1F61A0;">customerPaymentMethod</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">code</font>
<font style="color:#1F61A0;">field</font>
<font style="color:#1F61A0;">message</font>
<font style="color:#555555;">}</font>
Arguments
Return fields
- customerPaymentMethod (
[CustomerPaymentMethod](https://shopify.dev/docs/admin-api/graphql/reference/customers/customerpaymentmethod)
)
The customer payment method. - userErrors (
[[CustomerPaymentMethodUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/customers/customerpaymentmethodusererror)
)
List of errors that occurred executing the mutation.