Get Started

Overview
The API documentation is intended for developers and technical teams to seamlessly integrate Miden’s financial infrastructure solutions into their applications and business processes. It provides the resources required to implement and manage products such as Cards, Business Accounts, Payment Gateway, Wallet as a Service (WaaS), Collections, Transfers, and webhook-driven financial workflows.
Card Issuance:
Our API allows businesses to issue virtual credit cards to their employees, vendors, or retail customers. It allows businesses to streamline the process of issuing cards, manage spending, and track transactions. The API documentation provides information on how to integrate our virtual card issuing system into a business's existing systems and outlines the features and functionalities of the API, including card creation, management, and reporting. It also provides technical specifications, such as API requests, responses, and authentication processes.
Business Accounts
Our Business Accounts API enables businesses to create and manage financial accounts programmatically. It provides access to features such as account management, transfers, collections, payouts, transaction monitoring, and webhook notifications. The API documentation outlines the available endpoints, authentication methods, request and response formats, and integration workflows required to operate business accounts securely and efficiently.
Accruals & Disbursements
Our Payment Gateway API allows businesses to accept and manage payments across multiple payment channels, including cards and virtual accounts. It supports payment collections, invoice management, transaction verification, and real-time webhook notifications. The API documentation provides integration guidelines, endpoint specifications, authentication requirements, and transaction processing workflows.
Wallet as a Service (WaaS)
Our Wallet as a Service (WaaS) API enables businesses to build and manage digital wallet solutions for their users. It supports wallet creation, balance management, transfers, deposits, withdrawals, and real-time transaction monitoring. The API documentation includes details on authentication, API endpoints, request and response structures, and wallet transaction workflows.
Authentication/Authorization:
To access any of the resources on the BaseUrl/api/v1/, the client has to pass pre-defined headers for authentication and authorization.
See Authentication process below: a. Reference b. Signature c. UniqueKey d. MidenAuthorization e. Authorization
The API is secure and only authorized clients can consume the service. There is a clientId, clientSecret and uniqueKey assigned to every client for authentication and authorization. See below required headers how to derive headers.
How to derive Headers:
Part of every payload will be authentication and authorization headers and they are:
a. Reference:
The reference is a maximum 30-character string generated by the client and has to be unique for every request. e.g. 1232222Ehsj12345663
b. Signature:
The signature is a more complex computation used for authentication. It is a combination of the Http verb, encoded url, client generated reference, client id, and client secrete. All will be hashed and encoded with base 64.
See example below:
$encodeUrl = urlencode($url); $baseStringToBeSigned = $method . "&" . $encodeUrl . "&" . $reference. "&". $clientId . "&" . $secret; $sign = Base64Encode(SHA1($baseStringToBeSigned));
For more details on how to generate signature, see here.
c. UniqueKey:
This is generated and shared as part of the client on-boarding process.
d. MidenAuthorization:
This is a combination of miden auth and base64 encoded client Id. E.g. MidenAuthorization = "MidenAuth " . Base64Encode ($clientId);
note: "MidenAuth " is a fixed string that needs to be concatenated with the Base64-encoded value of _clientId_
e. Authorization:
Authorization is the bearer token gotten from get token endpoint. This is required for all transactions. $token = token from identity get token login (get token url => https://sandbox-identityserver.midencards.io/connect/token)
Sample curl request:
curl --location --request POST 'https://sandbox-identityserver.midencards.io/connect/token
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Basic REVGQVVMVE9SR0FOSVpBVElPTkFCRDc4OTNBMTYzMDRDRTVBNEM4RDQ2MjhDQzAwQkZCOjR6TC0hX2dLcTA1Q2VIdU8hTG4yTTk3QG4kcEAhQQ=='
--data-urlencode 'grant_type=client_credentials'
--data-urlencode 'scope=CardAPIs'
BaseUrl :
https://sandbox-api.midencards.io/miden
Snippet for Generating Signature in PHP
StartFragment
function nonce()
{
return substr(str_shuffle(MD5(microtime())), 0, 20);
}
function Base64Encode($value): string
{
return base64_encode($value);
}
function Base64Decode($value): bool|string
{
return base64_decode($value);
}
function SHA256($signaturecipher): bool|string
{
return hash("sha256",$signaturecipher);
}
function SHA1Here($signatureCipher): string
{
return sha1($signatureCipher, false);
}
EndFragment
$url = "full url of the request";
$encodeUrl = urlencode($url);
$reference = nonce();
$clientId = "client Id generated during application creation";
$clientSecret = "generated during application creation";
$method = "Http method of the request";
$baseStringToBeSigned = $method . "&" . $encodeUrl . "&" . $reference. "&". $clientId . "&" . $clientSecret;
$signature = Base64Encode(SHA1Here($baseStringToBeSigned));
On this page
- Get Started