Anchor to customerPaymentMethodRemoteCreatecustomer
customerPaymentMethodRemoteCreate
mutation
Requires access scope. Also: Requires
scope.
Create a payment method from remote gateway identifiers.
Anchor to Arguments
Arguments
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to remoteReferenceremote•
Reference Remote gateway payment method details.
Was this section helpful?
Anchor to CustomerPaymentMethodRemoteCreatePayload returnsCustomerPaymentMethodRemoteCreatePayload 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 customerPaymentMethodRemoteCreate($customerId: ID!, $remoteReference: CustomerPaymentMethodRemoteInput!) {
customerPaymentMethodRemoteCreate(customerId: $customerId, remoteReference: $remoteReference) {
customerPaymentMethod {
# CustomerPaymentMethod fields
}
userErrors {
field
message
}
}
}
Input
{
"customerId": "gid://shopify/<objectName>/10079785100",
"remoteReference": {
"authorizeNetCustomerPaymentProfile": {
"customerPaymentProfileId": "<your-customerPaymentProfileId>",
"customerProfileId": "<your-customerProfileId>"
},
"braintreePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodToken": "<your-paymentMethodToken>"
},
"stripePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodId": "<your-paymentMethodId>"
}
}
}
{
"customerId": "gid://shopify/<objectName>/10079785100",
"remoteReference": {
"authorizeNetCustomerPaymentProfile": {
"customerPaymentProfileId": "<your-customerPaymentProfileId>",
"customerProfileId": "<your-customerProfileId>"
},
"braintreePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodToken": "<your-paymentMethodToken>"
},
"stripePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodId": "<your-paymentMethodId>"
}
}
}
input CustomerPaymentMethodRemoteInput {
authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput
braintreePaymentMethod: RemoteBraintreePaymentMethodInput
stripePaymentMethod: RemoteStripePaymentMethodInput
}
input RemoteAuthorizeNetCustomerPaymentProfileInput {
customerPaymentProfileId: String
customerProfileId: String!
}
input RemoteBraintreePaymentMethodInput {
customerId: String!
paymentMethodToken: String
}
input RemoteStripePaymentMethodInput {
customerId: String!
paymentMethodId: String
}