cURL
curl --request POST \ --url https://sdk-api.playcamp.io/v1/server/coupons/redeem \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "couponCode": "<string>", "userId": "<string>", "gameUserUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "isTest": false } '
{ "data": { "success": true, "usageId": 123, "couponCode": "<string>", "userId": "<string>", "packageId": 123, "itemName": {}, "quantity": 123, "creatorKey": "<string>", "redeemedAt": "2023-11-07T05:31:56Z", "errorCode": "<string>", "errorMessage": "<string>" } }
Redeems the coupon and returns reward information. Usage is recorded in DB and webhook is sent.
Server API Key (format: {keyId}:{secret})
Coupon code
User ID
In-game user UUID (optional)
Test mode (does not create actual data)
Success
Coupon redemption result
Show child attributes