---
title: "Withdraw Credits"
method: POST
path: "/users/{app_user_id}/rewards/withdraw-credits"
tags: ["Rewards Actions"]
---

# Withdraw Credits

`POST /users/{app_user_id}/rewards/withdraw-credits`

## Request

- Base URL: `https://api.winwinkit.com`
- URL: `https://api.winwinkit.com/users/{app_user_id}/rewards/withdraw-credits`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/winwinkit/apis/winwinkit-api/docs/users/:app_user_id/rewards/withdraw-credits/post.ts> (a function with typed inputs; its response is checked against the schema)

Withdraws credits from a user.

## Path parameters

- `app_user_id` string, required

## Headers

- `x-api-key` string, required

## Request body

- UserWithdrawCreditsRequest
  - `key` string, required: The key of the credit reward to withdraw
  - `amount` integer, required: The amount of credits to withdraw
  - `operation_id` string, nullable: An optional operation id that ensures the same operation won't be performed again

## Response `200`

The result of the withdrawal of credits

- UserWithdrawCreditsResponse
  - `data` UserWithdrawCreditsResponseData, required
    - `withdraw_result` UserWithdrawCreditsResult, required
      - `credits_available_at_start` integer, required: The amount of credits available at the start
      - `credits_available_at_end` integer, required: The amount of credits available at the end
      - `credits_requested_to_withdraw` integer, required: The amount of credits requested to withdraw
      - `credits_withdrawn` integer, required: The amount of credits withdrawn
    - `user` User, required
      - `app_user_id` string, required: The unique identifier of the user in your app.
      - `referral_code` string, nullable, required: The referral code of the user.
      - `referral_code_link` string, nullable, required: The referral code link of the user.
      - `is_trial` boolean, nullable, required: Whether the user is a trial user.
      - `is_premium` boolean, nullable, required: Whether the user is a premium user.
      - `first_seen_at` string, date-time, nullable, required: The date when the user was first seen at.
      - `last_seen_at` string, date-time, nullable, required: The date when the user was last seen at. Deprecated, always returns null and will be removed in the future.
      - `metadata` object, nullable, required: The metadata of the user.
      - `stripe_customer_id` string, nullable, required: The unique identifier of the user in Stripe.
      - `claim_code_eligibility` UserClaimCodeEligibility, required: User's eligibility to claim referral code.
        - `eligible` boolean, required: The claim code eligibility flag.
        - `eligible_until` string, date-time, nullable, required: The claim code eligibility until date.
      - `referred_by` UserReferredBy, required: The referred by of the user.
        - `code` string, nullable, required: The code claimed by the user. Can be null if the code's entity has been deleted.
        - `type` 'affiliate' | 'promo' | 'referral', required: The type of the code. Can be one of "affiliate", "promo", or "referral".
        - `claimed_at` string, date-time, required: The date when the user claimed the code.
      - `stats` UserStats, required: The stats of the user.
        - `claims` integer, required: The number of users who have claimed the referral code.
        - `conversions` integer, required: The number of users who have converted to premium.
        - `churns` integer, required: The number of users who have churned.
      - `rewards` UserRewards, required
        - `active` UserRewardsActive, required
          - `basic` UserBasicRewardActive[], required: The referral user basic rewards
            - `reward` BasicReward, required
              - …
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `credit` UserCreditRewardActive[], required: The referral user credit rewards
            - `reward` CreditReward, required
              - …
            - `credits` integer, required: The amount of the reward
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `offer_code` UserOfferCodeRewardActive[], required: The referral user offer code rewards
            - `reward` OfferCodeReward, required
              - …
            - `value` OfferCodeValue, required
              - …
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `googleplay_promo_code` UserGooglePlayPromoCodeRewardActive[], required: The referral user Google Play promo code rewards
            - `reward` GooglePlayPromoCodeReward, required
              - …
            - `value` GooglePlayPromoCodeValue, required
              - …
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `revenuecat_entitlement` UserRevenueCatEntitlementRewardActive[], required: The referral user RevenueCat entitlement rewards
            - `reward` RevenueCatEntitlementReward, required
              - …
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `revenuecat_offering` UserRevenueCatOfferingRewardActive[], required: The referral user RevenueCat offering rewards
            - `reward` RevenueCatOfferingReward, required
              - …
            - `expires_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
        - `expired` UserRewardsExpired, required
          - `basic` UserBasicRewardExpired[], required: The referral user basic rewards
            - `reward` BasicReward, required
              - …
            - `expired_at` string, date-time, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `credit` UserCreditRewardExpired[], required: The referral user credit rewards
            - `reward` CreditReward, required
              - …
            - `expired_at` string, date-time, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `offer_code` UserOfferCodeRewardExpired[], required: The referral user offer code rewards
            - `reward` OfferCodeReward, required
              - …
            - `expired_at` string, date-time, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `googleplay_promo_code` UserGooglePlayPromoCodeRewardExpired[], required: The referral user Google Play promo code rewards
            - `reward` GooglePlayPromoCodeReward, required
              - …
            - `expired_at` string, date-time, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `revenuecat_entitlement` UserRevenueCatEntitlementRewardExpired[], required: The referral user RevenueCat entitlement rewards
            - `reward` RevenueCatEntitlementReward, required
              - …
            - `expired_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
          - `revenuecat_offering` UserRevenueCatOfferingRewardExpired[], required: The referral user RevenueCat offering rewards
            - `reward` RevenueCatOfferingReward, required
              - …
            - `expired_at` string, date-time, nullable, required: The expiration date of the reward
            - `created_at` string, date-time, required: The created at of the reward
            - `updated_at` string, date-time, nullable, required: The updated at of the reward
      - `referral_program` ReferralProgram, required
        - `id` string, required: The program id
        - `name` string, required: The program name
        - `description` string, nullable, required: The program description
        - `metadata` object, nullable, required: The program metadata
        - `distribution_percentage` integer, required: The program distribution percentage
        - `limit` integer, required: The program limit
        - `rewards` ReferralProgramRewards, required
          - `sender` ReferralProgramSenderRewards, required
            - `basic` ReferralProgramSenderBasicReward[], required: The program basic rewards
              - …
            - `credit` ReferralProgramSenderCreditReward[], required: The program credit rewards
              - …
            - `offer_code` ReferralProgramSenderOfferCodeReward[], required: The program offer code rewards
              - …
            - `googleplay_promo_code` ReferralProgramSenderGooglePlayPromoCodeReward[], required: The program Google Play promo code rewards
              - …
            - `revenuecat_entitlement` ReferralProgramSenderRevenueCatEntitlementReward[], required: The program RevenueCat entitlement rewards
              - …
            - `revenuecat_offering` ReferralProgramSenderRevenueCatOfferingReward[], required: The program RevenueCat offering rewards
              - …
          - `receiver` ReferralProgramReceiverRewards, required
            - `basic` ReferralProgramReceiverBasicReward[], required: The program basic rewards
              - …
            - `credit` ReferralProgramReceiverCreditReward[], required: The program credit rewards
              - …
            - `offer_code` ReferralProgramReceiverOfferCodeReward[], required: The program offer code rewards
              - …
            - `googleplay_promo_code` ReferralProgramReceiverGooglePlayPromoCodeReward[], required: The program Google Play promo code rewards
              - …
            - `revenuecat_entitlement` ReferralProgramReceiverRevenueCatEntitlementReward[], required: The program RevenueCat entitlement rewards
              - …
            - `revenuecat_offering` ReferralProgramReceiverRevenueCatOfferingReward[], required: The program RevenueCat offering rewards
              - …
        - `created_at` string, date-time, required: The program created at
        - `updated_at` string, date-time, nullable, required: The program updated at
      - `affiliate` UserAffiliate, required: The user's affiliate standing with this app.
        - `id` string, required: The unique identifier of the affiliate.
        - `status` 'pending' | 'withdrawn' | 'approved' | 'rejected' | 'archived' | 'deactivated' | 'banned', required: Where the affiliate stands with this app. `banned` is terminal; `rejected`, `withdrawn`, `archived` and `deactivated` describe affiliates who may apply again.
        - `codes` UserAffiliateCode[], required: The codes the affiliate can currently promote, oldest first. Empty until they create one — an approved affiliate with no code yet is a normal state.
          - `code` string, required: The affiliate code.
          - `code_link` string, nullable, required: The shareable link for the code. Null when the app has turned code links off for the affiliate group.
        - `stats` UserAffiliateStats, required: The affiliate's totals on this app.
          - `claims` integer, required: The number of users who have claimed one of their codes.
          - `conversions` integer, required: The number of users who have converted to premium.
          - `earnings` integer, required: The commission accrued all-time, in USD cents. Gross and cumulative — not a balance, and not an amount available to withdraw.

## Other responses

- `400`: The request is invalid.
- `401`: Unauthorized
- `404`: The user has not been found.
- `422`: The request is invalid.

## Changes

- **2026-09-04** `4cdc25dd4937`: 1 info
  - added the required property `data/user/allOf[#/components/schemas/User]/referred_by/allOf[#/components/schemas/UserReferredBy]/claimed_at` to the response with the `200` status
- **2026-08-28** `5b921a291cf8`: 1 info
  - added the required property `data/user/allOf[#/components/schemas/User]/affiliate` to the response with the `200` status

[Operation history](https://skmtc.dev/winwinkit/apis/winwinkit-api/changes/users/:app_user_id/rewards/withdraw-credits/post.md)

---

[API](https://skmtc.dev/winwinkit/apis/winwinkit-api.md) - [All operations](https://skmtc.dev/winwinkit/apis/winwinkit-api/llms.txt) - [OpenAPI document](https://skmtc.dev/winwinkit/apis/winwinkit-api/revisions/e587c9d63dfb?raw)
