LogoLogo
NymCardAPI catalogContact usnFront catalog
  • NYMCARD DOCUMENTATION
  • Get Started
    • nCore API Quick Tutorial
    • API Core Principles
    • Program management
      • Manage documents by APIs
      • User KYB process
      • Necessary parameters per user type
      • User ID verification by SDK
      • User KYC process
    • Issuance
      • Users
      • Cards
    • Issuing Physical Cards
      • Individual card issuance
      • Bulk card issuance
      • Card fulfillment
      • Card PIN management
      • Card replacement
      • Proxy number usage
    • Issuing Virtual Cards
      • Migration of virtual to physical card
    • Funding and transfers
      • Funding
      • Internal funding source
      • External funding source
        • From card
        • From bank account
        • Lean API flow
        • DAPI direct API flow
      • Transfers
      • Western Union APIs
    • Product Management
      • Card product
      • Balance limits
      • Velocity limits
      • Fees
      • Charges
      • Multi-currency
      • Authorization controls
        • Enhancements for MCC list management
    • Transactions
      • Payment ecosystem
      • Transaction lifecycle
      • Transaction types
      • Transaction endpoints scenarios
      • Multi-clearing process
    • Webhooks
      • Introduction to webhooks
      • nCore webhook events
      • Steps to configure a webhook
      • Webhooks samples
      • Webhook changes for simulation
      • Webhooks management
    • Security
      • PCI widget
      • 3D Secure
      • OTP SMS templates
    • Release announcements
      • Embedded Lending Release Notes
      • Changes in the release on 13/07/2023
      • Changes in the release on 23/05/2023
      • Changes in the release on 04/04/2023
  • For developers
    • nCore API catalog
    • nFront API catalog
Powered by GitBook
On this page

Was this helpful?

  1. Get Started
  2. Funding and transfers
  3. External funding source

Lean API flow

PreviousFrom bank accountNextDAPI direct API flow

Last updated 9 months ago

Was this helpful?

LEAN is a payment gateway service provider in the UAE that supports bank transfers from one bank account to another bank account.

NymCard is now offering a new feature for loading funds into the card account of the cardholder using direct integration between the fintech and LEAN. This new capability will allow you to build your own user experience for the loading funds feature with other capabilities offered by LEAN to the clients.

Below you can find a HOLD flow. Take the following steps:

  1. Generate token

Generate a token using the “” API. In this API you need to pass your NymCard account ID and pass "LEAN" channel. You will receive the token itself and timestamp, which indicates when this token will expire. Expiration time is 60 minutes.

Here you can find request sample:

{

"channel": "LEAN"

}

Here you can find response sample:

Response sample

{

"token": "mn7-RjV04loSfUyueaekjkDrKhrdP1JzQqQa3cchimH8JaLjaVtBNHqKZYezbfphEXBjd8ehwPZKr4C1PPy46w==",

"expiry": 3600

}

  1. Load Account Funds with Token API: [HOLD]

Upon performing “HOLD”, the amount will be set to hold for the prefunded (pool) account and no funds will be credited to the cardholder account yet. Perform the following API:

LEAN HOLD request:

curl --location 'https://api.qa.platform.nm-1.nymcard.com/internal/v1/accounts:loadFunds' \
--header 'X-Nymos-Idempotency-Key: sed0083' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'apikey: tenant2-5aade201-368d-4bde-b194-21c296e7e75c' \
--data '{
    "channel": "LEAN",
    "type": "HOLD", 
    "token": "mn7-RjV04loSfUyueaekjkDrKhrdP1JzQqQa3cchimH8JaLjaVtBNHqKZYezbfphEXBjd8ehwPZKr4C1PPy46w==",
    "amount": 15,
    "dry_run": false 
   
}'

You will get the following response:

{
    "reference_number": "AHSA4050110433X"
}
  1. Also you will receive the following webhook:

{
  "event": "TRANSACTION",
  "card_transaction": {
    "id": "2fd14380-a687-45cf-810a-c7644a752b81",
    "transaction_timestamp": "2024-02-19T11:04:33.422Z",
    "message_type": "API",
    "transaction_type": "WALLET_TRANSFER",
    "transaction_description": "Wallet Transfer",
    "user_id": "asiddiqui_27_11_23_04",
    "account_id1": "Bussines_account_QA_29DEC23_003",
    "card_product1": "MUHAY TESTING CP 29DEC23_0003",
    "account_id2": "cbeeea69-658f-4b9c-87ce-b342dfec5e0c",
    "card_product2": "bulk issuance product",
    "rrn": "4050110433rL",
    "reference_number": "AHSA4050110433X",
    "transaction_amount": 15,
    "transaction_currency": "AED",
    "fee_amount": 0,
    "fee_details": [],
    "status_code": "0000",
    "transfer_id": "2fd14380-a687-45cf-810a-c7644a752b81",
    "reversal_count": 0,
    "clearing_count": 0,
    "sender_user_id": "Business_Muhay_QA_User_03",
    "source_channel": "LEAN",
    "type": "HOLD",
    "incremental_transaction": false,
    "is_cancelled": "NO",
    "is_cash_advance": false
  }
}
  1. Once you receive a successful response from NymCard for payment intent, you need to pass the details to LEAN along with token. You also have to add external reference number for reconciliation purposes.

For POST/RELEASE scenarios, please coordinate with LEAN.

Generate external token
POST /accounts/{id}:token