Dintero Gift Cards
Dintero Gift Cards gives your customers the option to pay either fully or partially with a gift card in your checkout. This way you can create virtual gift cards which customers can use to pay an order in your store later.
- Dintero Gift Cards are only supported for Dintero Checkout Express sessions.
- Only one gift card can be used to authorize a payment session.
- Dintero Gift Cards are not supported for payment sessions where splits are specified.
Creating a payment session with Dintero Gift Cards enabled is currently only supported for the following payment options:
payex
bambora
dintero_psp.creditcard
klarna.klarna
Using gift cards in the checkout
There are two ways a gift card can be used to authorize a payment session:
- Customer provides their gift card during the checkout flow.
- Merchant provides the customer gift card when the payment session is created.
Native push to payment Wallets (Vipps/MobilePay/Swish) will be disabled when gift card is enabled as the payer must "use" their gift card before being redirected to the Wallets app. Push will be done by sending SMS containing link to checkout.
Customer initiated
This flow allows the payer to pay their order either fully or partially using a gift card—depending on the order amount and the available balance on the card.
When the payer loads the checkout they get the option to add a gift card after they have entered their personal details and before they complete the authorization, as shown below:
Please note that PIN is required in this case, meaning that the payer will need to input a PIN code in order to activate the gift card. To learn more about creating a card, including cards with PIN codes, please refer to the relevant documentation
If the gift card number and PIN entered are both correct and the gift card is valid, the gift card will be added to the session and the total amount will update to reflect the order amount minus the available balance on the gift card. In this example, the available balance was 100 NOK. The updated order amount after adding the gift card is therefore 400 - 100 = 300 NOK, as shown below:
An example request for creating a payment session with Dintero Gift Cards enabled is shown below:
POST https://checkout.dintero.com/v1/sessions-profile
Authorization: Bearer <token>
Content-Type: application/json
{
"url": {
"return_url": "https://example.com/accept",
"callback_url": "https://example.com/callback?method=GET",
"merchant_terms_url": "https://example.com/terms.html"
},
"order": {
"amount": 72200,
"currency": "NOK",
"vat_amount": 13660,
"items": [
{
"amount": 72200,
"quantity": 2,
"line_id": "1",
"description": "Forsvinnignspølse",
"vat": 20,
"id": "10"
}
],
"merchant_reference": "string"
},
"configuration": {
"active_payment_types": { "enabled": true },
"dintero": {
"type": "payment_type",
"wallets": {
"type": "payment_product_type",
"enabled": true
}
}
},
"profile_id": "default",
"merchant": {
"name": "string",
"logo_url": "http://example.com"
}
}
See related documentation for more information about creating payment sessions
Merchant initiated
This flow is intended for the use case where the gift card is presented before the payment session is created, e.g. the payer is authenticated and the gift card is provided from the merchant CRM system.
PIN is not required in this case, since the payer is known and authenticated.
When the payer loads the checkout, it will display that a gift card has been activated and added to the session. The payer can then either proceed with the payment or remove the gift card. If they remove the gift card, they will need to input the gift card number and PIN code in order to activate it again.
An example request for creating a payment session with Dintero Gift Cards enabled and preloaded is shown below:
POST https://checkout.dintero.com/v1/sessions-profile
Authorization: Bearer <token>
Content-Type: application/json
{
"url": {
"return_url": "https://example.com/accept",
"callback_url": "https://example.com/callback?method=GET",
"merchant_terms_url": "https://example.com/terms.html"
},
"customer": {
"gift_cards": {
"dintero.wallets": [
{
"card_id": "{wallets.card_id}"
}
]
}
},
"order": {
"amount": 72200,
"currency": "NOK",
"vat_amount": 13660,
"items": [
{
"amount": 72200,
"quantity": 2,
"line_id": "1",
"description": "Forsvinnignspølse",
"vat": 20,
"id": "10"
}
],
"merchant_reference": "string"
},
"configuration": {
"active_payment_types": { "enabled": true },
"dintero": {
"type": "payment_type",
"wallets": {
"type": "payment_product_type",
"enabled": true
},
"zero": {
"type": "payment_product_type",
"enabled": true,
"payability": "payable"
}
}
},
"profile_id": "default",
"merchant": {
"name": "string",
"logo_url": "http://example.com"
}
}