v29

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-06-042661,1122.5 MB
billing

Redeem ad credits

Redeem ads credit on behalf of the ad account id and apply it towards billing.

This endpoint might not be available to all apps. Learn more.

post/ad_accounts/{ad_account_id}/ads_credit/redeem

Path parameters

ad_account_idstring required

Unique identifier of an ad account.

Request body

offerCodeHashstring required

Takes in a SHA256 hash of the offerCode.

validateOnlyboolean required

If true, only validate if we can redeem offer code. Otherwise it will actually apply the offer code to the account

Example request

{
  "offerCodeHash": "138e9e0ff7e38cf511b880975eb574c09aa9d5e1657590ab0431040da68caa67",
  "validateOnly": true
}

Response

The request has succeeded.

errorCodeinteger nullable

Error code type if error occurs

errorMessagestring nullable

Reason for failure

successboolean

Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true).

Example response

{
  "offerCodeHash": "138e9e0ff7e38cf511b880975eb574c09aa9d5e1657590ab0431040da68caa67",
  "validateOnly": true,
  "success": false,
  "errorCode": 2708,
  "errorMessage": "The offer has already been redeemed by this advertiser"
}