younifyd
Menu

cart_createCartRedirectUrls

Create single-use redirect URLs that hand a cart off to BigCommerce hosted, embedded or external checkout (use within ~30 seconds).

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the cart_createCartRedirectUrls action (under Create).
  3. Fill in the fields below, then reference the result from later steps as {{cartCreatecartredirecturls.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 CartCreateCartRedirectUrls($input: CreateCartRedirectUrlsInput) {
  cart {
    createCartRedirectUrls(input: $input) {
      redirectUrls {
        redirectedCheckoutUrl
        embeddedCheckoutUrl
        externalCheckoutUrl
        externalCheckoutHandoff {
          url
          method
        }
      }
      errors {
        __typename
        ... on NotFoundError {
          message
        }
      }
    }
  }
}

Variables

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

inputobject

Create cart redirect URLs input object.

cartEntityIdstring
queryParamsarray<object>2 fields
ipAddressstring
visitorIdstring
visitIdstring
paymentWalletDataobject3 fields
analyticsobject3 fields
json
{
  "input": {
    "cartEntityId": "string",
    "queryParams": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "ipAddress": "string",
    "visitorId": "string",
    "visitId": "string",
    "paymentWalletData": {
      "initializationId": "string",
      "providerOrderId": "string",
      "providerId": "string"
    },
    "analytics": {
      "request": {
        "url": "string",
        "userAgent": "string",
        "refererUrl": "string",
        "ip": "string",
        "acceptLanguage": "string"
      },
      "initiator": {
        "visitId": "string",
        "visitorId": "string"
      },
      "consent": {
        "targeting": "string",
        "analytics": "string",
        "functional": "string"
      }
    }
  }
}

Response

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

redirectUrlsobject
redirectedCheckoutUrlstring
embeddedCheckoutUrlstring
externalCheckoutUrlstring
externalCheckoutHandoffobject3 fields
errorsarray<object>
messageobject

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