Customer Payment Method
Requires access scope. Also: Requires
scope.
A customer's payment method.
Anchor to Fields and connectionsFields and connections
- Anchor to customercustomer•
The customer to whom the payment method belongs.
- •ID!non-null
The ID of this payment method.
- Anchor to instrumentinstrument•
The instrument for this payment method.
- Anchor to revokedAtrevoked•
At The time that the payment method was revoked.
- Anchor to revokedReasonrevoked•
Reason The revocation reason for this payment method.
- Anchor to subscriptionContractssubscription•
Contracts SubscriptionContract Connection!non-null List Subscription Contracts.
Anchor to QueriesQueries
- •query
Returns a CustomerPaymentMethod resource by its ID.
Anchor to MutationsMutations
- •mutation
Creates a credit card payment method for a customer using a session id. These values are only obtained through card imports happening from a PCI compliant environment. Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly.
- Anchor to billingAddressbilling•
Address MailingAddress Input!required The billing address.
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to sessionIdsession•
Id String!required The Cardserver session ID. Obtained by storing card data with Shopify's Cardsink. Exchanging raw card data for a session ID must be done in a PCI complaint environment.
Arguments
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to processingprocessing•
If the card verification result is processing. When this is true, customer_payment_method will be null.
- Anchor to userErrorsuser•
Errors [UserError!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates the credit card payment method for a customer.
- Anchor to billingAddressbilling•
Address MailingAddress Input!required The billing address.
- •ID!required
The ID of the customer payment method.
- Anchor to sessionIdsession•
Id String!required The Cardserver session ID.
Arguments
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to processingprocessing•
If the card verification result is processing. When this is true, customer_payment_method will be null.
- Anchor to userErrorsuser•
Errors [UserError!]!non-null The list of errors that occurred from executing the mutation.
Fields
- Anchor to customerPaymentMethodPaypalBillingAgreementCreatecustomer•
Payment Method Paypal Billing Agreement Create mutation Creates a PayPal billing agreement for a customer.
- Anchor to billingAddressbilling•
Address The billing address.
- Anchor to billingAgreementIdbilling•
Agreement Id String!required The billing agreement ID from PayPal that starts with 'B-' (for example,
).
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to inactiveinactive•BooleanDefault:false
Whether the PayPal billing agreement is inactive.
Arguments
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Fields
- Anchor to customerPaymentMethodPaypalBillingAgreementUpdatecustomer•
Payment Method Paypal Billing Agreement Update mutation Updates a PayPal billing agreement for a customer.
- Anchor to billingAddressbilling•
Address MailingAddress Input!required The billing address.
- •ID!required
The ID of the customer payment method.
Arguments
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Fields
- •mutation
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).
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to remoteReferenceremote•
Reference Remote gateway payment method details.
Arguments
- 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.
Fields
- •mutation
Create a payment method from a credit card stored by Stripe.
- Anchor to customerIdcustomer•
Id ID!required The ID of the customer.
- Anchor to stripeCustomerIdstripe•
Customer Id String!required The Stripe Customer ID.
- Anchor to stripePaymentMethodIdstripe•
Payment Method Id The Stripe Payment Method ID. Starting on 2025, stripe_payment_method_id will become mandatory for all API versions.
Arguments
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Fields