BizKitHub
DokumentacePrůzkumník APIOrder/api/v1/shop/order/record-in-app-payment
postOrderVeřejné API v1

/api/v1/shop/order/record-in-app-payment

Records a payment the shop collected through App Store or Google Play (payment kind in_app). Call it from your server after verifying the purchase with the store; never from a client app. When the recorded payments cover the order price, the order is marked as paid with the standard workflow (e-mails, reservations, lock codes).

orderpostApiV1ShopOrderRecord-in-app-payment

Parametry

1 v query · JSON tělo

Parametry v query

· 1
apiKeystringPovinné

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

PříkladPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Tělo požadavku

application/json
orderIdstringPovinné

Order hash.

Délka: 32
PříkladsSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
identityIdstringVolitelné

Customer identity (/customer/login). When set, the order must belong to this customer.

store"app_store" | "google_play"Povinné

Store that collected the money.

Příkladapp_store
transactionIdstringPovinné

Store transaction id (App Store transactionId, Google Play orderId). Unique: a retry with the same id returns the first result, the same id on another order is refused with 409.

Délka: 1–64
Příklady2000000812345678GPA.3312-4580-1234-56789
pricenumberPovinné

Amount in the order currency.

Příklad290
notestringVolitelné

Free text stored with the payment row.

Délka: 0–500

Schéma odpovědi

1 zdokumentovaný stavový kód

200Úspěch
success"true"Povinné
paymentIdstringPovinné
Příklad184233
alreadyRecordedbooleanPovinné

True when this transaction id was already recorded on the order.

triggeredMarkAsPaidbooleanPovinné

True when this call marked the order as paid.

totalReceivedAfternumberPovinné
Příklad290
orderPricenumberPovinné
Příklad290

Ukázka odpovědi

application/json
{
  "success": true,
  "paymentId": "184233",
  "alreadyRecorded": false,
  "triggeredMarkAsPaid": false,
  "totalReceivedAfter": 290,
  "orderPrice": 290
}

Ukázka požadavku

POST /api/v1/shop/order/record-in-app-payment

post
curl -X POST "https://api.bizkithub.com/api/v1/shop/order/record-in-app-payment?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "orderId": "sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
  "identityId": "example_identityId",
  "store": "app_store",
  "transactionId": "2000000812345678",
  "price": 290,
  "note": "example_note"
}'

Potřebujete API klíč?

Všechny veřejné endpointy BizKitHub API se ověřují API klíčem.

Získat API klíč