Skip to main content
POST
Create an order and get the payment redirect

Nagłówki

cf-turnstile-response
string

Cloudflare Turnstile token. Optional; required only after a burst of attempts from one IP (CAPTCHA_REQUIRED).

Idempotency-Key
string
wymagane

Random attempt key (32–128 chars [A-Za-z0-9_-], e.g. a UUID). Reuse only for an identical retry.

Przykład:

"3b0f6f1e-9c2a-4d1b-8a52-1f0e2c7d9a44"

Parametry ścieżki

shopId
string
wymagane

Shop ID (ObjectId). Also accepts the uniqueName, an active custom domain or <uniqueName>.<hosting domain>.

Przykład:

"664f1a2b3c4d5e6f7a8b9c0d"

Treść

application/json
items
object[]
wymagane

Cart lines (1–20). Several lines = a payment group: one order per line and one payment for the total (adr/0002)

Required array length: 1 - 20 elements
consents
object
wymagane
nick
string

Player nick. Required when shop.kind = game (or the product runs {PLAYER} commands) — otherwise NICK_REQUIRED

Pattern: ^[a-zA-Z0-9_]{3,16}$
Przykład:

"Steve"

email
string<email>

Buyer email. Required without a nick (general shop) — it then identifies the buyer; otherwise EMAIL_REQUIRED

Required string length: 3 - 254
Przykład:

"gracz@example.com"

discountCode
string
Required string length: 1 - 50
Pattern: ^[A-Za-z0-9_-]+$
Przykład:

"LATO10"

paymentMethodCode
string

Required for paid orders (from payment-methods)

Required string length: 1 - 100
Pattern: ^[^:]+$
Przykład:

"imoje"

paymentChannel
string

Method channel (from payment-methods[].channel)

Required string length: 1 - 60
Przykład:

"blik"

returnUrl
string<uri>

Where the gateway sends the buyer back. Must be on a shop domain (or a preview / localhost). The platform sets the query parameter itemshop_order=<orderId> and drops any fragment (#…); read it from location.search. Without returnUrl — the platform-hosted shop status page.

Required string length: 1 - 2048
Przykład:

"https://moj-sklep.pl/dziekujemy"

Odpowiedź

success
boolean
wymagane
Przykład:

true

data
object
wymagane