Changes from v1 to v2
What changed in StagePay v2 — callback signatures, transaction states, amount fields, removed PGs, USDT, settlement v2, and the REST API — and how to migrate.
Summary
| Area | v1 | v2 |
|---|---|---|
| Callback verification | Authorization: Bearer <apiKey> | HMAC signature X-StagePay-Signature + timestamp (Bearer kept as deprecated) |
| Callback events | Payment completion only | payment.succeeded, payment.refunded |
| Callback retries | Limited | Up to 8 times at intervals from 1 minute to 24 hours + manual resend, fixed Delivery ID |
| Callback transaction status | status (completed) | transactionStatus (success, partial_refunded, refunded) added. status keeps its v1 value |
| Amounts | amount (floating point) | amountMinor (integer minor unit) added, used for settlement |
| Transaction creation | Saved only on success | Created first as pending at the time of the payment request |
| Payment creation | Checkout URL only | Server-to-server POST /api/v1/payments added |
| Price override | price parameter | allowCustomPrice + signature (priceSig) required |
| PGs | Included KAKAO, GASH, XSOLLA, GOC, RAZER, UNIPIN, PAYPAL | Those PGs removed, USDT added |
| Settlement | Simple aggregation | Policy snapshots, transaction locking, three-way verification, four-eyes approval, carry-forward, refund adjustments, REST and CSV |
| Payment URLs | /request.php, /webhook.php … | Extensionless paths /request, /checkout, /webhook … (old .php URLs keep working) |
| REST API | Scopes only partially enforced | Scopes, IP allowlist, rate limits, and ownership checks enforced; settlement:read added |
| Logs | Scattered | Unified logs based on requestId, with secret masking |
Migration
Add callback signature verification
Issue a webhook secret in the console and implement signature verification. Once verification is deployed, you can remove the existing Bearer check.
Evaluate events and status
Existing status === 'completed' checks keep working (status in payment.succeeded is still "completed"). However, in v2 refund callbacks (payment.refunded) also arrive at the same URL, so change your code to tell events apart with event and read the transaction status from transactionStatus. If you will not handle payment.refunded, just respond with 200 (if you do not respond, it will be retried).
Use amountMinor
Use amountMinor (integer) for amount comparisons and accounting. The uppercase aliases (userID, orderID, etc.) are still provided, but new code should use the camelCase fields.
Idempotency
Store X-StagePay-Delivery as an idempotency key → Retries and idempotency.
Replace removed PGs
Apps that used removed PGs should switch to KCP/TOSS (including Korean easy pay methods), STRIPE, MYCARD, EBANX, and so on → Payment method support table.
What remains compatible
- The URL parameters of the
request.php/inapp.phpcheckout are unchanged. - The v1 fields in the callback body (
orderId,userId,productName,status, etc.) are still included. However,originalPayloadnow contains sanitized payment method details with secrets excluded, instead of the PG's original result. - The
return.phpmessage format and the iOS/Android bridge name (GamePotStagePay) are the same. - The request format of the refund API (
refund.php) is the same.