younifyd
Menu

customerPaymentMethodRemoteCreate

Creates a customer payment method using identifiers from remote payment gateways like Stripe, Authorize.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the customerPaymentMethodRemoteCreate action (under Customer).
  3. Fill in the fields below, then reference the result from later steps as {{customerpaymentmethodremotecreate.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation CustomerPaymentMethodRemoteCreate($customerId: ID!, $remoteReference: CustomerPaymentMethodRemoteInput!) {
  customerPaymentMethodRemoteCreate(
    customerId: $customerId
    remoteReference: $remoteReference
  ) {
    customerPaymentMethod {
      customer {
        amountSpent
        canDelete
        companyContactProfiles
        createdAt
        dataSaleOptOut
        defaultAddress
        defaultEmailAddress
        defaultPhoneNumber
        displayName
        email
        emailMarketingConsent
        firstName
        hasTimelineComment
        id
        identityProviderSubjects
        lastName
        lastOrder
        legacyResourceId
        lifetimeDuration
        locale
        market
        mergeable
        multipassIdentifier
        note
        numberOfOrders
        phone
        productSubscriberStatus
        smsMarketingConsent
        state
        statistics
        tags
        taxExempt
        taxExemptions
        taxSettings
        unsubscribeUrl
        updatedAt
        validEmailAddress
        verifiedEmail
      }
      id
      instrument
      revokedAt
      revokedReason
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

customerIdstringrequired

The ID of the customer.

remoteReferenceobjectrequired

Remote gateway payment method details.

stripePaymentMethodobject2 fields
authorizeNetCustomerPaymentProfileobject2 fields
braintreePaymentMethodobject2 fields
json
{
  "customerId": "string",
  "remoteReference": {
    "stripePaymentMethod": {
      "customerId": "string",
      "paymentMethodId": "string"
    },
    "authorizeNetCustomerPaymentProfile": {
      "customerProfileId": "string",
      "customerPaymentProfileId": "string"
    },
    "braintreePaymentMethod": {
      "customerId": "string",
      "paymentMethodToken": "string"
    }
  }
}

Response

Read the result with {{customerpaymentmethodremotecreate.response.data.data.customerPaymentMethodRemoteCreate}}. If the API returns errors, the step fails and they are at {{customerpaymentmethodremotecreate.response.data.errors}}.

customerPaymentMethodobject
customerobject38 fields
idstring
instrumentobject17 fields

This field can return one of several different object shapes — properties from every possible shape are shown together.

revokedAtstring
revokedReasonstring

One ofAUTHORIZE_NET_GATEWAY_NOT_ENABLEDAUTHORIZE_NET_RETURNED_NO_PAYMENT_METHODFAILED_TO_UPDATE_CREDIT_CARDSTRIPE_API_AUTHENTICATION_ERRORSTRIPE_API_INVALID_REQUEST_ERRORSTRIPE_GATEWAY_NOT_ENABLEDSTRIPE_RETURNED_NO_PAYMENT_METHODSTRIPE_PAYMENT_METHOD_NOT_CARDBRAINTREE_API_AUTHENTICATION_ERRORBRAINTREE_GATEWAY_NOT_ENABLEDBRAINTREE_RETURNED_NO_PAYMENT_METHODBRAINTREE_PAYMENT_METHOD_NOT_CARDPAYMENT_METHOD_VERIFICATION_FAILEDTHREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTEDMANUALLY_REVOKEDFAILED_TO_RETRIEVE_BILLING_ADDRESSMERGEDCUSTOMER_REDACTEDTOO_MANY_CONSECUTIVE_FAILURESCVV_ATTEMPTS_LIMIT_EXCEEDED

userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.