Redeem an offer (campaigns/redeem)
The aggregator or store provides YooMoney with the information regarding the leads, i. e. how the users can redeem discounts or bonuses.
 
Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/redeem
Parameters
ParameterTypeDescription
ymCampaignId
int
Campaign ID in the YooMoney service. Returned in the response to the campaigns/create request.
Required parameter
pinСontent
string
Contents of the promo code (alphanumeric string, not case-sensitive). See campaigns/create
Required for campaigns with campaignType=codeOnline and campaignType=codeOffline with single-use promo codes (one-off).
clickId
string
Unique ID of a click.
Generated in the YooMoney service at the moment of linking and added to acceptUrl (a unique link for redeeming the offer that redirects the user). See campaigns/create
Required for campaigns:
  • campaignType=promo;
  • campaignType=codeOnline with pinType=reusable;
  • campaignType=codeOffline with pinType=reusable.
transactionId
string (36)
ID of the order on the store’s side (that covers the applied offer).
It must be unique for a single ad campaign.
You can use monotonically increasing numbers, a string of random characters, or any other option.
Required parameter
redeemStatus
enum
Lead status. Possible values:
  • used — lead redeemed by user;
  • approved — store or aggregator pays remuneration to YooMoney for this lead;
  • declined — store or aggregator will not pay remuneration to YooMoney for this lead (for example, when returning the product).
Optional parameter
sceneRedeem
string
Place where the lead was redeemed (discount or bonus were used).
Optional parameter
redeemTime
datetime
Time when the lead was redeemed (discount or bonus were used).
Optional parameter
campaignFee
varchar (30)
Amount of the YooMoney’s renumeration after the lead was redeemed. Number in rubles or dollars, two characters after the dot.
Required parameter
feeCurrency
CurrencyCode
Currency code of YooMoney’s remuneration.
  • 643 is the Russian ruble (set by default if no value is specified);
  • 840 is the US dollar.
Optional parameter
orderAmount
varchar (30)
Amount of the order. Number in rubles or dollars, two characters after the dot.
Optional parameter
orderCurrency
CurrencyCode
Currency code of the order.
  • 643 is the Russian ruble (set by default if no value is specified);
  • 840 is the US dollar.
Optional parameter
cashbackAmount
varchar (30)
Amount of cashback. Number in rubles or dollars, two characters after the dot.
Optional parameter
Example of a request body
JSON
{
    "campaignFee": 10,
    "ymCampaignId": 1,
    "clickId": "615737-1227535-12368",
    "pinContent": "ab12",
    "redeemTime": "2017-12-31T23:59:59+03:30",
    "redeemStatus": "used",
    "sceneRedeem": "1",
    "transactionId": "1"
}
Request example
cURL
curl -X POST \
--header 'Content-Type: application/json' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Authorization: Bearer <access token>' -d '{
    "campaignFee": 10,
    "ymCampaignId": 1,
    "clickId": "615737-1227535-12368",
    "pinContent": "ab12",
    "redeemTime": "2017-12-31T23:59:59+03:30",
    "redeemStatus": "used",
    "sceneRedeem": "1",
    "transactionId": "1"
}' 'https://yoomoney.ru/api/offerwall/v1/campaigns/redeem'
Response
Status of the operation (in progress or error).