API reference

Webhooks

Payment provider callbacks.

Payment provider callback (test provider)#

POST/v1/webhooks/mockpay

Stand-in for Click, Payme and Stripe callbacks. Stored raw, deduplicated on providerEventId (a repeat returns duplicate: true and has no effect), written to the order timeline and forwarded to the booking. Real providers add signature checks.

Auth
Public, no credentials
Operation id
post_webhooks_mockpay

Request body application/json required

FieldTypeDescription
orderIdrequiredstring
pattern: ^ord_[a-f0-9]{32}$
paymentIdrequiredstring
length: 1–100
statusrequiredstring
one of: "held", "declined"
reasonstring
max length: 300
providerEventIdrequiredstring
length: 1–200
Example request body
{
  "orderId": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
  "paymentId": "pay_112440045751",
  "status": "held",
  "providerEventId": "evt_01J…"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/webhooks/mockpay' \
  -H 'Content-Type: application/json' \
  -d '{
  "orderId": "ord_0d6c3f8a2b9e4c1d8f7a6b5c4d3e2f10",
  "paymentId": "pay_112440045751",
  "status": "held",
  "providerEventId": "evt_01J…"
}'

Responses

200Received.
Example response
{
  "received": true,
  "duplicate": false
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
API version v0.0.1 · Spec generated from source on 2026-11-22Changelog · Prices in so‘m (UZS)