Authorization
Request Body
Transaction amount used to check the minimum-purchase requirement. Defaults to
0 when omitted.Email address of the customer performing the checkout. Required to validate
coupons restricted to
new or old customers.Membership tier ID. Used together with
paymentLinkType of
membership_payment to resolve the payment link for membership checkouts.Response
Successful ResponseMain Structure (Root)
data Structure (Object)
Errors
This endpoint returns amessages string describing why a coupon cannot be
applied. The notable cases:
Returned with
messages: "Validation Error" when the request body fails
validation (e.g. missing couponCode or paymentLinkId).Returned with
messages: "Gagal! Kode diskon ini tidak ditemukan." when no
coupon with that code exists for this account.Returned with
messages: "Gagal! Kode diskon ini tidak berlaku untuk produk yang dipilih."
when the coupon exists but is not bound to the paymentLinkId being checked.Returned with
messages: "Gagal! Kode diskon ini sudah tidak aktif." when the
discount is inactive.Returned with
messages: "Gagal! Kode diskon ini belum berlaku dan tidak dapat digunakan."
when the discount start date has not been reached.Returned with
messages: "Gagal! Kode diskon ini telah kadaluarsa dan tidak dapat digunakan."
when the discount has expired.Returned with
messages: "Gagal! Kode diskon tidak dapat digunakan untuk produk {productLabel}"
when the payment link type is not eligible for discounts (e.g. payment requests
or fundraising links).Returned with
messages: "Kode diskon ini hanya berlaku untuk transaksi dengan harga minimal {amount}."
when amount is below the discount’s minimum purchase.Returned with a
messages string explaining that the coupon is restricted to
new or old (existing) customers when customerEmail does not satisfy the
eligibility rule.