Api Documentation

Introduction

This section describes the Dinari Cash API Documentation payment gateway API.


Dinari Cash API Documentation API is easy to implement in your business software. Our API is well formatted URLs, accepts cURL requests, returns JSON responses.

You can use the API in test mode, which does not affect your live data. The API key is use to authenticate the request and determines the request is valid payment or not. For test mode just use the sandbox URL and In case of live mode use the live URL from section Initiate Payment .

Get The Api Key

This section describes how you can get your API key.


The next step is to find the API Key menu in your dashboard sidebar. Click the menu.

The API keys consist of Public Key and Secret Key. Use these keys to initiate the API request. You can generate a new API key anytime by clicking the Generate API Key button. Remember, do not share these keys with anyone.

Introduction to ACH

This section describes the Dinari Cash API Documentation payment gateway API.

Send Money

This section describes the process of sending money via the API endpoint.


To send money, follow the example code and ensure you handle the parameters correctly. You will need to make a request using the following API endpoints.

Request to the end point with the following parameters below.

Param Name Required Param Type Example Description
PUBLIC_KEY Required 16 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
API_SECRET Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Gateway API KEY
SEND_METHOD Required ACH ACH Must be set to "ACH"
SEND_CURRENCY_ISO3 Required USD USD Must be set to "USD", for ACH
SEND_AMOUNT Required Numeric Decimal 300 Amount of money to send to recipient.
RECIPIENT_FULL_NAME Required 1 - 100 Characters Sage Smith Full Name of Recipient
RECIPIENT_BANK_ACCOUNT Required 1 - 100 Characters 1234567890 Personal Bank Account Number
RECIPIENT_BANK_ROUTING Required 9 Digits 123456789 Bank Routing (ABA) Number
PUBLIC_TRANSACTION_DESCRIPTION Optional 1 - 200 Characters Payment for Invoice #11234 Public Description of Transaction
CORPORATE_ADMINISTRATIVE_MESSAGE Optional 1 - 250 Characters "Follow-up with service upgrade." An administrative note set by the corporate account, for exclusively viewing by the corporate account managers.
Example PHP code
<?php
    $parameters = [
        'PUBLIC_KEY' => 'your_public_key',  // Required
        'API_SECRET' => 'your_api_secret',  // Required
        'SEND_METHOD' => 'ACH',  // Required
        'SEND_CURRENCY_ISO3' => 'USD',  // Required
        'SEND_AMOUNT' => 100.00,  // Required
        'RECIPIENT_FULL_NAME' => 'John Doe',  // Required
        'RECIPIENT_BANK_ACCOUNT' => '1234567890',  // Required
        'RECIPIENT_BANK_ROUTING' => '987654321',  // Required
        'PUBLIC_TRANSACTION_DESCRIPTION' => 'Payment for T-shirt purchase',  // Optional
        'CORPORATE_ADMINISTRATIVE_MESSAGE' => 'Payment for order #12345'  // Optional
    
    ];

    // live end point
    $url = "https://sandbox.dinaricash.com";

    // test end point
    $url = "https://production.dinaricash.com";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS,  $parameters);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    curl_close($ch);

    //$result contains the response back.
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction failed due to insufficient balance.",
  "error_code": 402,
  "details": {
    "TRANSACTION_ID": "TX987654321",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T12:50:00Z",
    "TRANSACTION_STATUS": "Failed",
    "GATEWAY_MESSAGE": "Insufficient balance in account",
    "CORPORATE_ACCOUNT_ID": "CA123456789"
  }
}


//Success Response.
{
  "status": "success",
  "message": "Transaction processed successfully.",
  "data": {
    "TRANSACTION_ID": "TX123456789",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T12:34:56Z",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 250.75,
    "TRANSACTION_STATUS": "Completed",
    "GATEWAY_MESSAGE": "Transaction processed successfully",
    "TANSACTION_SEND_METHOD": "Bank Transfer",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 2.5,
    "SEND_FEE_PERCENTAGE_AMOUNT": 6.27,
    "SEND_FEE_TOTAL_AMOUNT": 11.27,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 5000.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 4744.48,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 10000.00,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 9744.48,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 2000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1990.00,
    "CORPORATE_ACCOUNT_ID": "CA987654321"
  }
}

Real-Time Transaction Status Updates via Webhook URL

This section describes the process of receiving real-time transaction updates through a Webhook URL.


To receive transaction updates, use the provided Webhook URL and ensure that the necessary parameters are handled correctly. The status updates will be sent to your Webhook URL with the following details.

Request to the end point with the following parameters below.

Param Name Param Type Example Value Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
CORPORATE_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate ACCOUNT ID associated with the status update.
TRANSACTION_ID 1 - 100 Characters 255c25d543faa2f21f142e050199857e TRANSACTION ID associated with the status update.
TRANSACTION_STATUS 1 - 50 Characters The STATUS value will be one of these:
  • INITIATED
  • DECLINED
  • CANCELED
  • FAILED
  • COMPLETED
  • INITIATED = funds have been sent.
  • DECLINED = transaction was declined.
  • CANCELED = transaction was canceled.
  • FAILED = direct deposit failed.
  • COMPLETED = direct deposit complete.
TRANSACTION_DATETIME_UPDATED YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of update.
Example PHP code
<?php
    $parameters = [
        'PUBLIC_KEY' => 'your_public_key',  // Required
        'API_SECRET' => 'your_api_secret',  // Required
        'SEND_METHOD' => 'ACH',  // Required
        'SEND_CURRENCY_ISO3' => 'USD',  // Required
        'SEND_AMOUNT' => 100.00,  // Required
        'RECIPIENT_FULL_NAME' => 'John Doe',  // Required
        'RECIPIENT_BANK_ACCOUNT' => '1234567890',  // Required
        'RECIPIENT_BANK_ROUTING' => '987654321',  // Required
        'PUBLIC_TRANSACTION_DESCRIPTION' => 'Payment for T-shirt purchase',  // Optional
        'CORPORATE_ADMINISTRATIVE_MESSAGE' => 'Payment for order #12345'  // Optional
    
    ];

    // live end point
    $url = "https://sandbox.dinaricash.com";

    // test end point
    $url = "https://production.dinaricash.com";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS,  $parameters);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    curl_close($ch);

    //$result contains the response back.
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction failed due to insufficient balance.",
  "error_code": 402,
  "details": {
    "TRANSACTION_ID": "TX987654321",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T12:50:00Z",
    "TRANSACTION_STATUS": "Failed",
    "GATEWAY_MESSAGE": "Insufficient balance in account",
    "CORPORATE_ACCOUNT_ID": "CA123456789"
  }
}


//Success Response.
{
  "status": "success",
  "message": "Transaction processed successfully.",
  "data": {
    "TRANSACTION_ID": "TX123456789",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T12:34:56Z",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 250.75,
    "TRANSACTION_STATUS": "Completed",
    "GATEWAY_MESSAGE": "Transaction processed successfully",
    "TANSACTION_SEND_METHOD": "Bank Transfer",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 2.5,
    "SEND_FEE_PERCENTAGE_AMOUNT": 6.27,
    "SEND_FEE_TOTAL_AMOUNT": 11.27,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 5000.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 4744.48,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 10000.00,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 9744.48,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 2000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1990.00,
    "CORPORATE_ACCOUNT_ID": "CA987654321"
  }
}

Introduction to Virtual Card

This section describes the Dinari Cash API Documentation payment gateway API.

Send Money

This section describes the process of sending money via the API endpoint.


To send money, follow the example code and ensure you handle the parameters correctly. You will need to make a request using the following API endpoints.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Corporate GATEWAY API KEY
SEND_METHOD Required CARD_VIRTUAL CARD_VIRTUAL Must be set to "CARD_VIRTUAL"
SEND_CURRENCY_ISO3 Required USD USD Must be set to "USD"
SEND_AMOUNT Required Numeric Decimal 300 Amount of money to send to recipient.
RECIPIENT_FULL_NAME Required 1 - 100 Characters Sage Smith Full Name of Recipient
RECIPIENT_EMAILADDRESS Required 1 - 100 Characters ssmith@example.com Unique email-address-formatted ID per recipient (card holder). ALERT: Must be a valid email address when cardholders are managed.
RECIPIENT_ACCOUNT_ID Optional 32 Characters 945270b8c9123a3cd5198f68459c3630 Use RECIPIENT_ACCOUNT_ID when available. (Will not be available for first-time recipients.)
PUBLIC_TRANSACTION_DESCRIPTION Optional 1 - 200 Characters Payment for Invoice #11234 Public description of transaction.
CORPORATE_ADMINISTRATIVE_MESSAGE Optional 1 - 250 Characters "Follow-up with service upgrade." An administrative note set by the corporate account, for exclusively viewing by the corporate account managers.
Example PHP code
<?php
    
    $parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618',  // Required
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',  // Required
    'SEND_METHOD' => 'CARD_VIRTUAL',  // Required
    'SEND_CURRENCY_ISO3' => 'USD',  // Required
    'SEND_AMOUNT' => 300.00,  // Required
    'RECIPIENT_FULL_NAME' => 'Sage Smith',  // Required
    'RECIPIENT_EMAILADDRESS' => 'ssmith@example.com',  // Required
    'RECIPIENT_ACCOUNT_ID' => '945270b8c9123a3cd5198f68459c3630',  // Optional
    'PUBLIC_TRANSACTION_DESCRIPTION' => 'Payment for Invoice #11234',  // Optional
    'CORPORATE_ADMINISTRATIVE_MESSAGE' => 'Follow-up with service upgrade.'  // Optional
];

// Sandbox endpoint
//$url = "https://sandbox.dinaricash.com/send-transaction";

// Live endpoint
$url = "https://production.dinaricash.com/send-transaction";



$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);

curl_close($ch);

      //$result contains the response back.
  
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction failed due to insufficient balance.",
  "error_code": 402,
  "details": {
    "TRANSACTION_ID": "TX987654321",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T16:00:00Z",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 300.00,
    "TRANSACTION_STATUS": "Failed",
    "GATEWAY_MESSAGE": "Insufficient balance.",
    "TANSACTION_SEND_METHOD": "CARD_VIRTUAL",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 2.5,
    "SEND_FEE_PERCENTAGE_AMOUNT": 7.50,
    "SEND_FEE_TOTAL_AMOUNT": 12.50,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 100.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 100.00,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 500.00,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 500.00,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 1000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1000.00,
    "RECIPIENT_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARD_ACCOUNT_ID": "CA9876543210",
    "RECIPIENT_CARD_NUMBER": "411111******1111",
    "RECIPIENT_CARD_CVV": "***",
    "RECIPIENT_CARD_EXPIRATION_DATE": "12/26",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}



//Success Response.
{
  "status": "success",
  "message": "Transaction completed successfully.",
  "data": {
    "TRANSACTION_ID": "TX123456789",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08T15:30:00Z",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 300.00,
    "TRANSACTION_STATUS": "Completed",
    "GATEWAY_MESSAGE": "Transaction processed successfully.",
    "TANSACTION_SEND_METHOD": "CARD_VIRTUAL",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 2.5,
    "SEND_FEE_PERCENTAGE_AMOUNT": 7.50,
    "SEND_FEE_TOTAL_AMOUNT": 12.50,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 1000.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 687.50,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 5000.00,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 4687.50,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 2000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1995.00,
    "RECIPIENT_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARD_ACCOUNT_ID": "CA1234567890",
    "RECIPIENT_CARD_NUMBER": "411111******1111",
    "RECIPIENT_CARD_CVV": "***",
    "RECIPIENT_CARD_EXPIRATION_DATE": "12/26",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


Manage Cards

This section describes the process of managing cards via the API endpoint.


To manage cards, follow the example code and ensure you handle the parameters correctly. You will need to make a request using the following API endpoints.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Corporate GATEWAY API KEY
CARD_ACCOUNT_ID Optional 32 Characters 945270b8c9123a3cd5198f68459c3630 Card Account ID, received in response to send_money.api
SERVICE_ACTION Required 50 Characters (max) GET_CARD_DETAILS Set SERVICE_ACTION to "GET_CARD_LIST" to retrieve a CARD_LIST (array) of CARD_ACCOUNT_ID's.
Set SERVICE_ACTION to "GET_CARD_DETAILS" to retrieve card details (card balance, list of transactions, etc.) from the designated CARD_ACCOUNT_ID.
Set SERVICE_ACTION to "PAUSE_CARD" to temporarily block this card purchase authorizations.
Set SERVICE_ACTION to "UNPAUSE_CARD" to allow this card purchase authorizations.
Set SERVICE_ACTION to "CANCEL_CARD" to cancel the card (The card-holder will no longer have access to the card, and the balance will revert to the corporate payout account).
Example PHP code
<?php
    
    // Define the parameters based on your specification
$parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618',  // Required (32 Characters)
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',  // Required (32 Characters)
    'CARD_ACCOUNT_ID' => '945270b8c9123a3cd5198f68459c3630',  // Optional (32 Characters)
    'SERVICE_ACTION' => 'GET_CARD_LIST',  // Required (50 Characters max)
];

// You can switch SERVICE_ACTION based on the action you want to perform:
//
// For retrieving card list
// $parameters['SERVICE_ACTION'] = 'GET_CARD_LIST';  // To retrieve the card list (array of CARD_ACCOUNT_ID's)
//
// For retrieving card details
// $parameters['SERVICE_ACTION'] = 'GET_CARD_DETAILS';  // To retrieve card details (balance, transactions)
//
// To pause the card (block purchases)
// $parameters['SERVICE_ACTION'] = 'PAUSE_CARD';  // To temporarily block card purchase authorizations
//
// To unpause the card (allow purchases again)
// $parameters['SERVICE_ACTION'] = 'UNPAUSE_CARD';  // To allow purchases again
//
// To cancel the card (disabling access)
// $parameters['SERVICE_ACTION'] = 'CANCEL_CARD';  // To cancel the card, revert any balance


    // live end point
    $url = "https://sandbox.dinaricash.com/manage-cards";

    // test end point
    $url = "https://production.dinaricash.com/manage-cards";
    
    
    // Initialize cURL session
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  // Disable SSL host verification (development only)
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  // Disable SSL peer verification (development only)
curl_setopt($ch, CURLOPT_URL, $url);  // Set the target URL for the request
curl_setopt($ch, CURLOPT_POST, true);  // Set request method to POST
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));  // Attach parameters to the request
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  // Receive the response as a string

// Execute the cURL request and get the response
$result = curl_exec($ch);

// Close the cURL session
curl_close($ch);

   
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction failed due to missing Corporate Account ID.",
  "error_code": 400,
  "details": {
    "TRANSACTION_ID": "99e5f27a314fd4776c56a1733aa6cfae",
    "TRANSACTION_DATETIME_CREATED": "2023-03-06T18:04:00Z",
    "TRANSACTION_STATUS": "Failed",
    "GATEWAY_MESSAGE": "Missing CORPORATE_ACCOUNT_ID",
    "GATEWAY_ERROR": "Missing CORPORATE_ACCOUNT_ID",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


//Success Response.
{
  "status": "success",
  "message": "Transaction processed successfully.",
  "data": {
    "GATEWAY_DATETIME": "2023-03-06 18:04:00",
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARD_DATETIME_CREATED": "2023-03-06 18:04:00",
    "CARD_CURRENCY_ISO3": "USD",
    "CARD_BALANCE": 300.00,
    "CARD_STATUS": "ACTIVE",
    "LIST_CARDS": [
      "99e5f27a314fd4776c56a1733aa6cfae",
      "99e5f27a314fd4776c56a1733aa6cfae"
    ],
    "LIST_TANSACTIONS": [
      {
        "TRANSACTION_ID": "99e5f27a314fd4776c56a1733aa6cfae",
        "AMOUNT": 12.79,
        "TRANSACTION_STATUS": "Completed",
        "TRANSACTION_DATETIME_CREATED": "2023-03-06 18:04:00"
      }
    ],
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


Webhook Updates - Card Loads

This section describes the process of receiving real-time card load updates through a Webhook URL.


To receive card load updates, use the provided Webhook URL and ensure that the necessary parameters are handled correctly. The status updates will be sent to your Webhook URL with the following details.

Request to the end point with the following parameters below.

Parameter Format Example Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
WEBHOOK_ACTION 1 - 100 Characters CARD LOAD UPDATE Used to describe the update.
CORPORATE_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 CLIENT ACCOUNT ID associated with the status update.
TRANSACTION_ID 1 - 100 Characters 255c25d543faa2f21f142e050199857e TRANSACTION ID associated with the status update.
CARD_ACCOUNT_ID 1 - 100 Characters 945270b8c9123a3cd5198f68459c3630 Unique ID associated with the card account, when available.
TRANSACTION_STATUS 1 - 50 Characters INITIATED = funds have been sent.
DECLINED = transaction was declined.
CANCELED = transaction was canceled.
FAILED = direct deposit failed.
COMPLETED = direct deposit complete.
The STATUS value will be one of these:
• INITIATED
• DECLINED
• CANCELED
• FAILED
• COMPLETED
TRANSACTION_DATETIME_UPDATED YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of card load transaction update.
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Webhook update failed due to invalid input.",
  "error_code": 400,
  "details": {
    "WEBHOOK_KEY": "d4238f59beea578ab494a6f5126cf853",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
    "error_message": "Missing required fields or invalid data"
  }
}


//Success Response.
{
  "status": "success",
  "message": "Webhook update processed successfully.",
  "data": {
    "WEBHOOK_KEY": "d4238f59beea578ab494a6f5126cf853",
    "WEBHOOK_ACTION": "CARD LOAD UPDATE",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "TRANSACTION_STATUS": "INITIATED",
    "TRANSACTION_DATETIME_UPDATED": "2023-05-08 10:55:01"
  }
}


Webhook Updates - Card Purchases

This section describes the process of receiving real-time card purchase updates through a Webhook URL.


To receive card purchase updates, use the provided Webhook URL and ensure that the necessary parameters are handled correctly. The status updates will be sent to your Webhook URL with the following details.

Request to the end point with the following parameters below.

Parameter Format Example Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
WEBHOOK_ACTION 1 - 100 Characters CARD PURCHASE UPDATE Used to describe the update.
PURCHASE_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 Unique ID associated with the card purchase.
PURCHASE_CURRENCY_ISO3 3 Characters USD Currency (ISO3) of purchase.
PURCHASE_AMOUNT Number w/ Decimals 10.00 Total value of the purchase.
PURCHASE_DESCRIPTION 1 - 100 Characters AMAZON.COM AMZN.COM/BI SEATTLE WAUS Description associated with card purchase.
PURCHASE_CATEGORY_CODE 1 - 10 Characters 5942 Purchase Category Code.
PURCHASE_STATUS 1 - 100 Characters AUTORIZED "AUTHORIZED" or "REJECTED: {REASON}"
PREPURCHASE_BALANCE Number w/ Decimals 100.01 Card balance before purchase.
POSTPURCHASE_BALANCE Number w/ Decimals 99.01 Card balance after purchase.
CARD_ACCOUNT_ID 1 - 100 Characters 945270b8c9123a3cd5198f68459c3630 Unique ID associated with the card account.
CARDHOLDER_EMAILADDRESS 1 - 100 Characters user.123@example.com Unique email address associated with the card account.
CORPORATE_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 Unique ID associated with the card’s managing corporate account.
DATETIME_UPDATE YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of purchase request.
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Card purchase update failed.",
  "error_code": 400,
  "details": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "WEBHOOK_ACTION": "CARD PURCHASE UPDATE",
    "PURCHASE_ID": "8d1838fbb7fea3206326d0d96f162618",
    "PURCHASE_STATUS": "REJECTED: Insufficient funds",
    "PREPURCHASE_BALANCE": 100.01,
    "POSTPURCHASE_BALANCE": 99.01,
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARDHOLDER_EMAILADDRESS": "user.123@example.com",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "DATETIME_UPDATE": "2023-05-08 10:55:01",
    "GATEWAY_MESSAGE": "Insufficient funds to complete the purchase."
  }
}



//Success Response.
{
  "status": "success",
  "message": "Card purchase update processed successfully.",
  "data": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "WEBHOOK_ACTION": "CARD PURCHASE UPDATE",
    "PURCHASE_ID": "8d1838fbb7fea3206326d0d96f162618",
    "PURCHASE_CURRENCY_ISO3": "USD",
    "PURCHASE_AMOUNT": 10.00,
    "PURCHASE_DESCRIPTION": "AMAZON.COM AMZN.COM/BI SEATTLE WAUS",
    "PURCHASE_CATEGORY_CODE": "5942",
    "PURCHASE_STATUS": "AUTHORIZED",
    "PREPURCHASE_BALANCE": 100.01,
    "POSTPURCHASE_BALANCE": 99.01,
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARDHOLDER_EMAILADDRESS": "user.123@example.com",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "DATETIME_UPDATE": "2023-05-08 10:55:01"
  }
}


Webhook Updates - Card Status

This section describes the process of receiving real-time updates on card statuses through a Webhook URL.


To receive card status updates, use the provided Webhook URL and ensure that the necessary parameters are handled correctly. The status updates will be sent to your Webhook URL with the following details.

Request to the end point with the following parameters below.

Parameter Format Example Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
WEBHOOK_ACTION 1 - 100 Characters CARD STATUS UPDATE Used to describe the update.
CORPORATE_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 Unique ID associated with the card’s managing corporate account.
CARD_ACCOUNT_ID 1 - 100 Characters 945270b8c9123a3cd5198f68459c3630 Unique ID associated with the card account.
CARD_ACCOUNT_STATUS 1 - 100 Characters ACTIVE Possible Card Status Values:
ACTIVE: When the CARD_ACCOUNT_STATUS is set to "ACTIVE", card purchases are allowed.
PAUSED: When the CARD_ACCOUNT_STATUS is set to "PAUSED", card purchases are temporarily blocked (until "unpaused").
CANCELED: When the CARD_ACCOUNT_STATUS is set to "CANCELED", the card has been permanently deactivated and closed.
DATETIME_UPDATE YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of card status update.
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Card status update failed.",
  "error_code": 400,
  "details": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "WEBHOOK_ACTION": "CARD STATUS UPDATE",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARD_ACCOUNT_STATUS": "PAUSED",
    "DATETIME_UPDATE": "2023-05-08 10:55:01",
    "GATEWAY_MESSAGE": "Card status update failed due to system error."
  }
}



//Success Response.
{
  "status": "success",
  "message": "Card status updated successfully.",
  "data": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "WEBHOOK_ACTION": "CARD STATUS UPDATE",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "CARD_ACCOUNT_ID": "945270b8c9123a3cd5198f68459c3630",
    "CARD_ACCOUNT_STATUS": "ACTIVE",
    "DATETIME_UPDATE": "2023-05-08 10:55:01"
  }
}


Introduction to Swift

This section provides an overview of Dinari Cash API Documentation Swift payment gateway API and its functionalities.

Send Money

This section describes the process of sending money via the API endpoint.


To send money, follow the example code and ensure you handle the parameters correctly. You will need to make a request using the following API endpoints.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Gateway API KEY
SEND_METHOD Required SWIFT SWIFT Must be set to "SWIFT"
SEND_CURRENCY_ISO3 Required USD USD Must be set to "USD", for SWIFT
SEND_AMOUNT Required Numeric Decimal 300 Amount of money to send to recipient.
RECIPIENT_FULL_NAME Required 1 - 100 Characters Sage Smith Full Name of Recipient
RECIPIENT_STREET_1 Required 1 - 200 Characters 123 Street Residential street address (1) of the recipient.
RECIPIENT_STREET_2 Optional 1 - 200 Characters Apt 700 Residential street address (2) of the recipient.
RECIPIENT_CITY Required 1 - 100 Characters Los Angeles Residential city/town of the recipient.
RECIPIENT_REGION Required 1 - 100 Characters California State/province/region of the recipient.
RECIPIENT_POSTAL_CODE Optional 1 - 100 Characters 98210 Residential postal code of the recipient.
RECIPIENT_COUNTRY_ISO3 Required 3 Characters USA Residential country (ISO3) of the recipient.
RECIPIENT_BANK_ACCOUNT Required 1 - 100 Characters 1234567890 Recipient’s Bank Account Number
RECIPIENT_BANK_ROUTING Required 8 - 11 Characters AAAABBCC123 Recipient’s Bank Routing (SWIFT) Number
RECIPIENT_BANK_NAME Required 1 - 100 Characters Citibank Name of recipient’s bank.
RECIPIENT_BANK_STREET_1 Required 1 - 200 Characters 123 Street Address Street address (1) Name of recipient’s bank.
RECIPIENT_BANK_STREET_2 Optional 1 - 200 Characters Suite 1 Street address (2) of the recipient’s bank.
RECIPIENT_BANK_CITY Required 1 - 100 Characters Los Angeles City/town of the recipient’s bank.
RECIPIENT_BANK_REGION Required 1 - 100 Characters California State/province/region of the recipient’s bank.
RECIPIENT_BANK_COUNTRY_ISO3 Required 3 Characters USA Country (ISO3) of the recipient’s bank.
PUBLIC_TRANSACTION_DESCRIPTION Optional 1 - 200 Characters Payment for Invoice #11234 Public Description of Transaction
CORPORATE_ADMINISTRATIVE_MESSAGE Optional 1 - 250 Characters "Follow-up with service upgrade." An administrative note set by the corporate account, for exclusively viewing by the corporate account managers.
Example PHP code
<?php
   
   $parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618',  // Required
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',  // Required
    'SEND_METHOD' => 'SWIFT',  // Required
    'SEND_CURRENCY_ISO3' => 'USD',  // Required for SWIFT
    'SEND_AMOUNT' => 300,  // Required
    'RECIPIENT_FULL_NAME' => 'Sage Smith',  // Required
    'RECIPIENT_STREET_1' => '123 Street',  // Required
    'RECIPIENT_STREET_2' => 'Apt 700',  // Optional
    'RECIPIENT_CITY' => 'Los Angeles',  // Required
    'RECIPIENT_REGION' => 'California',  // Required
    'RECIPIENT_POSTAL_CODE' => '98210',  // Optional
    'RECIPIENT_COUNTRY_ISO3' => 'USA',  // Required
    'RECIPIENT_BANK_ACCOUNT' => '1234567890',  // Required
    'RECIPIENT_BANK_ROUTING' => 'AAAABBCC123',  // Required
    'RECIPIENT_BANK_NAME' => 'Citibank',  // Required
    'RECIPIENT_BANK_STREET_1' => '123 Street Address',  // Required
    'RECIPIENT_BANK_STREET_2' => 'Suite 1',  // Optional
    'RECIPIENT_BANK_CITY' => 'Los Angeles',  // Required
    'RECIPIENT_BANK_REGION' => 'California',  // Required
    'RECIPIENT_BANK_COUNTRY_ISO3' => 'USA',  // Required
    'PUBLIC_TRANSACTION_DESCRIPTION' => 'Payment for Invoice #11234',  // Optional
    'CORPORATE_ADMINISTRATIVE_MESSAGE' => 'Follow-up with service upgrade.'  // Optional
];

// live endpoint
$url = "https://sandbox.dinaricash.com/swift-transfer";

// test endpoint
//$url = "https://production.dinaricash.com/swift-transfer";

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS,  $parameters);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

// $result contains the response back.

   
?>
Example Responses
//Error Response.
{
    "status": "error",
    "message": "Transaction failed due to insufficient funds or other error.",
    "data": {
        "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
        "TRANSACTION_DATETIME_CREATED": "2023-03-06 18:04:00",
        "TRANSACTION_CURRENCY_ISO3": "USD",
        "TRANSACTION_SEND_AMOUNT": 300,
        "TRANSACTION_STATUS": "FAILED",
        "GATEWAY_MESSAGE": "Transaction failed. Please try again later.",
        "TRANSACTION_SEND_METHOD": "SWIFT",
        "SEND_FEE_FIXED_AMOUNT": 5,
        "SEND_FEE_PERCENTAGE": 0.03,
        "SEND_FEE_PERCENTAGE_AMOUNT": 3,
        "SEND_FEE_TOTAL_AMOUNT": 8,
        "PAYOUT_BALANCE_BEFORE_TRANSACTION": 2300,
        "PAYOUT_BALANCE_AFTER_TRANSACTION": 1992,
        "FLOAT_BALANCE_BEFORE_TRANSACTION": 10123.5,
        "FLOAT_BALANCE_AFTER_TRANSACTION": 10122,
        "RESERVE_BALANCE_BEFORE_TRANSACTION": 1000000,
        "RESERVE_BALANCE_AFTER_TRANSACTION": 1000000,
        "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
    }
}



//Success Response.
{
    "status": "success",
    "message": "Transaction has been initiated successfully.",
    "data": {
        "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
        "TRANSACTION_DATETIME_CREATED": "2023-03-06 18:04:00",
        "TRANSACTION_CURRENCY_ISO3": "USD",
        "TRANSACTION_SEND_AMOUNT": 300,
        "TRANSACTION_STATUS": "INITIATED",
        "GATEWAY_MESSAGE": "Success! The transaction has been initiated.",
        "TRANSACTION_SEND_METHOD": "SWIFT",
        "SEND_FEE_FIXED_AMOUNT": 5,
        "SEND_FEE_PERCENTAGE": 0.03,
        "SEND_FEE_PERCENTAGE_AMOUNT": 3,
        "SEND_FEE_TOTAL_AMOUNT": 8,
        "PAYOUT_BALANCE_BEFORE_TRANSACTION": 2300,
        "PAYOUT_BALANCE_AFTER_TRANSACTION": 1992,
        "FLOAT_BALANCE_BEFORE_TRANSACTION": 10123.5,
        "FLOAT_BALANCE_AFTER_TRANSACTION": 10122,
        "RESERVE_BALANCE_BEFORE_TRANSACTION": 1000000,
        "RESERVE_BALANCE_AFTER_TRANSACTION": 1000000,
        "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
    }
}


Webhook Updates - Transaction Status

This section explains how to receive real-time updates on transaction statuses using a Webhook URL.


To monitor transaction statuses, configure the provided Webhook URL and handle the required parameters correctly. Real-time status updates will be sent to your Webhook URL with the relevant details.

Request to the end point with the following parameters below.

Parameter Format Example Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
WEBHOOK_ACTION 1 - 100 Characters TRANSACTION STATUS UPDATE Used to describe the update.
CORPORATE_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate ACCOUNT ID associated with the status update.
TRANSACTION_ID 1 - 100 Characters 255c25d543faa2f21f142e050199857e TRANSACTION ID associated with the status update.
TRANSACTION_STATUS 1 - 50 Characters "INITIATED, DECLINED, CANCELED, FAILED, COMPLETED" The STATUS value will be one of these:
  • INITIATED = funds have been sent.
  • DECLINED = transaction was declined.
  • CANCELED = transaction was canceled.
  • FAILED = direct deposit failed.
  • COMPLETED = direct deposit complete.
TRANSACTION_DATETIME_UPDATED YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of the update.
Example Responses
//Error Response.
{
    "status": "error",
    "message": "Failed to update transaction status. Please check the webhook key or other data.",
    "data": {
        "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
        "WEBHOOK_ACTION": "TRANSACTION STATUS UPDATE",
        "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
        "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
        "TRANSACTION_STATUS": "FAILED",
        "TRANSACTION_DATETIME_UPDATED": "2023-05-08 10:55:01"
    }
}



//Success Response.
{
    "status": "success",
    "message": "Transaction status updated successfully.",
    "data": {
        "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
        "WEBHOOK_ACTION": "TRANSACTION STATUS UPDATE",
        "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
        "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
        "TRANSACTION_STATUS": "INITIATED",
        "TRANSACTION_DATETIME_UPDATED": "2023-05-08 10:55:01"
    }
}


Introduction to ZELLE

This section describes the Dinari Cash API Documentation payment gateway API.

Send Money

This section describes the process of sending money via the API endpoint.


To send money, follow the example code and ensure you handle the parameters correctly. You will need to make a request using the following API endpoints.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Corporate GATEWAY API KEY
SEND_METHOD Required ZELLE ZELLE Must be set to "ZELLE"
SEND_CURRENCY_ISO3 Required USD USD Must be set to "USD"
SEND_AMOUNT Required Numeric Decimal 300 Amount of money to send to recipient.
RECIPIENT_ZELLE_ADDRESS Required 1 - 100 Characters ssmith@example.com The email address (or 10-digit US phone number: 9175551212) associated with recipient's ZELLE account.
PUBLIC_TRANSACTION_DESCRIPTION Optional 1 - 200 Characters Payment for Invoice #11234 Public description of transaction.
CORPORATE_ADMINISTRATIVE_MESSAGE Optional 1 - 250 Characters "Follow-up with service upgrade." An administrative note set by the corporate account, for exclusively viewing by the corporate account managers.
Example PHP code
<?php
    $parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618',  // Required
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',  // Required
    'SEND_METHOD' => 'ZELLE',  // Required
    'SEND_CURRENCY_ISO3' => 'USD',  // Required
    'SEND_AMOUNT' => 300.00,  // Required
    'RECIPIENT_ZELLE_ADDRESS' => 'ssmith@example.com',  // Required
    'PUBLIC_TRANSACTION_DESCRIPTION' => 'Payment for Invoice #11234',  // Optional
    'CORPORATE_ADMINISTRATIVE_MESSAGE' => 'Follow-up with service upgrade.'  // Optional
];

// live endpoint
$url = "https://sandbox.dinaricash.com/send-money";

// test endpoint
// $url = "https://production.dinaricash.com/send-money";

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));  // Use http_build_query to encode the parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
    //$result contains the response back.
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction failed",
  "error_code": "TRANSACTION_FAILED",
  "data": {
    "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
    "TRANSACTION_DATETIME_CREATED": "2023-03-06 18:04:00",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 300.00,
    "TRANSACTION_STATUS": "FAILED",
    "GATEWAY_MESSAGE": "Transaction failed due to insufficient funds.",
    "TRANSACTION_SEND_METHOD": "ZELLE",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 0.03,
    "SEND_FEE_PERCENTAGE_AMOUNT": 3.00,
    "SEND_FEE_TOTAL_AMOUNT": 8.00,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 2300.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 2300.00,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 10123.50,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 10123.50,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 1000000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1000000.00,
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}



//Success Response.
{
  "status": "success",
  "message": "Transaction initiated successfully",
  "data": {
    "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
    "TRANSACTION_DATETIME_CREATED": "2023-03-06 18:04:00",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "TRANSACTION_SEND_AMOUNT": 300.00,
    "TRANSACTION_STATUS": "INITIATED",
    "GATEWAY_MESSAGE": "Success! The transaction has been initiated.",
    "TRANSACTION_SEND_METHOD": "ZELLE",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 0.03,
    "SEND_FEE_PERCENTAGE_AMOUNT": 3.00,
    "SEND_FEE_TOTAL_AMOUNT": 8.00,
    "PAYOUT_BALANCE_BEFORE_TRANSACTION": 2300.00,
    "PAYOUT_BALANCE_AFTER_TRANSACTION": 1992.00,
    "FLOAT_BALANCE_BEFORE_TRANSACTION": 10123.50,
    "FLOAT_BALANCE_AFTER_TRANSACTION": 10122.00,
    "RESERVE_BALANCE_BEFORE_TRANSACTION": 1000000.00,
    "RESERVE_BALANCE_AFTER_TRANSACTION": 1000000.00,
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


Webhook Updates - Transaction Status

This section explains how to receive real-time updates on transaction statuses via a Webhook URL.


To receive real-time transaction updates, configure the provided Webhook URL and ensure the correct handling of the necessary parameters. The status updates will be sent to your Webhook URL with the details provided below.

Request to the end point with the following parameters below.

Parameter Format Example Description
WEBHOOK_KEY 1 - 100 Characters d4238d59beea578ab494a6f5126cf853 Use the WEBHOOK_KEY to verify updates are authentic.
CLIENT_ACCOUNT_ID 1 - 100 Characters 8d1838fbb7fea3206326d0d96f162618 CLIENT ACCOUNT ID associated with the status update.
TRANSACTION_ID 1 - 100 Characters 255c25d543faa2f21f142e050199857e TRANSACTION ID associated with the status update.
TRANSACTION_STATUS 1 - 50 Characters
  • INITIATED
  • DECLINED
  • CANCELED
  • FAILED
  • COMPLETED
INITIATED: Funds have been sent.
DECLINED: Transaction was declined.
CANCELED: Transaction was canceled.
FAILED: Direct deposit failed.
COMPLETED: Direct deposit complete.
TRANSACTION_DATETIME_UPDATE YYYY-MM-DD HH:MM:SS 2023-05-08 10:55:01 Date-time of update.
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Failed to update transaction status",
  "error_code": "TRANSACTION_UPDATE_FAILED",
  "data": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "CLIENT_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
    "TRANSACTION_STATUS": "DECLINED",
    "TRANSACTION_DATETIME_UPDATE": "2023-05-08 10:55:01"
  }
}



//Success Response.
{
  "status": "success",
  "message": "Transaction status update successful",
  "data": {
    "WEBHOOK_KEY": "d4238d59beea578ab494a6f5126cf853",
    "CLIENT_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "TRANSACTION_ID": "255c25d543faa2f21f142e050199857e",
    "TRANSACTION_STATUS": "COMPLETED",
    "TRANSACTION_DATETIME_UPDATE": "2023-05-08 10:55:01"
  }
}


Introduction to Transactions

This section describes the Dinari Cash API Documentation payment gateway API.

List Transactions

This section explains how to list transactions using the provided API endpoints.


To retrieve a list of transactions, use the appropriate API endpoint and ensure the correct handling of the necessary parameters. The transaction details will be returned as a response with the information provided below.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Gateway API KEY
CUSTOMER_ID Optional 32 Characters ce282366866e03750e55a759ebb50adf Customer Account ID (for customer transactions)
TRANSACTION_ID Optional 32 Characters ed8f03485e2bc5e19639dcc6248b25c3 TRANSACTION ID (for specific transaction details)
TRANSACTION_DIRECTION Optional 20 Characters (maximum) OUTGOING OUTGOING, INCOMING (leave empty for all)
LIST_ORDER Optional 20 Characters (maximum) DESCENDING ASCENDING, DESCENDING
DATETIME_START Optional YYYY-MM-DDTHH:MM:SS 2020-01-01T00:00:00 (leave empty to include all history)
DATETIME_END Optional YYYY-MM-DDTHH:MM:SS 2023-02-02T23:59:59 (leave empty to include most current)
Example PHP code
<?php
   
 

// Define the parameters
$parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618',  // Required Corporate Account ID
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',  // Required Gateway API Key
    'CUSTOMER_ID' => 'ce282366866e03750e55a759ebb50adf',  // Optional Customer Account ID
    'TRANSACTION_ID' => 'ed8f03485e2bc5e19639dcc6248b25c3',  // Optional Transaction ID
    'TRANSACTION_DIRECTION' => 'OUTGOING',  // Optional, leave empty for all (can be INCOMING, OUTGOING)
    'LIST_ORDER' => 'DESCENDING',  // Optional (ASCENDING, DESCENDING)
    'DATETIME_START' => '2020-01-01T00:00:00',  // Optional, leave empty for all history
    'DATETIME_END' => '2023-02-02T23:59:59'  // Optional, leave empty for most current
];


 // live end point
    $url = "https://sandbox.dinaricash.com/list-transactions";

    // test end point
    $url = "https://production.dinaricash.com/list-transactions";


// Initialize cURL
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // For skipping SSL verification (optional)
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // For skipping peer verification (optional)

// Execute cURL request
$response = curl_exec($ch);

// Close cURL session
curl_close($ch);

    //$result contains the response back.
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Failed to fetch transaction list.",
  "error_code": 500,
  "details": {
    "GATEWAY_DATETIME": "2020-01-01 00:00:00",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "CUSTOMER_ID": "ce282366866e03750e55a759ebb50adf",
    "GATEWAY_ERROR": "Details about the error. Failed to retrieve transaction list."
  }
}



//Success Response.
{
  "status": "success",
  "message": "Transaction list fetched successfully.",
  "data": {
    "GATEWAY_DATETIME": "2020-01-01 00:00:00",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "CUSTOMER_ID": "ce282366866e03750e55a759ebb50adf",
    "TRANSACTION_LIST_ARRAY": [
      {
        "TRANSACTION_ID": "8d1838fbb7fea3206326d0d96f162618",
        "TRANSACTION_DATETIME_CREATED": "2025-01-08 12:30:00",
        "TRANSACTION_STATUS": "Completed",
        "TRANSACTION_CURRENCY_ISO3": "USD",
        "TRANSACTION_SEND_AMOUNT": 250.75,
        "GATEWAY_MESSAGE": "Transaction processed successfully"
      },
      {
        "TRANSACTION_ID": "7b1fbb3e2c5d32eecad582076dbb6cf2",
        "TRANSACTION_DATETIME_CREATED": "2025-01-07 10:20:00",
        "TRANSACTION_STATUS": "Failed",
        "TRANSACTION_CURRENCY_ISO3": "EUR",
        "TRANSACTION_SEND_AMOUNT": 100.50,
        "GATEWAY_MESSAGE": "Insufficient funds"
      }
    ]
  }
}

Cancel Transaction

This section explains the process of canceling a transaction using the provided API endpoint.


To cancel a transaction, use the appropriate API endpoint and ensure that the correct parameters are included in your request. The cancellation status will be returned as a response with the details of the canceled transaction.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Gateway API KEY
TRANSACTION_ID Required 32 Characters ed8f03485e2bc5e19639dcc6248b25c3 The TRANSACTION_ID is issued by "send_money.api" in response to a successful payment.
Example PHP code
<?php
    
    // Parameters for the POST request
$parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618', // Required
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d',    // Required
    'TRANSACTION_ID' => 'ed8f03485e2bc5e19639dcc6248b25c3'       // Required
];

// Live endpoint
$url = "https://production.dinaricash.com/transaction/status";

// Test endpoint
 $url = "https://sandbox.dinaricash.com/transaction/status";

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // Disable SSL verification (only for testing)
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL certificate verification (only for testing)
curl_setopt($ch, CURLOPT_URL, $url);            // Set the URL
curl_setopt($ch, CURLOPT_POST, true);           // Set the request method to POST
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); // Attach parameters to the request
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response instead of outputting it

// Execute the cURL request
$result = curl_exec($ch);


// Close the cURL session
curl_close($ch);
    
    //$result contains the response back.

?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Transaction cancellation failed.",
  "error_code": 403,
  "details": {
    "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
    "GATEWAY_ERROR": "Insufficient balance to process the cancellation.",
    "PAYOUT_BALANCE_BEFORE_CANCEL": 500.00,
    "PAYOUT_BALANCE_AFTER_CANCEL": 500.00,
    "FLOAT_BALANCE_BEFORE_CANCEL": 150.50,
    "FLOAT_BALANCE_AFTER_CANCEL": 150.50,
    "RESERVE_BALANCE_BEFORE_CANCEL": 1000.00,
    "RESERVE_BALANCE_AFTER_CANCEL": 1000.00,
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


//Success Response.
{
  "status": "success",
  "message": "Transaction canceled successfully.",
  "data": {
    "TRANSACTION_ID": "955a380d7d9c05707f199fbe8ba8474d",
    "TRANSACTION_DATETIME_CREATED": "2025-01-08 13:00:00",
    "TRANSACTION_CURRENCY_ISO3": "USD",
    "SEND_AMOUNT": 300.00,
    "TRANSACTION_STATUS": "Canceled",
    "GATEWAY_MESSAGE": "Success! The transaction has been canceled.",
    "TRANSACTION_SEND_METHOD": "ACH",
    "SEND_FEE_FIXED_AMOUNT": 5.00,
    "SEND_FEE_PERCENTAGE": 0.05,
    "SEND_FEE_PERCENTAGE_AMOUNT": 15.00,
    "SEND_FEE_TOTAL_AMOUNT": 20.00,
    "CANCEL_FEE_FIXED_AMOUNT": 5.00,
    "CANCEL_FEE_PERCENTAGE": 0.05,
    "CANCEL_FEE_PERCENTAGE_AMOUNT": 15.00,
    "CANCEL_FEE_TOTAL_AMOUNT": 20.00,
    "PAYOUT_BALANCE_BEFORE_CANCEL": 1284.50,
    "PAYOUT_BALANCE_AFTER_CANCEL": 1000.00,
    "FLOAT_BALANCE_BEFORE_CANCEL": 200.50,
    "FLOAT_BALANCE_AFTER_CANCEL": 199.50,
    "RESERVE_BALANCE_BEFORE_CANCEL": 1000.00,
    "RESERVE_BALANCE_AFTER_CANCEL": 1000.00,
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618"
  }
}


Introduction to Account Balance

This section describes the Dinari Cash API Documentation payment gateway API.

Get account balance

This section describes the process of retrieving the account balance using the provided API endpoint.


To get the account balance, use the appropriate API endpoint and ensure that the correct parameters are included in your request. The balance details will be returned as a response with the current available balance of the account.

Request to the end point with the following parameters below.

Parameter Required Format Example Description
CORPORATE_ACCOUNT_ID Required 32 Characters 8d1838fbb7fea3206326d0d96f162618 Corporate Account ID
GATEWAY_API_KEY Required 32 Characters 955a380d7d9c05707f199fbe8ba8474d Gateway API KEY
Example PHP code
<?php
    
    // Define the required parameters
$parameters = [
    'CORPORATE_ACCOUNT_ID' => '8d1838fbb7fea3206326d0d96f162618', // Required
    'GATEWAY_API_KEY' => '955a380d7d9c05707f199fbe8ba8474d' // Required
];

// Live endpoint
$url = "https://production.dinaricash.com/account/balance";

// Test endpoint
$url = "https://sandbox.dinaricash.com/account/balance";

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // Disable SSL verification (for testing only)
curl_setopt($ch, CURLOPT_URL, $url); // Set the URL
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); // Set POST fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return response as string

// Execute the request
$result = curl_exec($ch);

// Close cURL session
curl_close($ch);

    //$result contains the response back.
?>
Example Responses
//Error Response.
{
  "status": "error",
  "message": "Failed to retrieve account balance.",
  "error_code": 400,
  "data": {
    "GATEWAY_DATETIME": "2025-01-08 12:00:00",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "GATEWAY_ERROR": "Invalid Corporate Account ID or Gateway API Key."
  }
}



//Success Response.
{
  "status": "success",
  "message": "Account balance retrieved successfully.",
  "data": {
    "GATEWAY_DATETIME": "2025-01-08 12:00:00",
    "CORPORATE_ACCOUNT_ID": "8d1838fbb7fea3206326d0d96f162618",
    "ACCOUNT_SERVICE_STATUS": "LIVE",
    "ACCOUNT_CURRENCY_ISO3": "USD",
    "PAYOUT_BALANCE": 50111.10,
    "FLOAT_BALANCE": 1022.25,
    "RESERVE_BALANCE": 100000.00
  }
}