m2pfintech
API LibraryTransaction

Credit Forex Card

Loads forex currency onto a cardholder's forex card wallet. This is used for initial loading and reloading of forex cards.

Integration Sequence (follow in order)

  1. Fetch conversion ratePOST /v1/forex/conversion-rate — returns per-wallet conversionRate, baseConversionRate, netAmount, baseConvertedAmount, discountRate, discountAmount, conversionGst, valueOfSupply.
  2. Fetch fee summaryPOST /v1/forex/summary/fee — returns summary.feeDetails, summary.tcs, summary.gst, summary.total, summary.lrs. Pass the same product.promocodeId and summary.feeWaiver flag you intend to use.
  3. Submit this request — populate walletAmount from step 1 and summary from step 2. Do not independently compute any fee, tax, or rate field.

summary Object — What to Pass

FieldSourceNotes
feeDetailsFee summary APIPreferred. Each key creates a separate ledger entry
tcsFee summary APIPass here and in walletAmount[0].tcs
conversionGstConversion rate APITriggers a separate branch debit for GST
valueOfSupplyConversion rate APIRequired when conversionGst > 0
totalFee summary APIGrand total the customer pays
gstFee summary APIGST on product fees (not conversion)
feeWaiverOperator decisionSet before calling fee summary API
feesDeprecatedUse feeDetails map instead

walletAmount Array — What to Pass

One entry per currency wallet being loaded. Populate from the conversion rate API response.

  • tcs in walletAmount[0] must equal summary.tcs (duplication required for ledger routing)
  • fees, gst at wallet level echo from conversion/fee API — do not compute independently
  • discountRate, discountAmount echo from conversion rate API — do not alter

Fee Waiver

Set summary.feeWaiver = ALLOWED when the customer qualifies for a fee waiver. You must upload the waiver approval document and pass its reference in summary.feeWaiverApproval. Re-call the fee summary API with feeWaiver: ALLOWED to get the zero-fee breakdown before submitting. TCS and conversionGst are never waived — they are regulatory charges.

Promo Codes

If a promo code is active for this product, pass product.promocodeId (the internal promo code ID provided by M2P, not a customer-facing promo string). Pass the same promocodeId when calling the fee summary API to receive the promotional fee schedule. The promo code affects product-level fees (registration, load fee) only — TCS and conversionGst are unaffected. Do not pass promocodeId in reload requests — the platform reads it automatically from the card's original issuance record.

Compliance Documents

  • Passport: Mandatory for all forex loads
  • Visa: Required for travel-related loads
  • Air Ticket: Required for travel loads
  • Purpose Proof: Required for educational/medical purpose
  • A2 Form: RBI declaration form
  • Fee Waiver Approval: Required if feeWaiver = ALLOWED

Key Fields

  • kitNo: Card kit number
  • wallet.accountId: Target currency wallet account ID
  • amount: Load amount in the foreign currency (e.g., 500 for $500 USD)
  • hierarchyId: Branch/corporate hierarchy ID processing the load
  • transactionType: Always CREDIT for this endpoint
POST
/v1/forex/card-holder-loads/credit

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Request Body

application/json

hierarchyId*string

Required. Branch/corporate hierarchy ID

Length1 <= length
kitNo*string

Required. Card kit number associated with the particular card/product

Length1 <= length
entityId?string

Unique entity identifier for the transaction associated with the customer

mobile?

Customer's mobile number

name?string

Full name of the customer

hashedCard?string

Encrypted Card Number of the customer

customerId?string

Unique customer identifier

cardTypeEnum?string

Type of card issued; Single for single-user, Bulk for bulk issuance

Value in"Single" | "Bulk"
amount*number

Transaction amount in the wallet currency

Range0 <= value
description?string

Description or remarks for the transaction

transactionType*string

Required. CREDIT for loading, DEBIT for withdrawal

Value in"CREDIT" | "DEBIT"
debitTransactionType?string

Indicates partial or full debit transaction

Value in"PARTIAL_DEBIT" | "FULL_DEBIT" | "FULL_DEBIT_WITH_CLOSURE"
product*

Product details associated with the transaction

wallet*

Wallet details used for the transaction

trip?

Trip details (required for CREDIT operations)

funding?

Funding source details

walletAmount?

List of wallet amounts and conversion details (for multi-wallet operations)

summary?

Summary of transaction including fees, GST, TCS, etc.

feeWaiverApprovalReason?string

Reason for fee waiver approval, if any

declarations?

Declarations such as FATCA, ITR, T&C, LRS

branchCode?string

Branch code or hierarchy ID where the transaction occurred

tellerId?string

Teller ID who processed the transaction

rrn?string

Retrieval Reference Number for the transaction

channel?string

Indicates which channel this transaction is initiated from

isBranch?boolean

Indicates if transaction is initiated from a branch

makerChecker?boolean

Indicates if maker-checker workflow is enabled for this transaction

loanDetails?

Loan details if applicable; mandatory if purpose of travel is EDUCATIONAL_LOAN_LETTER

customAttributes?

Custom attributes for additional data

bulkUpload?

Required when feeWaiver = ALLOWED. Upload the approval document using the file upload API and pass the returned fileName and filePath here. The platform validates the document exists before processing the transaction. Ignored when feeWaiver = NOTALLOWED.

id?string
issuerTenant?string
status?string
Value in"SUCCESS" | "FAILED" | "CREATED"
tenant?string
txnStatus?string
Value in"SUCCESS" | "FAILURE"

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/forex/card-holder-loads/credit" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "hierarchyId": "90009",    "kitNo": "320000541",    "entityId": "476843769320000541160925",    "mobile": {      "value": "9876543210",      "countryCode": 91    },    "amount": 500,    "transactionType": "CREDIT",    "product": {      "productId": "FRX001",      "productType": "FOREX"    },    "wallet": {      "accountId": "c515d3a6-6c51-4f64-bd7b-d9cbd9c5b22f"    },    "trip": {      "country": {        "name": "United States",        "threeDigitCountryCode": "USA"      },      "startDate": "2025-05-01",      "endDate": "2025-05-15",      "purposeOfTravel": {        "code": "PERSONAL_VISIT",        "purpose": "Personal Visit"      },      "type": "NEW"    },    "funding": {      "fundingMode": "SAVINGS_ACCOUNT",      "sourceOfFund": "SELF",      "accountNo": "1234567890",      "ifsc": "SBIN0001234"    },    "summary": {      "fees": 250,      "gst": 45,      "tcs": 500,      "total": 42545    },    "declarations": {      "fatca": true,      "lrs": true,      "tc": true    }  }'
{
  "result": {
    "id": "FRX20250415001",
    "currentStatus": "CREATED",
    "status": "SUCCESS",
    "kitNo": "320000541",
    "amount": 500,
    "transactionType": "CREDIT"
  },
  "pagination": null
}
{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Bad Request",
  "status": 400,
  "detail": "Unable to convert http message",
  "message": "error.http.400"
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "The given load amount of $10 is less than the required minimum of $20. Please enter valid amount.",
  "status": 409,
  "detail": "The given load amount of $10 is less than the required minimum of $20. Please enter valid amount.",
  "message": "error.business",
  "businessCode": "PP_CORP_157"
}