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
- Add a step and choose the BigCommerce Storefront connector.
- Pick the cart_createCartRedirectUrls action (under Create).
- 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.
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.
{
"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}}.
Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?