Skip to content

GIEP developer docs

For developers integrating a store, an order system or a back office with GIEP. Start with authentication and idempotency, then create a checkout session or wire up webhooks.

Basics

  • Base URL: the API host of the deployment, for example https://api.<your GIEP domain> (staging: https://api.staging.giep.io). The OpenAPI document lists a placeholder server until the production domain is set.
  • JSON in and out (Content-Type: application/json), except the CSV exports.
  • Amounts are integers in minor units of the currency: 4999 = 49.99 USD, 1000 = 1.000 KWD (three decimals). Never send or expect floats. A Money object is { "amount": 4999, "currency": "USD" }.
  • Times are ISO 8601 in UTC.
  • IDs are UUIDs.
  • Merchant routes are under /v1. /public/* routes are for the hosted checkout (the session token is the credential); you do not need them for a server integration.

TypeScript SDK

packages/sdk (@giep/sdk, server-side only, no runtime dependencies) wraps the API with types generated from the OpenAPI document and includes verifyWebhook(rawBody, header, secret), which throws GiepWebhookError on any failure. See packages/sdk/README.md.

The API reference is generated from the GIEP merchant API OpenAPI 3.1.0 document, version 0.1.0. The API serves the same document at /openapi.json. The hosted checkout calls a separate set of public routes, authenticated by the session token; a server integration does not need them, so they are not listed here.

Create a checkout session

Request · cURL
curl -X POST "$GIEP_API_URL/v1/checkout-sessions" \
  -H "Authorization: Bearer $GIEP_API_KEY" \
  -H "Idempotency-Key: order-1042-session-v1" \
  -H "Content-Type: application/json" \
  -d '{
  "checkoutId": "679010dc-dba5-41d2-a1d7-5b76-d95",
  "lineItems": [
    {
      "title": "string",
      "quantity": 1,
      "unitAmount": 4999
    }
  ],
  "currency": "USD"
}'
{
  "id": "37386ae0-251d-4f38-a753-611e841d7",
  "token": "string",
  "url": "https://shop.example/url"
}

Full reference for this endpoint. $GIEP_API_URL is your deployment’s API host.