Wallet Payment

Create a payment transaction for paying from a prepaid Wallet. Once you have the response, depending on the “method” attribute, you will have to take the next step. If you receive GET, then take the value in the “URL” attribute and redirect the user to this location. If you receive POST, then “params” attribute will hold a map containing key-value pairs.

For Web, you can create a form with these parameters as hidden variables and auto submit the form. Example code in Javascript: Serialize Parameterslink icon.

For Android, serialize this data such that it can be loaded to WebView directly via postData. Example code in Java: Serialize Parameterslink icon.

Scroll inside to view more
payment_method
Wallet name
ALIPAY
ALIPAY Wallet
APPLEPAY
APPLEPAY
GOOGLEPAY
Googlepay Wallet
GRABPAY
GRABPAY WALLET
WECHATPAY
WeChat Pay
ALIPAY
ALIPAY Wallet
GOPAY
GOPAY WALLET
GRABPAY
GRABPAY WALLET
GOOGLEWALLET
Google Wallet
APPLEPAY
APPLEPAY
ZALOPAY
ZaloPay Wallet
VNPAY
VNPAY Wallet
SHOPEEPAY
SHOPEEPAY WALLET
QR_SHOPEEPAY
SHOPEEPAY QR WALLET
QR_GOPAY
GOPAY QR WALLET
GOPAY
GOPAY WALLET
SHOPEEPAY_QR
Shopeepay QR
GOPAY_QR
GoPay QR
DANA
Dana Wallet
DANA_QR
Dana QR
LINKAJA
Linkaja Wallet
LINKAJA_QR
Linkaja QR
OVO_COLLECT
Ovo Collect
GOOGLEWALLET
Google Wallet
LAZADAPAY
LAZADAPAY
LINEPAY
LinePay
WECHATPAY
WeChat Pay
PAOTANGPAY
PAOTANGPAY
GOOGLEWALLET
Google Wallet
GRABPAY
GRABPAY WALLET
APPLEPAY
APPLEPAY
TRUEMONEY
TrueMoney
PAYPAL
PayPal
KBANK_CARD
KBANK Card
FIB
FIB
PAYME
PAYME wallet
STCPAY
StcPay wallet
MWALLET_QR
MWALLET QR wallet

HANDLING POST

When you get POST as the authentication method in the response, then the customer must be redirected using a form. Example HTML code is given to you. Depending on your client language, choose the appropriate way to create the form.

HANDLING GET

When you get GET as the authentication method in the response, you may load the URL directly into the customer’s browser. You can easily achieve this by sending HTTP 302 from your server. However, if the API call was made from the browser, then you can utilize the code snippet provided.

API Endpoints
Production Link
POST
https://api.juspay.in/txns
Authorization Header
Headers
Body
200 : Success
400 : Invalid Input data

Error Codes:

Scroll inside to view more
Scenario
Error Codes
Sample Error Message
Not passing the currency value
400
{"error_message":"Bad Request.","status":"Bad Request","error_code":"INVALID_REQUEST","error_info":{"user_message":"Invalid input data","fields":[{"field_name":"currency","reason":"Missing field or Invalid Value"}],"developer_message":"Invalid input data","code":"INVALID_INPUT","category":"USER_ERROR"}}
Not passing the amount value
400
{"error_message":"Bad Request.","status":"Bad Request","error_code":"INVALID_REQUEST","error_info":{"user_message":"Invalid input data","fields":[{"field_name":"amount","reason":"Missing field or Invalid Value"}],"developer_message":"Invalid input data","code":"INVALID_INPUT","category":"USER_ERROR"}
Passing the amount in negative Integer
400
{"error_message":"Bad Request.","status":"Bad Request","error_code":"INVALID_REQUEST","error_info":{"user_message":"Invalid input data","fields":[{"field_name":"amount","reason":"Invalid amount"}],"developer_message":"Invalid input data","code":"INVALID_INPUT","category":"USER_ERROR"}}
Passing the amount in Positive Integer
400
{"error_message":"BadRequest.","status":"Bad Request","error_code":"INVALID_REQUEST","error_info":{"user_message":"Invalid input data","fields":[{"field_name":"amount","reason":"Missing field or Invalid Value"}],"developer_message":"Invalid input data","code":"INVALID_INPUT","category":"USER_ERROR"}}
Not passing the customer_email
400
{"status":"error","error_code":"invalid_request","error_info":{"user_message":"Invalid customer Email","fields":[{"field_name":"customerEmail","reason":"Invalid value."}],"developer_message":"customerEmail shouldn't have any special chars","code":"INVALID_INPUT","category":"USER_ERROR"}}
Not passing the orderId
400
{"error_message":"order_id is missing","status":"Bad Request","error_code":"order_id is missing","error_info":{"user_message":"Please pass order_id in request","fields":[{"field_name":"order_id","reason":"Missing field."}],"developer_message":"order_id is missing in request","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Not passing API key
403
{"error":true,"error_message":"Forbidden.No valid API key or client auth token is present in Authorization header or client_auth_token query parameter","user_message":"Access Denied.Unable to proceed.","userMessage":"Access Denied.Unable to proceed.","error_info":{"code":"UNAUTHORIZED","category":"USER_ERROR","user_message":"AccessDenied","developer_message":"No valid API key or client auth token is present in Authorization header or client_auth_token query parameter"}}
Invalid API key
401
{"status":"error","error_code":"access_denied","error_info":{"user_message":"Unauthorized.","developer_message":"Invalid API Key.Please pass a valid and active apikey.","code":"UNAUTHORIZED","category":"USER_ERROR"}}
Whitelisting of IP in dashboard
403
{"error":true,"error_message":"Internal Server error.","user_message":"Bad Origin.","error_info":{"code":"BAD_ORIGIN","category":"USER_ERROR","user_message":"Bad Origin.","developer_message":"IP Verification Failed"}}
Passing amount as 0(without Juspay internal enablement)
400
{"error_message":"Bad Request.","status":"ERROR","error_code":"INVALID_REQUEST","error_info":{"user_message":"Invalid input data","fields":[{"field_name":"amount","reason":"Invalid amount"}],"developer_message":"Invalid input data","code":"INVALID_INPUT","category":"USER_ERROR"}}'
Passing a non configured currency
400
{"error_message":"Can't find a suitable gateway to process the transaction","status":"Bad Request","error_code":"invalid_request_error","error_info":{"user_message":"Gateway not found to process the transaction request.","developer_message":"No functional gateways after filtering for currency THB","code":"GATEWAY_NOT_FOUND","category":"CONFIG_ERROR"}}
Not passing payment method
400
{"error_message":"Payment method type cannot be null","status":"invalid_request_error","error_code":"missing_payment_method_type","error_info":{"user_message":"Please pass payment method type in the request.","fields":[{"field_name":"payment_method_type","reason":"Missing field."}],"developer_message":"Missing payment method type in the request. Payment method type is a mandatory parametere.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Not passing payment method type
400
{"error_message":"Payment method cannot be null","status":"invalid_request_error","error_code":"missing_payment_method","error_info":{"user_message":"Cannot process your request. Please contact support team for assistance.","fields":[{"field_name":"payment_method","reason":"Missing field."}],"developer_message":"Missing payment method. Payment method is required for provided payment method type.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Last updated 9 months ago