Skip to content

PG payment

PG billing supports searching the product list and purchase only. It doesn’t verify the client-based receipt. The payment request screen will appear in a new window immediately upon call if you purchase through PG billing in the Windows environment.

Calling hive.IAPV4.purchase(marketPid, iapPayload, onIAPV4PurchaseCB) returns a response of ErrorCode:IAPSUCCESS=90 and Code:IAPV4HiveStoreSuccess=-6110000 immediately through onIAPV4PurchaseCB without any receipt information, and you can determine the ErrorCode (or Code) to expose a pop-up indicating that a purchase is being made in-game.

Before applying PG payment supported by IAP v4, PG payment policy, PG Billing Console Guide Pre-Operation Register the necessary information in the Hive Console according to the contents.

PG payment features

The followings are the main features of PG payment:

  • PG payment is based on Hive SDK v4 and IAP v4 and is handled with an asynchronous method through the web browser that the PG company provides.
    • You can call all provided APIs through the game server only.
  • The information registered on Hive Console in advance is reflected in the price and information about products that need to configure the store, and Hive SDK v4 passes the product information.
  • Payment results are sent to the URL to receive payment results you registered on Hive Console. However, some payment methods, such as a deposit to a virtual account, can’t send the payment results immediately.
  • Orders completed delivering an item must call the handling delivery completion API to handle the orders as completed.
    • If you try to repurchase an item, which is completed the payment but has not handled delivery completion, payment will not be processed. You can repurchase the item after handling the delivery completed for the previously purchased item.
    • If you attempt to purchase an item redundantly that has not completed the payment, as in the case that proceeds purchase on multiple payment windows, only the first payment will proceed. Also, the rest of the purchase will be canceled automatically even if the payment has been made.
    • The game server can cancel payments even after requesting item delivery completion.

PG payment procedure

PG payment proceeds in the following order. To implement the following, integrate the PG payment API in the game server.

  1. Searching payment completion history
  2. Verifying receipts
  3. Completing item delivery

If there is the user’s payment completion history, you must proceed orderly with the receipts verification and item delivery completion. The payments that complete delivering an item are not exposed on the payment completion history.

For more details about PG payment process, see the flowchart below:

  • PG Payment Flow

Hive PG Multi-Quantity Purchases

Hive PG Payments allow you to purchase more than one of the same in-app product in a single transaction by specifying a quantity in the purchase request.

You can make purchases using hive.IAPV4.purchase(marketPid, iapPayload, quantity, onIAPV4PurchaseCB) with the quantity parameter, which allows you to specify a quantity. Multi-quantity is intended for consumable in-app products, products that can be purchased, consumed, and repurchased. Be careful with products that are not intended to be purchased repeatedly.