Initiate Transaction
Create a Fundiin payment transaction with order, customer, amount, redirect, and installment data.
Endpoint
POST/v2/payments
DirectionMerchant to Fundiin
Content typeapplication/json
Versionv2 latest
Request Parameters
Required and optional fields
Request parameters
Required
merchantIdStringRequiredFundiin-provided MID.
storeIdStringRequiredStore ID processing the payment.
referenceIdStringRequiredUnique merchant reference. Regex: ^[0-9a-zA-Z_:-]{1,60}$.
platformIdStringRequiredPlatform or third party processing the order/payment service.
requestTypeStringRequiredUse installment.
paymentMethodStringRequiredAPP, POS, or WEB.
descriptionStringRequiredOrder description.
successRedirectUrlStringRequiredRedirect URL after successful payment.
unSuccessRedirectUrlStringRequiredRedirect URL after unsuccessful payment.
amount.valueNumberRequiredTransaction amount in VND minor unit.
amount.currencyStringRequiredCurrency. Use VND.
itemsJsonArrayRequiredOrder items. Maximum 200 items.
customerJsonObjectRequiredCustomer information.
shippingJsonObjectRequiredShipping information.
Optional
langStringOptionalvi or en. Defaults to en.
extraDataStringOptionalMerchant-defined extra data.
terminalTypeStringOptionalDESKTOP_BROWSER, MOBILE_BROWSER, or MOBILE_APP.
installmentJsonObjectOptionalInstallment package information.
sellerJsonObjectOptionalSeller information.
transExpiredTimeNumberOptionalMaximum time for the customer to complete payment, in milliseconds.
sendSmsBooleanOptionalWhether Fundiin should send SMS to customer.
sendEmailBooleanOptionalWhether Fundiin should send email to customer.
installment
Required
packageIdStringRequiredInstallment package ID.
items[]
Required
productIdStringRequiredThe item ID.
productNameStringRequiredThe item name.
categoryStringRequiredThe item category.
currencyStringRequiredCurrency. Use VND.
quantityIntegerRequiredItem quantity. Must be greater than 0.
priceNumberRequiredSingle unit price.
totalAmountNumberRequiredprice x quantity.
Optional
descriptionStringOptionalItem description.
imageUrlStringOptionalProduct image URL.
customer
Required
phoneNumberStringRequiredCustomer mobile number. Usually 10 or 11 digits.
emailStringRequiredValid customer email.
firstNameStringRequiredCustomer first name.
lastNameStringRequiredCustomer last name.
Optional
rankStringOptionalCustomer segmentation.
descriptionStringOptionalCustomer description.
genderStringOptionalM, F, or U.
dateOfBirthStringOptionalFormat DD-MM-YYYY.
seller
Required
idStringRequiredSeller ID generated by the merchant.
Optional
emailStringOptionalSeller email.
nameStringOptionalSeller name.
addressStringOptionalSeller address.
shipping
Required
cityStringRequiredShipping city.
districtStringRequiredShipping district.
wardStringRequiredShipping ward.
streetStringRequiredShipping street.
houseNumberStringRequiredHouse number.
countryStringRequiredShipping country. Use VN.
Optional
zipCodeStringOptionalShipping ZIP code.
streetNumberStringOptionalStreet number.
houseExtensionStringOptionalHouse extension.
HTTP Responses
Response body
Response parameters
merchantIdStringRequiredMerchant identifier issued by Fundiin.
referenceIdStringRequiredMerchant order/reference number.
responseTimeStringRequiredResponse date time. Format YYYY-MM-DD hh:mm:ss.
resultStatusStringRequiredResult status.
resultMsgStringRequiredResult message.
paymentUrlStringRequiredFundiin payment URL.
qrDataStringOptionalQR code data.
Result Status
Status codes and actions
APPROVEDThe request was approved.Continue the integration flow.
ACCESS_DENIEDAccess denied.Check merchant configuration or contact Fundiin.
INVALID_REQUESTThe request is invalid.Fix request fields and retry.
INVALID_REFERENCE_IDreferenceId is invalid.Retry with a valid referenceId.
INVALID_STORE_IDThe storeId is invalid.Retry with a correct storeId.
DUPLICATE_REFERENCE_IDThe referenceId is duplicated.Query transaction status or retry with another referenceId.
INVALID_CLIENT_IDclientId is not registered.Use a valid registered clientId.
INVALID_SIGNATUREThe HMAC signature is invalid.Recompute the signature with the correct secret key and request body.
INVALID_MERCHANT_IDMerchant is not registered.Verify the merchant ID.
INVALID_HTTP_METHODHTTP method is invalid.Use the documented method.
INVALID_APIAPI is not defined.Check the request URL and endpoint.
INVALID_AMOUNTPayment amount is invalid.Verify the payment amount.
PHONE_NUMBER_UNAVAILABLEPhone number is unavailable.Provide a phone number with the documented length.
PHONE_NUMBER_INVALIDPhone number is invalid.Provide a valid phone number.
AMOUNT_EXCEEDED_UPPER_LIMITPayment amount exceeds the configured limit.Adjust the amount or contact Fundiin.
AMOUNT_BELOW_MINIMUM_LIMITPayment amount is below the minimum limit.Increase the amount or contact Fundiin for configuration.
REQUEST_PROCESSINGThe request was already processed or is in progress.Monitor status or retry later.
DOWNSTREAM_ERRORPartner downstream timeout.Retry later as the issue may be temporary.
ERROR_GENERALDeclined due to a general error.Contact Fundiin support if the issue persists.
Endpoint destination URL
Fundiin host
POST
https://gateway-sandbox.fundiin.vn/v2/paymentsAuthentication
HMAC guideHeaders
Content-Typeapplication/jsonClient-IdYOUR_CLIENT_IDRequest-TimeYYYY-MM-DD hh:mm:ssSignatureHMAC_SHA256(request_body, secretKey)Idempotency-KeyRecommended for safe retriescURL
Sandbox-ready request
curl --request POST 'https://gateway-sandbox.fundiin.vn/v2/payments' \ --header 'Content-Type: application/json' \ --header 'Client-Id: YOUR_CLIENT_ID' \ --header 'Request-Time: YYYY-MM-DD hh:mm:ss' \ --header 'Signature: HMAC_SHA256_REQUEST_BODY' \ --header 'Idempotency-Key: ORDER-20260621-001' \ --data-raw '{"merchantId":"Your merchant code","referenceId":"Your order number","storeId":"Your store id","platformId":"Your platform id","requestType":"installment","paymentMethod":"WEB","terminalType":"DESKTOP_BROWSER","lang":"vi","extraData":"jsonstring","description":"description","successRedirectUrl":"https://merchant.example/success","unSuccessRedirectUrl":"https://merchant.example/failed","installment":{"packageId":"packageId"},"amount":{"currency":"VND","value":400000},"items":[{"productId":"170594","productName":"clothes","description":"Red","quantity":2,"price":200000,"currency":"VND","totalAmount":400000}],"customer":{"phoneNumber":"0912345678","rank":"standard","description":"Customer description","email":"youremail@email.com","firstName":"Doe","lastName":"Test","gender":"F","dateOfBirth":"17-04-1999"},"seller":{"id":"SELLER-001","email":"seller@example.com","name":"Seller Name","address":"Ho Chi Minh"},"shipping":{"city":"Ho Chi Minh","zipCode":"00700","district":"5","ward":"","street":"Tran Nhan Ton","streetNumber":"Apt 214","houseNumber":"214","houseExtension":"","country":"VN"},"transExpiredTime":1800000,"sendSms":true,"sendEmail":true}'Request Example
JSON
{ "merchantId": "Your merchant code", "referenceId": "Your order number", "storeId": "Your store id", "platformId": "Your platform id", "requestType": "installment", "paymentMethod": "WEB", "terminalType": "DESKTOP_BROWSER", "lang": "vi", "extraData": "jsonstring", "description": "description", "successRedirectUrl": "https://merchant.example/success", "unSuccessRedirectUrl": "https://merchant.example/failed", "installment": { "packageId": "packageId" }, "amount": { "currency": "VND", "value": 400000 }, "items": [ { "productId": "170594", "productName": "clothes", "description": "Red", "quantity": 2, "price": 200000, "currency": "VND", "totalAmount": 400000 } ], "customer": { "phoneNumber": "0912345678", "rank": "standard", "description": "Customer description", "email": "youremail@email.com", "firstName": "Doe", "lastName": "Test", "gender": "F", "dateOfBirth": "17-04-1999" }, "seller": { "id": "SELLER-001", "email": "seller@example.com", "name": "Seller Name", "address": "Ho Chi Minh" }, "shipping": { "city": "Ho Chi Minh", "zipCode": "00700", "district": "5", "ward": "", "street": "Tran Nhan Ton", "streetNumber": "Apt 214", "houseNumber": "214", "houseExtension": "", "country": "VN" }, "transExpiredTime": 1800000, "sendSms": true, "sendEmail": true}Response Example
JSON
{ "merchantId": "FundiinVN", "referenceId": "Your order number", "responseTime": "2023-07-24 09:33:55", "resultMsg": "Thành công", "resultStatus": "APPROVED", "paymentUrl": "https://fundiin.vn/v2/payment", "qrData": "https://fundiin.vn/v2/payment"}