Create a Coupon with a Value

Hello, good afternoon.
How do I register coupons on the platform with values? Our client has a cashback system in the ERP and they have several coupons with different values that they would also like to send to the website. I looked at the coupon, promotions, and GiftCard API but couldn’t find one that fits this case.

Hey Vini, how’s it going?

VTEX doesn’t have coupons that hold a “stored” value on their own, but rather coupons that can be linked to promotions, which in turn generate a discount — either a fixed amount or a percentage.

Another available feature is the loyalty value promotion, which, when a purchase is made, credits a cashback amount to the shopper.

If you have any questions, feel free to let me know!

Best,

Hey Belo, how can I create this cashback via API?

Can I link this value to the user’s profile so that when they go to pay, the discount automatically shows up for them?

Hi zerebelo. Alright, so I would need to create a promotion with a value X and attach the coupons to that promotion. And how does the gift card work? I saw in the API that it’s possible to create a gift card linked to a customer, but I didn’t see where I define the value of that gift card — is it also tied to a promotion?

Hey @fellipmelo and @JrVini, how’s everything going?

Since it’s been a while since you posted, I’m not sure if you’ve already sorted this out.

But regarding creating a GiftCard with a specific value — whenever a GiftCard is created in VTEX, it needs to be associated with a user’s “profileId”.

Once the GiftCard is created, the next step is to create a first transaction for that GiftCard with the “operation” field set to “Credit” and the “value” field set to the desired balance.

So, with the GiftCard created and the balance applied, the user is then able to use that Voucher as a payment method at checkout.

Now, regarding the second part of Fellip’s problem — about automatically applying credits at checkout — I’m not even sure that’s advisable. Since a GiftCard is a “payment method”, the user should be required to select it as their payment method before confirming the use of the available balance.

Cheers!