Download OpenAPI specification:Download
API for managing virtuall cards, digital gift cards and transactions
new: Add endpoint for getting cards on account
new: Add support for defining type of card
update: Adjust minimum length of PIN when creating a new card from 6 to 4.
new: Allow more currencies:
SEK
,DKK
,EUR
, andUSD
.
new: Add option to create card with
pin
and support for including pin when getting card info and when creating new transaction
new: Get details on customer card using
customer_id
andcard_id
.
new Support creating card with
active_from
to control when the created card is activated and allowsdrawdown
transactions to be created
new Support creating fund transaction using
type
property.
new Support creating transaction using
card_id
.
new: Support listing cards by customer_id, allow customer with access to
user:wallets
scope to list their cards with balance
Create a new card
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
card details
card_id required | string <= 255 characters The card id you have defined for the card. (must not have trailing or leading spaces) |
amount required | integer >= 0 Monetary amount in smallest unit for the currency |
currency required | string Enum: "NOK" "SEK" "DKK" "EUR" "USD" The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217 |
customer_id | string <= 255 characters The customer id you have defined as the owner of the card. (must not have trailing or leading spaces) |
name | string Display name for the card |
type | string Enum: "gift_card" "credit_note" The type of the card. The value is one of the following:
Defaults to |
metadata | object A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved |
active_from | string <date-time> Optional time when the card is activated. No |
expires_at | string <date-time> Optional expiration time for the card. No transaction will be allowed on an expired card |
object (PinGenerator) How the PIN should be generated. | |
object (TokenGenerator) Specify how token should be generated |
{- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "metadata": {
- "order_id": "xk39592f"
}, - "amount": 50000,
- "currency": "NOK",
- "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "pin": {
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}
}, - "card_token": {
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}, - "expires_after_transaction": true,
- "expires_in": 1
}
}
{- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "amount": 50000,
- "currency": "NOK",
- "amount_balance": 50000,
- "amount_available": 50000,
- "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "pin": {
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}, - "pin": {
- "value": "012345",
- "barcode_128": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
}
}, - "card_token": {
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}, - "expires_after_transaction": true,
- "expires_in": 1,
- "token": {
- "value": "DINCARD:6ccfec5d-3a53-47de-910a-97d6dda22e5f",
- "barcode_128": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
}
}
}
Get all cards for an account
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
limit | integer [ 1 .. 100 ] Default: 10 A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items. |
starting_after | string cursor for use in pagination. starting_after is an object ID
that defines your place in the list. For instance, if you make
a list request and receive 100 objects, end the result contains
|
search | string Will try to match the search to either |
created_at.gte | string <isodate> Card created after (ISO 8601. We recommend using a localised ISO 8601 datetime like |
created_at.lte | string <isodate> Card created before a date (ISO 8601. We recommend using a localised ISO 8601 datetime like |
type | string Enum: "gift_card" "credit_note" Filter cards by type |
status | string Enum: "unused" "partially_used" "used" "expired" Filter cards by amount and expiry status |
expired_at.gte | string <isodate> Card expires after (ISO 8601. We recommend using a localised ISO 8601 datetime like |
expired_at.lte | string <isodate> Card expires before a date (ISO 8601. We recommend using a localised ISO 8601 datetime like |
amount | integer Exact card amount |
amount.gte | integer Lower limit for filtering on card amount. |
amount.lte | integer Upper limit for filtering on card amount. |
currency | Array of strings The currency of the card. |
customer | string Filter cards by |
[- {
- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "amount": 50000,
- "currency": "NOK",
- "amount_balance": 50000,
- "amount_available": 50000,
- "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z"
}
]
Get all details about a card
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
card_id required | string <= 255 characters The card id you have defined for the card. (must not have trailing or leading spaces) |
{- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "amount": 50000,
- "currency": "NOK",
- "amount_balance": 50000,
- "amount_available": 50000,
- "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "tokens": [
- {
- "expires_at": "2019-08-24T14:15:22Z",
- "masked_code": "DINCARD:********-****-****-91**-*******22e5f"
}
]
}
Create a temporary token
(also referred as Card Code)
for the card, an temporary alias that must be used when
when creating a drawdown transaction
The token can be stored in a barcode to allow use of virtuell card in purchase in POS or webstore
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
card_id required | string <= 255 characters The card id you have defined for the card. (must not have trailing or leading spaces) |
token details
ref_id required | string Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique. |
expires_in required | integer >= 1 The lifetime in seconds for the card token. For example, the value "3600" denotes that the token will expire in one hour from the time the response was generated. |
metadata | object A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved |
object specify the format for to generate | |
expires_after_transaction | boolean Default: true The token can only be used to create one transaction, card lookup by token will be available until token expires by date |
{- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}, - "expires_after_transaction": true,
- "expires_in": 1
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "format": {
- "length": 36,
- "prefix": "DINCARD:",
- "symbols": true,
- "numbers": true,
- "characters": true,
- "barcode": false
}, - "expires_after_transaction": true,
- "expires_in": 1,
- "token": {
- "value": "DINCARD:6ccfec5d-3a53-47de-910a-97d6dda22e5f",
- "barcode_128": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
}
}
Get details about a card, including the current balance and available funds. No details will be returned for expired tokens
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
token required | string temporary token for a Card |
pin | string PIN for the Card |
{- "token": "string",
- "pin": "string"
}
{- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "amount": 50000,
- "currency": "NOK",
- "amount_balance": 50000,
- "amount_available": 50000,
- "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z"
}
Get the cards active for a customer
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
customer_id required | string <= 255 characters The customer id you have defined for the customer. (must not have trailing or leading spaces) |
limit | integer [ 1 .. 100 ] Default: 10 A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items. |
starting_after | string cursor for use in pagination. starting_after is an object ID
that defines your place in the list. For instance, if you make
a list request and receive 100 objects, end the result contains
|
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card"
}
]
Get all details about a customer card
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
customer_id required | string <= 255 characters The customer id you have defined for the customer. (must not have trailing or leading spaces) |
card_id required | string <= 255 characters The card id you have defined for the card. (must not have trailing or leading spaces) |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "active_from": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "card_id": "string",
- "customer_id": "string",
- "name": "string",
- "type": "gift_card",
- "tokens": [
- {
- "expires_at": "2019-08-24T14:15:22Z",
- "masked_code": "DINCARD:********-****-****-91**-*******22e5f"
}
], - "amount_balance": 50000,
- "amount_available": 50000,
- "currency": "NOK"
}
Retrieve a list of Card's Transaction based on card id
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
card_id required | string <= 255 characters The card id you have defined for the card. (must not have trailing or leading spaces) |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000,
- "currency": "NOK",
- "type": "drawdown",
- "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef"
}
]
Create a transaction against a Card using token
or card_id
.
If the Transactions is created as pending, the value will
be locked until it is either captured or voided. Transaction ID must
be used when capturing or voiding a transaction.
Using
card_id
or creating afund
transaction requires authorization scopeadmin:wallets
orwrite:wallets
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
transaction details
ref_id required | string Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique. |
amount required | integer >= 0 Monetary amount in smallest unit for the currency |
currency required | string Enum: "NOK" "SEK" "DKK" "EUR" "USD" The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217 |
token | string required if |
card_id | string required if |
metadata | object A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved |
type | string Default: "drawdown" Enum: "drawdown" "fund" |
pending | boolean Default: false If true, the transaction will be created as pending, i.e. the value will be locked until it is either captured or voided.
|
{- "token": "string",
- "card_id": "string",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000,
- "currency": "NOK",
- "type": "drawdown",
- "pending": false
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000,
- "currency": "NOK",
- "type": "drawdown",
- "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef"
}
Capture a pending Transaction, thereby collection the amount withheld by the pending transaction.
Option to specify an amount that should be captured. Defaults to capture the full transaction. When the amount specified is less than the reserved/pending, the remaining amount will still be reserved/pending and can be captured later.
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
transaction_id required | string <uuid> An id that uniqely idetifies a transaction |
capture details
ref_id required | string Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique. |
metadata | object A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved |
amount | integer >= 0 Monetary amount in smallest unit for the currency |
{- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000,
- "currency": "NOK",
- "type": "drawdown",
- "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef"
}
Void a pending Transaction by unlocking the amount withheld by the pending transaction
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
transaction_id required | string <uuid> An id that uniqely idetifies a transaction |
void details
ref_id required | string Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique. |
metadata | object A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved |
{- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "metadata": {
- "order_id": "xk39592f"
}, - "ref_id": "string",
- "amount": 50000,
- "currency": "NOK",
- "type": "drawdown",
- "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef"
}