Create Gift Card
The Dintero wallet service can be used for creating gift cards with a balance.
You can use the gift card as a payment option in your own payment solution, it can also be used in a Dintero Checkout payment session, or a combination of both.
A typical example when you would use both is when you have physical stores in addition to an ecommerce site. The gift card can be sold in the physical store and used both there and in the Dintero Checkout on the ecommerce site.
Create gift card
Create a gift card of 500,- NOK
.
POST https://api.dintero.com/v1/accounts/{aid}/wallets/cards
Authorization: Bearer <token>
Content-Type: application/json
{
"card_id": "string",
"customer_id": "string",
"name": "string",
"amount": 50000,
"currency": "NOK",
"pin": {
"format": {
"length": 4,
"numbers": true
}
},
"card_token": {
"format": {
"length": 16,
"numbers": true
}
}
}
The card_token
and pin
that is included in the response when a card is
created must be shared with the customer. The example shows the recommended
minimum lengths.
Metadata
Use metadata to include additional information about the gift card
We recommend that you use the metadata property to store information about the transaction/order that sold the gift card if available
{
"card_id": "string",
...
"metadata": {
"dintero_transaction_id": "P12345678.xxxxx"
}
}
Security
We recommend that a separate API Client is used when accessing the Wallets API. Access to create new gift card should be limited as the system that creates payment session does not need to have access to the Wallets service
You can create webhooks subscriptions to receive wallet_transaction
events
sent when new gift cards are created and used