Skip to main content
POST
/
api
/
commerce
/
checkouts
/
{id}
/
complete
Complete a checkout (returns the resulting Order)
curl --request POST \
  --url https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete \
  --header 'x-api-key: <api-key>'
import requests

url = "https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete"

headers = {"x-api-key": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};

fetch('https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.vaultgraph.com/api/commerce/checkouts/{id}/complete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "<string>",
    "created_at": "2026-06-23T10:15:00.000Z",
    "checkout_id": "<string>",
    "currency": "GBP",
    "permalink_url": "<string>",
    "line_items": [
      {
        "id": "<string>",
        "item": {
          "id": "<string>",
          "price": 123,
          "title": "<string>",
          "image_url": "<string>"
        },
        "quantity": {
          "fulfilled": 123,
          "total": 123
        },
        "totals": [
          {
            "amount": 123,
            "display_text": "<string>"
          }
        ],
        "parent_id": "<string>",
        "properties": [
          {
            "name": "<string>",
            "value": "<string>"
          }
        ]
      }
    ],
    "totals": [
      {
        "amount": 123,
        "display_text": "<string>"
      }
    ],
    "fulfillment": {
      "expectations": [
        {
          "id": "<string>",
          "method": {
            "id": "<string>",
            "name": "<string>"
          },
          "line_items": [
            {
              "id": "<string>",
              "quantity": 1
            }
          ],
          "destination": {
            "full_name": "<string>",
            "first_name": "<string>",
            "last_name": "<string>",
            "phone_number": "<string>",
            "street_address": "<string>",
            "extended_address": "<string>",
            "address_locality": "<string>",
            "address_region": "<string>",
            "postal_code": "<string>",
            "address_country": "<string>",
            "instructions": "<string>"
          },
          "fulfillable_on": "<string>"
        }
      ],
      "events": [
        {
          "id": "<string>",
          "type": "<string>",
          "occurred_at": "<string>",
          "line_items": [
            {
              "id": "<string>",
              "quantity": 1
            }
          ],
          "description": "<string>",
          "carrier": "<string>",
          "tracking_number": "<string>",
          "tracking_url": "<string>"
        }
      ]
    },
    "ucp": {
      "capabilities": [
        {
          "name": "<string>",
          "version": "<string>",
          "config": {},
          "extends": "<string>",
          "schema": "<string>",
          "spec": "<string>"
        }
      ],
      "version": "<string>"
    },
    "display_id": "ORD_1042",
    "status": "processing",
    "payment_status": "paid",
    "messages": [
      {
        "id": "<string>",
        "body": "<string>",
        "created_at": "<string>"
      }
    ]
  }
}
{
"error": "<string>",
"detail": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

Response

Order created

data
object