AwardIt
This page describes the technical configuration required to enable AwardIt in Omnium, as well as API usage for buying and paying with gift cards.
For the api used in this integration, take a look here.
Supported features
- Buy gift card
- Use gift card as payment. This will reserve the amount on a gift card. Payment workflow steps will then handle capture and credit.
Setup
Add a gift provider under Connectors
Go to Configurations -> Settings -> Advanced -> Connectors Add a connector like this:
Add AwardIt payment provider
Go to Settings → Orders → Payment → Payment Types Add:
- Payment settings name: AwardIt
- Payment method name: GiftCard
- Provider name: Select AwardIt from the dropdown
- Display name: Up to you
- Authorization time in days: when gift card is used as a payment, set number of days the amount should be reserved on the gift card(30 days is normal)
- Client ID: Get this from AwardIt
- API Token: Get this from AwardIt
- Base URL: Get this from AwardIt (test or prod)
Template properties
When creating gift cards in AwardIt, correct template must be sent in the request from Omnium. You will find template id's in AwardIt portal. Add properties on the payment provider, one for each market.
- Key: "TemplateForMarket_{MarketId}". Example: "TemplateForMarket_NOR"
- Value: "Template id from AwardIt" Example: "2344"
DefaultTemplate
If you have multiple markets, using the same template in AwardIt, you can add a default template key instead of market specific.
- Key: "DefaultTemplate"
- Value: "Template id from AwardIt"
Distribution details
Gift cards are sent default on email to customer trough AwardIt. If you want the gift card sent on Sms: Add properties on the payment provider, one for each market you want to send gift card as Sms
- Key: "DistributionTypeForMarket_{MarketId}". Example: "DistributionTypeForMarket_NOR"
- Value: "Sms"
Configuring Gift Card Product
-
Create a virtual gift card product
Define a product with 'IsVirtual' set to 'true' -
Set the gift card SKU in settings
Go to Settings → Orders → Gift Cards and enter the SKU for your gift card product.
Order Workflow
For the first status when an order is added (typically New), the following workflow step must be added:
- Authorize payment Add this as the first step. If customer has paid with gift card, this will reserve the amount. Make sure to toggle "Stop on error" to prevent the rest of the workflow if reservation fails.
- Create and send gift cards This will create and send the gift card to the customer and move the gift card into a virtual shipment
Order Status: VirtualShip
Since gift cards will be "shipped" immediately and are a digital product, we need a "virtual" shipping order status.
Gift cards are considered a virtual shipment and require a dedicated order status:
This status completes the order lifecycle for digital shipments (gift cards). The workflow steps (such as notifications) in the example are typical steps for this status, same as on your other completed statuses. The key workflow steps include:
- CapturePayments – captures any pending payments.
- CompleteShipment – completes the virtual shipment.
- ExportOrder – optionally exports the order to an external system.
Shipping method
Define a VirtualShipment shipping method which will be used for gift cards (or other digital products):
shipmentDeliveryType
must be set toVirtual
.deliveryTime
is typically set to immediate.
Buying Gift Cards
Gift cards can be added to carts the same way standard products are added to the cart, but if you want the gift card price to be dynamic (set by the customer for instance), you will need to add the order line using the gift card SKU and the selected price:
API Endpoint: /api/Cart/{cartId}/OrderLines
→ Documentation
Note: If you are only buying a gift card, the shipment added to cart should be of type "VirtualShipment". If buying gift card and other items, the workflow will automatically handle this and create a split shipment for the gift card.
Paying with Gift Cards
- Validate gift card balance using
/api/GiftCard/{code}
→ Documentation - Add gift card payment to cart:
/api/Cart/{cartId}/AddGiftCard/{giftCardCode}
→ Documentation
Here both gift card code and pin can be used. This will add a payment to the cart with transactionType "AwaitingAuthorization". When order is created, the step "Authorize payment" will the do the reservation towards AwardIt. Amount is not reserved before this!
- (Optionally) Remove gift card payment from cart:**
/api/Cart/{cartId}/RemoveGiftCard/{giftCardCode}