Customer Deal
One of the main focus points for orders is the customer deal per each shop product.
Each is financially tied to Gifthub ecosystem in three ways:
An amount that is directly debited from customer wallet when purchasing products.
An amount that is calculated based on each order and sent as an invoice to be paid by the customer at the end of payment period. It is normally in customer’s retail currency.
The total profit of Gifthub and Customer is also shared. (If applicatble)
To cater for these interactions, the following concepts are used in the ecosytem:
Customer Wallet Deals
Customer Retail Deals
Generic Deal
When we are talking about deals anywhere (either on wallet or retail), we are talking about an Adjustment Amount with a type. Each adjustment amount can have one of these three types:
commission
dee
discount
We use this generic structure of deals in both retail deal and wallet deal.
Generic Deal Example
{
"adjustment": {
"amount": 6,
"adjustmentMode": "percentage"
},
"type": "commission"
}
Customer Wallet Deal
The wallet deal per shop item per customer is a list of Generic Deals that is applied to each item in the order. It is applied directly after exchanging the product to customer wallet and all fixed amounts are in wallet currency. This effect the amount that is reduced from customer wallet.
Customer Retail Deal
Each customer has a retail currency attached to it upon creation. The retail deal per shop item per customer includes:
A list of Generic Deals that is applied to each item in the order and it is applied directly after exchanging the total amount of that item from wallet currency to the retail currency in the retail invoice.
An object which defines the percentage of profit sharing between Gifthub and the customer
The adjustments added to the retail deal are treated as post order payments however the wallet deal adjustments are debited from the customer wallet as soon as the purchased product is delivered.
Example
CustomerA has the below table as its deal with Gifthub for Product1.
retailCurrency → IRT
walletCurrency → EUR
Wallet Deal
Type
Mode
Amount
discount
percentage
-2
fee
fixed
1
commission
percentage
6
Retail Deal - deal items
Type
Mode
Amount
fee
fixed
45,000
commission
percentage
6
Retail Deal - sharing
Entity
share
Gifthub
50
Customer
50
Example Response for product1
{
"walletDeal": [
{
"adjustment": {
"amount": -2,
"adjustmentMode": "percentage"
},
"type": "discount"
},
{
"adjustment": {
"amount": 1,
"adjustmentMode": "fixed"
},
"type": "fee"
},
{
"adjustment": {
"amount": 6,
"adjustmentMode": "percentage"
},
"type": "commission"
}
],
"retailDeal": {
"sharing": {
"gifthub": 50,
"customer": 50
},
"items": [
{
"adjustment": {
"amount": 6,
"adjustmentMode": "percentage"
},
"type": "commission"
},
{
"adjustment": {
"amount": 45000,
"adjustmentMode": "fixed"
},
"type": "fee"
}
]
}
}
Last updated