customer Payment Method Remote Create
Requires access scope. Also: Requires
scope.
Create a payment method from remote gateway identifiers. NOTE: This operation processes payment methods asynchronously. The returned payment method will initially have incomplete details. Developers must poll this payment method using customerPaymentMethod query until all payment method details are available, or the payment method is revoked (usually within seconds).
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.
Anchor to CustomerPaymentMethodRemoteCreatePayload returnsCustomer Payment Method Remote Create Payload returns
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method. Note that the returned payment method may initially be in an incomplete state. Developers should poll this payment method using the customerPaymentMethod query until all required payment details have been processed.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Mutation Reference
Input
{
"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
}