Skip to main content

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.

AttributeData typeRemarksDescription
pay_timeintrequiredPayment time (unix timestamp)
openidstringrequiredUnique user ID (up to 20 numeric characters)
billing_idstringrequiredPayment order number or payment serial number
money_usfloatrequiredPayment amount (in USD cents)
money_cnfloatoptionalPayment amount (in RMB)
currencystringoptional3-letter currency code
money_sourcefloatoptionalPayment 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

AttributeData typeDescription
codeintReturn code
msgstringReturn message

Response sample

{
"code": 0,
"msg": "Success",
"seq": "{YOUR_RANDOM_STRING}"
}