Skip to main content

Checkout APIs

Checkout GraphQL APIs can be executed by sending an HTTP POST requests to the following URL:

    https://<marketplace-url>/api/graphql

Send requests using the URL with a query/mutation and variables, or a GraphQL client library.

Method: POST

URL:

https://marketplace-url/api/graphql

If the API is in preview phase, then use:

https://marketplace-url/api/graphql/preview

Headers:

Authorization: Bearer <access_token>
Content-Type: application/json

Here's an example of a request payload in json:

{
"query": "mutation addItemsToCart($input: AddItemsInput!) {\n addItemsToCart(input: $input) {\n cart {\n id\n items {\n id\n product {\n name\n }\n }\n pricingTotal {\n amountDueAfterTax\n totalTaxAmount\n }\n }\n }\n}\n",
"variables": {
"input": {
"items": [
{
"pricingPlanId": "ae1acd7c-e161-4dc1-8b35-1865138874ce"
}
],
"userId": "95cce1ea-37fb-431d-9f5a-7df387b7e8e4",
"accountId": "9faf88c2-9e58-4f5b-a009-5dc9094fe2a0"
}
}
}

List of APIs

Use the various GraphQL and REST APIs described in this section of the guide to extend the capabilities of Checkout to build and manage customized workflows.

Was this page helpful?