BizKitHub
DokumentacjaEksplorator APIOrder/api/v1/shop/order/record-in-app-payment
postOrderPubliczne 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 w query · Treść JSON

Parametry query

· 1
apiKeystringWymagane

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

PrzykładPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Treść żądania

application/json
orderIdstringWymagane

Order hash.

Długość: 32
PrzykładsSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
identityIdstringOpcjonalne

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

store"app_store" | "google_play"Wymagane

Store that collected the money.

Przykładapp_store
transactionIdstringWymagane

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ługość: 1–64
Przykłady2000000812345678GPA.3312-4580-1234-56789
pricenumberWymagane

Amount in the order currency.

Przykład290
notestringOpcjonalne

Free text stored with the payment row.

Długość: 0–500

Schemat odpowiedzi

1 udokumentowany kod statusu

200Sukces
success"true"Wymagane
paymentIdstringWymagane
Przykład184233
alreadyRecordedbooleanWymagane

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

triggeredMarkAsPaidbooleanWymagane

True when this call marked the order as paid.

totalReceivedAfternumberWymagane
Przykład290
orderPricenumberWymagane
Przykład290

Przykład odpowiedzi

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

Przykład żądania

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"
}'

Potrzebujesz klucza API?

Wszystkie publiczne endpointy BizKitHub API uwierzytelniają się kluczem API.

Uzyskaj klucz API