POST
/
referral
/
users
/
{app_user_id}
/
rewards
/
credit
/
{key}
/
withdraw
curl --request POST \
  --url https://api.winwinkit.com/referral/users/{app_user_id}/rewards/credit/{key}/withdraw \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "credits": 10
}'
{
  "data": {
    "referral_user": {
      "app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
      "code": "XYZ123",
      "preview_link": "https://example.wwk.link/XYZ123",
      "is_premium": true,
      "first_seen_at": "2024-11-10T10:28:18.104Z",
      "last_seen_at": "2025-02-10T10:28:18.104Z",
      "metadata": {
        "key": "value"
      },
      "program": {
        "id": "77dc-5508-40d3-8723-472e884b55fe",
        "name": "Free month",
        "description": "Free month for each invited user.",
        "distribution_percentage": 100,
        "limit": 100,
        "metadata": {
          "key": "value"
        },
        "rewards": {
          "sender": {
            "basic": {
              "key": "extended-premium-trial",
              "name": "Extended Premium Trial",
              "description": "Extend Premium trial for 14 more days.",
              "metadata": {
                "key": "value"
              },
              "activationConfiguration": {
                "variant": "claim",
                "amount": 1
              },
              "deactivationConfiguration": {
                "variant": "never"
              }
            },
            "credit": {
              "key": "credits-level-one",
              "credits": 100,
              "name": "Level one",
              "description": "Grant credits for completing 100 levels.",
              "metadata": {
                "key": "value"
              },
              "limit": 0,
              "activationConfiguration": {
                "variant": "claim",
                "amount": 1
              },
              "deactivationConfiguration": {
                "variant": "never"
              }
            }
          },
          "receiver": {
            "basic": {
              "key": "extended-premium-trial",
              "name": "Extended Premium Trial",
              "description": "Extend Premium trial for 14 more days.",
              "metadata": {
                "key": "value"
              },
              "activationConfiguration": {
                "variant": "claim"
              },
              "deactivationConfiguration": {
                "variant": "never"
              }
            },
            "credit": {
              "key": "credits-level-one",
              "credits": 100,
              "name": "Level one",
              "description": "Grant credits for completing 100 levels.",
              "metadata": {
                "key": "value"
              },
              "activationConfiguration": {
                "variant": "claim"
              },
              "deactivationConfiguration": {
                "variant": "never"
              }
            }
          }
        }
      },
      "claim_code_eligibility": {
        "eligible": true,
        "eligible_until": "2025-02-10T10:28:18.104Z"
      },
      "rewards": {
        "active": {
          "basic": [
            {
              "key": "extended-premium-trial",
              "name": "Extended Premium Trial",
              "description": "Extend Premium trial for 14 more days.",
              "metadata": {
                "key": "value"
              },
              "expires_at": null,
              "created_at": "2025-02-10T10:28:18.104Z"
            }
          ],
          "credit": [
            {
              "key": "credits-level-one",
              "credits": 100,
              "name": "Level one",
              "description": "Grant credits for completing 100 levels.",
              "metadata": {
                "key": "value"
              },
              "expires_at": null,
              "created_at": "2025-02-10T10:28:18.104Z"
            }
          ]
        },
        "expired": {
          "basic": [
            {
              "key": "extended-premium-trial",
              "name": "Extended Premium Trial",
              "description": "Extend Premium trial for 14 more days.",
              "metadata": {
                "key": "value"
              },
              "expired_at": "2025-02-10T10:28:18.104Z",
              "created_at": "2024-11-10T10:28:18.104Z"
            }
          ],
          "credit": [
            {
              "key": "credits-level-one",
              "credits": 100,
              "name": "Level one",
              "description": "Grant credits for completing 100 levels.",
              "metadata": {
                "key": "value"
              },
              "expired_at": "2025-02-10T10:28:18.104Z",
              "created_at": "2024-11-10T10:28:18.104Z"
            }
          ]
        }
      },
      "stats": {
        "claims": 10,
        "conversions": 8,
        "churns": 1
      }
    },
    "withdraw_result": {
      "credits_available_at_start": 100,
      "credits_available_at_end": 90,
      "credits_requested_to_withdraw": 10,
      "credits_withdrawn": 10
    }
  }
}

Authorizations

X-API-KEY
string
header
required

The API key to authenticate with.

Path Parameters

app_user_id
string
required

The app user id of the referral user.

key
string
required

The credit referral reward key.

Body

application/json
credits
number
required

The credits amount to withdraw.

Required range: x > 0
Example:

10

Response

200
application/json
The withdraw credits completed. Check data.withdraw_result object for details.
data
object
required

Data object containing the referral user and withdraw result objects.