Xsolla-logoXsolla Developers
または
パブリッシャーアカウントへ

ユーザ残高:クーポンの償還Webhook POST

ユーザーが仮想アイテムまたは仮想通貨を受け取るためにクーポンを引き換えたときに送信されます。

Request
Request Body schema: application/json
object

クーポンの詳細(オブジェクト)。

campaign_code
string

キャンペーンコード。

coupon_code
string

クーポンコードです。

id_operation
integer

エクソラデータベースの操作ID。

items
Array of objects

購入内の仮想アイテム。

items_operation_type
string

仮想アイテムで行われる操作の種類。

notification_type
string

通知タイプ。

operation_type
string

操作の種類。

object

カスタムプロジェクト設定(オブジェクト)。

merchant_id
integer

マーチャントID。

project_id
integer

プロジェクトID。このパラメータは、ドメインページのプロジェクト名の横にあります。

object

ユーザーの詳細(オブジェクト)。

id
required
string

ユーザーID。

email
string

ユーザーのEメール。

name
string

ユーザー名。

object

ユーザ残高:内部操作

diff
string

購入時の仮想通貨の数量。

new_value
string

トランザクション後の残高。

old_value
string

トランザクション前の残高。

Responses
204

処理の成功を示すために戻ります。

400

提供された情報(たとえば、必要なパラメーターの欠落、認可の失敗など。)にエラーが発生した場合に戻ります。

500

リターンはサーバーに一時的なエラーが発生したことを示します。

Request samples
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
        "settings": {
            "project_id": 18404,
            "merchant_id": 2340
        },
        "virtual_currency_balance": {
            "old_value": "0",
            "new_value": "0",
            "diff": "0"
        },
        "user": {
            "name": "Xsolla User",
            "id": "1234567",
            "email": "email@example.com"
        },
        "operation_type": "coupon",
        "notification_type": "user_balance_operation",
        "items_operation_type": "add",
            "items": [{
                "sku": "com.xsolla.item_1468",
                "amount": "2"
            }],
        "id_operation": "66989",
        "coupon": {
            "coupon_code": "test123",
            "campaign_code": "Xsolla Campaign"
        }
    }'
Response samples
application/json
{
  • "error": {
    }
}