We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

Is it possible to capture the promo code value after a user completes checkout?

The checkout complete callback contains the promotionId, but this is only the ID of the promotion itself, not the promo code. It's currently not possible to obtain this information on the front end.

What you can do is capture the termConversionId value from the callback and use it to call the below API with the parameter term_conversion_id on the backend (using the respective AID and API token). This shouldn't be done on the front end directly as it may expose your token.

/publisher/conversion/get

The promo code value is available in the response, for example:

Promo.png

Last updated: