Merchant API

Use voucher with reserved first

1/ Merchant apply reserve voucher flow.

Check > Reserve > Mark use

Description:

(1) User has an order to pay with Got It vouchers, user provides vouchers code(s) to merchant.

  • If the merchant has not yet agreed with Got It and identified the SKUs participating in the campaign, go to step (2)
  • If the merchant has agreed with Got It and identified the SKUs participating in the campaign, go to step (6)

(2) Merchant calls API/checkmultiple.json, transmits voucher code information to check the validity and redeemable_sku information of the voucher (if any).

(3) The Got It system checks the validity of the voucher code

  • Valid: return response valid code(s) can reserve/ mark use and list of redeemable SKUs (of vouchers of redeemable_sku type).

  • Invalid: return the response invalid code

(4) Got It responds to voucher code information.

(5) In case the order contains voucher type = redeemable_sku, the merchant checks the SKUs in the bill with the redeemable_skus of the voucher codes

  • If the bill contains available SKUs of vouchers type = redeemable_sku, go to step (7)
  • If the bill does not contain available SKUs of vouchers type = redeemable_sku, go to step (15)

(6)Merchant checks the campaign's defined SKU list and the SKUs in the user's bill

  • If the bill contains SKUs participating in the campaign, go to step (7)
  • If the bill does not contain SKUs participating in the campaign, go to step (12)

(7) Call API/checkmultiple.json to check the validity of the voucher. The information transmitted through Got It includes the SKUs in the order.

(8) The Got It system checks the validity of the vouchers and responds to the voucher information to the merchant. If the voucher code is valid: Merchant can mark use voucher codes

  • If the bill contains voucher type = redeemable_sku, go to step (9)
  • If the bill does not contain voucher type = redeemable_sku, go to step (10)

(9) For voucher type = redeemable_sku, based on the voucher codes and SKUs in the order, the Got It system calculates the actual redeemable value of the voucher.

(10) Got It responds to voucher codes information.

(11) Merchant responds with voucher codes information to the user, go to step (16)

(12) Merchant calls API/checkmultiple.json to check voucher code information.

(13) Got It checks the validity of voucher codes.

(14) Got It responds to voucher code information.

(15) Merchant responds with voucher code information to the user

(16) User keep buying other products

(17) Merchant creates a new bill for the user’s order, then call API/reserved to hold code(s) for the bill_number
(18) Got It receives request params from merchant and reserve code for the bill_number. Once code is reserved, it cannot be reserved or marked for use for another bill_number. And it can only be marked using for reserved bill_number

  • If the bill contains voucher type = redeemable_sku, go to step (19)
  • If the bill does not contain voucher type = redeemable_sku, go to step (20)

(19) The Got It system calculates the actual redemption value of the voucher and records the redeemed SKU for the voucher
(20) Got It responds the result of reserving code(s) for the merchant.

(21) Merchant waits for the user to pay the bill.

(22) User proceeds to pay for the order

(23) Merchant calls API/usemultiple.json to mark use voucher codes

(24) The Got It system marks vouchers for use.

  • If the bill contains voucher type = redeemable_sku, go to step (25)
  • If the bill does not contain voucher type = redeemable_sku, go to step (26)

(25) The Got It system calculates the actual redemption value of the voucher and records the redeemed SKU for the voucher

(26) The Got It system responds to the result of marking voucher use

(27) Merchant responds with detailed bill information to the user.

Unreserve

Description:

(1) The user is in the process of paying for the order, and the user has provided the voucher code to the merchant to reserve the code(s) for this bill_bumber. But the user wants to terminate the payment process.
(2) Merchant call API/unreserved to un-reserved code(s).
(3) Got It mark unreserved code(s) for bill_number from request params.
If bill_number in request params and bill_number reserving voucher code(s) is the same, code(s) will be returned to the old state which before reserving.
(4) Got It response the result of un-reserving code(s) to merchant.
(5) Merchant response the result of payment termination to the user.