ReportEventPay
Reports the user's in-game payment events to SmartLink, which makes it possible for in-game behavior analysis.
note
Permissions are required before this API can be called, reach out to the SmartLink representative for more information. The error code 22010 will be returned if the API is called while permissions have not been obtained.
POST /api/v3/report/pay
Request parameters
For more information on the query parameters, see Query parameters.
Attribute | Data type | Remarks | Description |
---|---|---|---|
pay_time | int | required | Payment time (unix timestamp) |
openid | string | required | Unique user ID (up to 20 numeric characters) |
billing_id | string | required | Payment order number or payment serial number |
money_us | float | required | Payment amount (in USD cents) |
money_cn | float | optional | Payment amount (in RMB) |
currency | string | optional | 3-letter currency code |
money_source | float | optional | Payment amount (local currency) |
Request sample
curl --request POST "https://openapi.smartlink.intlgame.com/api/v3/report/pay?gameid=${GAME_ID}&seq=${YOUR_RANDOM_STRING}&sig=${SIGNATURE}&ts=${TS}" \
--header 'Content-Type: application/json' \
--data-raw '{
"pay_time": 1694917726,
"openid": "5450588341569",
"billing_id": "42342342343",
"money_us":100,
"money_cn":100,
"currency":"AFN",
"money_source":90
}'
Response parameters
Attribute | Data type | Description |
---|---|---|
code | int | Return code |
msg | string | Return message |
Response sample
{
"code": 0,
"msg": "Success",
"seq": "{YOUR_RANDOM_STRING}"
}