curl --request POST \
--url https://api.winwinkit.com/users/{app_user_id}/rewards/withdraw-credits \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"key": "credit-reward",
"amount": 100,
"operation_id": "821fae4b5-0123-4567-9152-5297086a161c"
}
'{
"data": {
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"referral_code": "XYZ123",
"referral_code_link": "https://appname.wwk.link/XYZ123",
"is_trial": false,
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": null,
"metadata": {},
"stripe_customer_id": "cus_1234567890",
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"referred_by": {
"code": "XYZ123",
"type": "referral"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"referral_program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}Withdraws credits from a user.
curl --request POST \
--url https://api.winwinkit.com/users/{app_user_id}/rewards/withdraw-credits \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"key": "credit-reward",
"amount": 100,
"operation_id": "821fae4b5-0123-4567-9152-5297086a161c"
}
'{
"data": {
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"referral_code": "XYZ123",
"referral_code_link": "https://appname.wwk.link/XYZ123",
"is_trial": false,
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": null,
"metadata": {},
"stripe_customer_id": "cus_1234567890",
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"referred_by": {
"code": "XYZ123",
"type": "referral"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"referral_program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}The API key to authenticate with.
The app user id of the user to withdraw credits from.
The key of the credit reward to withdraw
"credit-reward"
The amount of credits to withdraw
x >= 1100
An optional operation id that ensures the same operation won't be performed again
"821fae4b5-0123-4567-9152-5297086a161c"
The result of the withdrawal of credits
Show child attributes
The withdraw result
Show child attributes
The amount of credits available at the start
100
The amount of credits available at the end
90
The amount of credits requested to withdraw
10
The amount of credits withdrawn
10
The user
Show child attributes
The unique identifier of the user in your app.
"821fae4b5-1a2d-4c1e-9152-5297086a161c"
The referral code of the user.
"XYZ123"
The referral code link of the user.
"https://appname.wwk.link/XYZ123"
Whether the user is a trial user.
false
Whether the user is a premium user.
false
The date when the user was first seen at.
"2024-11-10T10:28:18.104Z"
The date when the user was last seen at. Deprecated, always returns null and will be removed in the future.
null
The metadata of the user.
{}The unique identifier of the user in Stripe.
"cus_1234567890"
The claim code eligibility of the user.
The referred by object of the user.
Show child attributes
The code claimed by the user. Can be null if the code's entity has been deleted.
"XYZ123"
The type of the code. Can be one of "affiliate", "promo", or "referral".
affiliate, promo, referral "referral"
The stats of the user.
Show child attributes
The rewards of the user.
Show child attributes
The referral user active rewards
Show child attributes
The referral user basic rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"basic-reward"
The name of the reward
"Basic Reward"
The description of the reward
"This is a basic reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user credit rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"credit-reward"
The credits of the reward
100
The name of the reward
"Credit Reward"
The description of the reward
"This is a credit reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The amount of the reward
100
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user offer code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"offer-code-reward"
The offer code id
"123e4567-e89b-12d3-a456-426614174000"
The offer code reference name that is set in the App Store Connect
"Free Month"
The subscription product id of the offer code
"com.winwinkit.monthly"
The name of the reward
"Offer Code Reward"
The description of the reward
"This is an offer code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The offer code value
Show child attributes
The offer code value
"ABCDEFGHIJKLMNOPQR"
The offer code redeem link
"https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR"
The offer code value expiration date
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user Google Play promo code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"promo-code-reward"
The name of the reward
"Promo Code Reward"
The description of the reward
"This is a promo code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The promo code value
Show child attributes
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user RevenueCat entitlement rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"premium-entitlement"
The entitlement ID of the reward
"entl1234567890"
The entitlement key of the reward
"premium"
The name of the reward
"Premium Access"
The description of the reward
"This is an RevenueCat entitlement reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user RevenueCat offering rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"discounted-offering"
The offering ID of the reward
"ofrng1234567890"
The offering key of the reward
"discounted"
The name of the reward
"Discounted Offering"
The description of the reward
"This is an RevenueCat offering reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user expired rewards
Show child attributes
The referral user basic rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"basic-reward"
The name of the reward
"Basic Reward"
The description of the reward
"This is a basic reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user credit rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"credit-reward"
The credits of the reward
100
The name of the reward
"Credit Reward"
The description of the reward
"This is a credit reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user offer code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"offer-code-reward"
The offer code id
"123e4567-e89b-12d3-a456-426614174000"
The offer code reference name that is set in the App Store Connect
"Free Month"
The subscription product id of the offer code
"com.winwinkit.monthly"
The name of the reward
"Offer Code Reward"
The description of the reward
"This is an offer code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user Google Play promo code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"promo-code-reward"
The name of the reward
"Promo Code Reward"
The description of the reward
"This is a promo code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user RevenueCat entitlement rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"premium-entitlement"
The entitlement ID of the reward
"entl1234567890"
The entitlement key of the reward
"premium"
The name of the reward
"Premium Access"
The description of the reward
"This is an RevenueCat entitlement reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The referral user RevenueCat offering rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"discounted-offering"
The offering ID of the reward
"ofrng1234567890"
The offering key of the reward
"discounted"
The name of the reward
"Discounted Offering"
The description of the reward
"This is an RevenueCat offering reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The expiration date of the reward
"2021-01-01T00:00:00.000Z"
The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The program of the user.
Show child attributes
The program id
"123e4567-e89b-12d3-a456-426614174000"
The program name
"Referral Program #1"
The program description
"This is a referral program"
The program metadata
{}The program distribution percentage
100
The program limit
0
The program rewards
Show child attributes
The program sender rewards
Show child attributes
The program basic rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"basic-reward"
The name of the reward
"Basic Reward"
The description of the reward
"This is a basic reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program credit rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"credit-reward"
The credits of the reward
100
The name of the reward
"Credit Reward"
The description of the reward
"This is a credit reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The limit of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program offer code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"offer-code-reward"
The offer code id
"123e4567-e89b-12d3-a456-426614174000"
The offer code reference name that is set in the App Store Connect
"Free Month"
The subscription product id of the offer code
"com.winwinkit.monthly"
The name of the reward
"Offer Code Reward"
The description of the reward
"This is an offer code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The limit of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program Google Play promo code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"promo-code-reward"
The name of the reward
"Promo Code Reward"
The description of the reward
"This is a promo code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The limit of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program RevenueCat entitlement rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"premium-entitlement"
The entitlement ID of the reward
"entl1234567890"
The entitlement key of the reward
"premium"
The name of the reward
"Premium Access"
The description of the reward
"This is an RevenueCat entitlement reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program RevenueCat offering rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"discounted-offering"
The offering ID of the reward
"ofrng1234567890"
The offering key of the reward
"discounted"
The name of the reward
"Discounted Offering"
The description of the reward
"This is an RevenueCat offering reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The amount of the activation configuration
1
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program receiver rewards
Show child attributes
The program basic rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"basic-reward"
The name of the reward
"Basic Reward"
The description of the reward
"This is a basic reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program credit rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"credit-reward"
The credits of the reward
100
The name of the reward
"Credit Reward"
The description of the reward
"This is a credit reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program offer code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"offer-code-reward"
The offer code id
"123e4567-e89b-12d3-a456-426614174000"
The offer code reference name that is set in the App Store Connect
"Free Month"
The subscription product id of the offer code
"com.winwinkit.monthly"
The name of the reward
"Offer Code Reward"
The description of the reward
"This is an offer code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program Google Play promo code rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"promo-code-reward"
The name of the reward
"Promo Code Reward"
The description of the reward
"This is a promo code reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program RevenueCat entitlement rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"premium-entitlement"
The entitlement ID of the reward
"entl1234567890"
The entitlement key of the reward
"premium"
The name of the reward
"Premium Access"
The description of the reward
"This is an RevenueCat entitlement reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim, conversion "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program RevenueCat offering rewards
Show child attributes
The reward
Show child attributes
The key of the reward
"discounted-offering"
The offering ID of the reward
"ofrng1234567890"
The offering key of the reward
"discounted"
The name of the reward
"Discounted Offering"
The description of the reward
"This is an RevenueCat offering reward"
The metadata of the reward
{}The created at of the reward
"2021-01-01T00:00:00.000Z"
The updated at of the reward
"2021-01-01T00:00:00.000Z"
The activation configuration
Show child attributes
The variant of the activation configuration
claim "claim"
The deactivation configuration
Show child attributes
The variant of the deactivation configuration
never "never"
{ "variant": "never" }The program created at
"2021-01-01T00:00:00.000Z"
The program updated at
"2021-01-01T00:00:00.000Z"