---
title: "Create a private hosted test checkout link"
method: POST
path: "/v1/cashback/sandbox/links"
tags: ["Cashback"]
---

# Create a private hosted test checkout link

`POST /v1/cashback/sandbox/links`

## Request

- Base URL: `https://api.openstock.sh`
- URL: `https://api.openstock.sh/v1/cashback/sandbox/links`
- Auth: HTTP bearer

Creates a sandbox-only checkout for one user, store, order, and USD amount. The catalog quote is fixed at creation (8% fallback). Links expire in one hour. GET and preview never credit. A human presses Simulate purchase; an agent POSTs the returned completion body. Completion is idempotent and never places a real order. Keep the URL and completion token private. Fixed non-USD commissions are unsupported.

## Request body

- CashbackSandboxLinkRequest
  - `user_id` string, required: Opaque user ID within your authenticated partner account. Do not send email addresses.
  - `store_id` string, required
  - `order_id` string, required
  - `order_amount` integer, required: Simulated USD order in cents. 10000 is $100. Uses the catalog quote, or 8% when unavailable.
  - `country` string
  - `idempotency_key` string, required

## Response `200`

Hosted sandbox URL and agent JSON completion instructions.

- CashbackSandboxLinkResponse
  - `mode` 'sandbox', required
  - `url` string, uri, required
  - `expires_at` string, required
  - `cashback` object, required
    - `type` 'percentage' | 'fixed', required
    - `value` number, required
    - `currency` string
    - `source` 'network' | 'example', required
    - `basis` 'up_to' | 'fixed' | 'example', required
  - `commission` object, required
    - `amount` integer, required
    - `currency` string, required
    - `scale` 2, required
  - `completion` object, required
    - `url` string, uri, required
    - `method` 'POST', required
    - `body` object, required
      - `token` string, required
      - `action` 'complete', required

## Other responses

- `400`: The request could not be completed. Retry temporary failures with the same idempotency key.
- `401`: The request could not be completed. Retry temporary failures with the same idempotency key.
- `403`: The request could not be completed. Retry temporary failures with the same idempotency key.
- `409`: The request could not be completed. Retry temporary failures with the same idempotency key.
- `503`: The request could not be completed. Retry temporary failures with the same idempotency key.

## Changes

- **2026-11-02** `e3af2bb31234`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openstock/apis/openstock-api/changes/v1/cashback/sandbox/links/post.md)

---

[API](https://skmtc.dev/openstock/apis/openstock-api.md) - [All operations](https://skmtc.dev/openstock/apis/openstock-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openstock/apis/openstock-api/revisions/e3af2bb31234?raw)
