Virtual Payment API
Game scripts use the sud virtual payment APIs to start a payment and query the game currency balance. Order creation, signData construction, both signature computations, delivery, and reconciliation are all handled by Game SVR; the client only relays the signature artifacts unchanged.
| API | Purpose | Source of key inputs |
|---|---|---|
| sud.requestVirtualPayment | Start a virtual payment request | signData / paySig / signature are issued by Game SVR |
| sud.getBalance | Query the game currency balance and cumulative totals | No input required; env is optional |
Both are callback-based APIs that report results through success / fail / complete and do not return a Promise.
For the complete flow, a sequence diagram, and copy-ready polling code, see Payment Flow. For the roles, order state machine, and Game SVR development rules of direct IAP, see Virtual Payment Configuration - Direct IAP.
