Gift Card Feature

From FE perspective, it's basically very similar to a Coupon, but there are some caveats:

A gift card will be a random alphanumeric sequence with 15 characters. We'll generally present it in the format: AAAA-1234567-BBBB.

We'll need to display a new text box where customers can input their gift card number when performing the checkout. When the customer inputs a gift card number, we'll need to check its balance through this endpoint:

(sample response)
{
    "success"true,
    "message""",
    "data": {
        "giftCardId"15,
        "initialAmount"52.0,
        "totalRecharge"0.0,
        "totalCapture"11.33,
        "totalRefund"0.0,
        "balance"40.67
    }
}

If the gift card has enough balance to pay the full price of the order, we must redirect the customer to a page where he can input ALL information that we need to fulfill an order, like name, address, IP and so on. We also will use the new "payment provider" (62) for gift card, like in the payload below:

{
  "ShippingMethodId"137,
  "GiftCardNumber""A111-9CFXEM9-73R5",
  "UseShippingAddressForBilling"true,
  "ProductId"917909,
  "Customer": {
    "CustomerIdentificationValue""31427411867",
    "Email""novo_teste12@test.com",
    "PhoneNumber""41232233",
    "FirstName""Eduardo",
    "MiddleName""Teste",
    "LastName""Testador",
    "IP""161.185. 160.93"
  },
  "Payment": {
    "PaymentProcessorId"62
  },
  "ShippingAddress": {
    "FirstName""Eduardo",
    "MiddleName""Teste",
    "LastName""Testador",
    "Address1""767 5th Ave",
    "Address2""",
    "City""New York",
    "ZipCode""10153",
    "State""NY",
    "CountryCode""US",
    "PhoneNumber""+1 212-336-1440"
  }

If the gift card has only credits to partially pay the order, we just need to add the number in the new field "GiftCardNumber" at the root of the json payload, just as shown above. In this scenario, everything else remains the same. If they are going to pay using a credit card, just keep posting all the data as usual. If they have chosen an offline provider, just inform the paymentProcessorId as usual.