Gift Cards

Orders with gift cards can currently be processed in the Order Management System (OMS) with some limitations, given the gift card is treated as a promotional discount and not a payment method (see Solution limitations section.

The gift card information is exported in the promotions_info section of each one of the order lines. The info is also exported as a custom_attribute at the order level so that it can be easily seen in the OMS Backoffice, where the use of multiple gift cards per order is supported.

Gift card order

Example

{
    "order": {
        "id": "123456",
        "custom_attributes": [
            {
                "name": "gift_card",
                "value": "003YL6VBPP97"
            }
        ],
         "lines": [
            {
                "line_number": "1",
                "id": "23",
                "type": "PHYSICAL",
                "name": "Yoga pants"
                "amount": {
                        "net_amount": 50,
                        "gross_amount": 50,
                        "tax_amount": 0,
                        "tax_rate": 0,
                        "taxes": [
                            {
                                "type": "NO TAX",
                                "amount": 0,
                                "rate": 0
                            }
                        ],
                        "currency": "USD"
                    },
                    "promotions_info": {
                        "original_price": 100,
                        "promotions": [
                            {
                                "code": "003YL6VBPP97",
                                "name": "gift_card",
                                "discount": 50,
                                "percentage": 50
                            }
                        ]
                    }
                ...
            },
         ]
    }
}

Refund flow and store credit

For an order with multiple lines, which were partially paid via a gift card and partially with another payment method, store credit will be generated if the entire amount of the order has been refunded in the OMS. In this example both lines needs to be returned, or a manual appeasement done, for the entire total in order to generate a store credit.

If one of the two order lines is returned, the paid amount for the line is refunded to the customer, but the store credit is not generated. When the second line is returned the credit will be added to the user account.

Solution limitations

The current implementation for the gift card is temporary, until the OMS can fully support multi-tender types per order.

Due to this, the solution poses the following limitations:

  • Orders fully paid with gift cards cannot automatically generate a store credit because that OMS cannot generate refunds for zero total prices.
  • Orders partially paid with gift cards will only generate a store credit if the entire order amount paid by the other payment provider is fully refunded.