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 disableAddressValidationdisable•
Address Validation BooleanDefault:false Disables the requirement for a billing address on the remote payment method.
- 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
1mutation customerPaymentMethodRemoteCreate($customerId: ID!, $disableAddressValidation: Boolean, $remoteReference: CustomerPaymentMethodRemoteInput!) {2 customerPaymentMethodRemoteCreate(customerId: $customerId, disableAddressValidation: $disableAddressValidation, remoteReference: $remoteReference) {3 customerPaymentMethod {4 # CustomerPaymentMethod fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "customerId": "gid://shopify/<objectName>/10079785100",3 "disableAddressValidation": true,4 "remoteReference": {5 "authorizeNetCustomerPaymentProfile": {6 "customerPaymentProfileId": "<your-customerPaymentProfileId>",7 "customerProfileId": "<your-customerProfileId>"8 },9 "braintreePaymentMethod": {10 "customerId": "<your-customerId>",11 "paymentMethodToken": "<your-paymentMethodToken>"12 },13 "paypalPaymentMethod": {14 "billingAddress": "",15 "billingAgreementId": "<your-billingAgreementId>"16 },17 "stripePaymentMethod": {18 "customerId": "<your-customerId>",19 "paymentMethodId": "<your-paymentMethodId>"20 }21 }22}
{
"customerId": "gid://shopify/<objectName>/10079785100",
"disableAddressValidation": true,
"remoteReference": {
"authorizeNetCustomerPaymentProfile": {
"customerPaymentProfileId": "<your-customerPaymentProfileId>",
"customerProfileId": "<your-customerProfileId>"
},
"braintreePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodToken": "<your-paymentMethodToken>"
},
"paypalPaymentMethod": {
"billingAddress": "",
"billingAgreementId": "<your-billingAgreementId>"
},
"stripePaymentMethod": {
"customerId": "<your-customerId>",
"paymentMethodId": "<your-paymentMethodId>"
}
}
}
input CustomerPaymentMethodRemoteInput {
authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput
braintreePaymentMethod: RemoteBraintreePaymentMethodInput
paypalPaymentMethod: RemotePaypalPaymentMethodInput
stripePaymentMethod: RemoteStripePaymentMethodInput
}
input RemoteAuthorizeNetCustomerPaymentProfileInput {
customerPaymentProfileId: String
customerProfileId: String!
}
input RemoteBraintreePaymentMethodInput {
customerId: String!
paymentMethodToken: String
}
input RemotePaypalPaymentMethodInput {
billingAddress: MailingAddressInput!
billingAgreementId: String!
}
input RemoteStripePaymentMethodInput {
customerId: String!
paymentMethodId: String
}