customerPaymentMethodRemoteCreate
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 remoteReferenceremote•
Reference Remote gateway payment method details.
Anchor to CustomerPaymentMethodRemoteCreatePayload returnsCustomerPaymentMethodRemoteCreatePayload 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",
"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
}