Cashback

Simulate a purchase, credit, or refund without spending money

Changed on

Sandbox only. Creates fake USD purchases at the displayed catalog quote, or 8% when unavailable, with no product exclusions. The first purchase fixes its commission for later status changes. Fixed non-USD commissions are explicitly unsupported. Paid simulations credit immediately; pending ones can later be paid, then reversed. Reuse the same order_id and amounts with a NEW idempotency_key to change status. Reuse the SAME key for retries. Sandbox funds are not real and cannot be withdrawn. Query them with /v1/cashback/wallet mode=sandbox; real wallets never include them.

post/v1/cashback/sandbox/purchases

Request

  • Base URL
    https://api.openstock.sh
  • URL
    https://api.openstock.sh/v1/cashback/sandbox/purchases
  • Auth
    HTTP bearer

Request body

user_idstring required

Opaque user ID within your authenticated partner account. Do not send email addresses.

store_idstring required
order_idstring required
order_amountinteger required

Simulated USD order in cents. 10000 is $100. Uses the catalog quote, or 8% when unavailable.

countrystring
status'pending' | 'paid' | 'reversed'
idempotency_keystring required

Example request

{
  "user_id": "grok-user-42",
  "order_amount": 10000,
  "country": "US"
}

Response

The simulated purchase and isolated sandbox balance.

mode'live' | 'sandbox' required
next_cursorstring nullable required

Changes