This section contains the API reference for Verify Payment API and the sample request code segments.
The following are the details associated with the Verify Payment API:
The Verify Payment API is used to verify the in-app product purchase before assigning the IAP product to the user.
https://payments.now.gg/
v1/console/order/verifyPayment
POST
publisherToken: 'your_publisherToken_here' Content-Type: 'application/json'
The verifyPayment API uses the publisher token for authorization, which must be included in the request header.
To get the Publisher Token:
The following params should be included within the request body with verifyPayment API:
{
purchaseToken: <your_purchaseToken_here>,
orderId: <your_orderId_here>
}
The purchaseToken and orderId are returned after a successful purchase. You can refer to the following reference documents for more information:
For Native Android –
For Unity –
| Param | Type | Required | Description |
|---|---|---|---|
| purchaseToken | string | Yes | The purchaseToken associated with a purchase. |
| orderId | string | Yes | The orderId associated with a purchase. |
The following are the sample expected responses:
{
"data": {
"currency": "USD",
"orderAmount": "2.30",
"orderId": "1-202205270828092444340093",
"packageName": "123",
"payStatusTxt": "Paid",
"payTime": "1653640320",
"payTimeTxt": "2022-05-27 08:32:00",
"sellerGoodsId": "111222344",
"isTestOrder": True/False
},
"success": true
}
{
"iap_error_code": 412,
"iap_error_message": "No data found.",
"payload": {
"orderId": "1-2022052708285322094340093",
"purchaseToken": "7FBBE2B14212DA597341D88D066BF56D",
"timeZone": 0
},
"success": false
}
| Params | Type | Description |
|---|---|---|
| success | boolean | Returns result as True or False. |
| iap_error_code | int | Returns the iap_error_code:
|
| iap_error_message | string | Returns the iap_error_message associated with success or failure.
|
| orderId | string | The orderId associated with an in-app product purchase. |
| packageName | string | The packageName associated with your app. |
| orderAmount | string | The orderAmount of your purchase. |
| currency | string | The currency of the purchase. Examples – USD, INR, etc. |
| payTime | string | The payment time associated with the purchase. |
| payStatusTxt | string | Payment status as Paid or Unpaid. |
| payTimeTxt | string | Payment date and time associated with a purchase. |
| sellerGoodsId | string | The product ID is associated with the purchased product. |
| isTestOrder | boolean | Returns results as true or false if the order is generated during testing. |
Payments Module
Payments Module
Document Rev. 1.0