Credit / Debit Card transaction

Note
  • Compliance Check: Merchants who are not PCI DSS compliant should refrain from using this API and consume our PayV3.jslink icon for cards.

Scroll inside to view more
Supported Card Brand
payment_method
Sodexo
SODEXO
Mastercard
MASTER
Visa
VISA
Rupay
RUPAY
American Express
AMEX
Discover
DISCOVER
Diners
DINERS
Maestro
MAESTRO
JCB
JCB
BAJAJ Cards
BAJAJ
KNEt Cards
KNET
MADA Cards
MADA
QPay Cards
QPAY
QWIKCILVER Gift Cards
QWIKCILVER
China UnionPay
UNIONPAY
API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/txns
Production Link
POST
https://api.juspay.in/txns
Headers
Body
200 : Success
400 : Invalid Input data

Common Error Codes:

Scroll inside to view more
Scenario
Error Codes
Description
Sample Error Message
For New card - Transaction without passing card number
400
Bad Request
{"error_message":"Card number is required.","status":"invalid_request_error","error_code":"missing_card_number","error_info":{"user_message":"Please enter a valid card number.","fields":[{"field_name":"card_number","reason":"Missing field."}],"developer_message":"Missing card number.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Not passing merchant_id field
400
Bad Request
{"error_message":"Bad request.","status":"ERROR","error_code":"Bad request.","error_info":{"user_message":"Bad request.","fields":[{"field_name":"merchant_id","reason":"Field required but not passed."}],"developer_message":"Failed while parsing your request.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Transaction without passing card_security_code field
400
Bad Request
{"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 supporting this transaction.","code":"GATEWAY_NOT_FOUND","category":"CONFIG_ERROR"}}
Passing a non configured currency
400
Bad Request
{"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 supporting this transaction.","code":"GATEWAY_NOT_FOUND","category":"CONFIG_ERROR"}}
Not passing order_id field
400
Bad Request
{"error_message":"[order id] cannot be null","status":"invalid_request_error","error_code":"blank","error_info":{"user_message":"Cannot process your request. Please contact support team for assistance.","fields":[{"field_name":"order_id","reason":"Missing field."}],"developer_message":"Missing order id. Please pass order_id or order payload.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Invalid order_id
400
Bad Request
{"status":"NOT_FOUND","error_info":{"user_message":"Order Not Found","fields":[{"field_name":"order_id","reason":"Invalid order_id."}],"developer_message":"order not found. please pass a valid order_id for the given merchant.","code":"RESOURCE_NOT_FOUND","category":"USER_ERROR"},"status_id":40}
Not passing card expiry year
400
Bad Request
{"error_message":"Bad request.","status":"ERROR","error_code":"Bad request.","error_info":{"user_message":"Bad request.","fields":[{"field_name":"merchant_id","reason":"Field required but not passed."}],"developer_message":"Failed while parsing your request.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Not passing card expiry month
400
Bad Request
{"error_message":"Missing card expiry month","status":"invalid_request_error","error_code":"missing_card_exp_month","error_info":{"user_message":"Please enter valid card expiry month.","fields":[{"field_name":"card_exp_month","reason":"Missing field."}],"developer_message":"Missing card expiry month. Card expiry month is mandatory for this card brand.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Invalid card number
400
Bad Request
{"error_message":"Card number is invalid.","status":"invalid_request_error","error_code":"invalid_card_number","error_info":{"user_message":"Cannot process your request. Please contact support team for assistance.","fields":[{"field_name":"card_number","reason":"Invalid value."}],"developer_message":"Invalid card number. Card number should contain only digits and should pass luhn check.","code":"INVALID_INPUT","category":"USER_ERROR"}}
Invalid card expiry month
400
Bad Request
{"error_message":"Invalid expiry month.","status":"invalid_request_error","error_code":"invalid_expiry_month","error_info":{"user_message":"Please enter valid card expiry month.","fields":[{"field_name":"card_exp_month","reason":"Invalid value."}],"developer_message":"Invalid card expiry month. Expiry month cannot be greater than 12 and less than 1","code":"INVALID_INPUT","category":"USER_ERROR"}}
Invalid card expiry year
400
Bad Request
{"error_message":"Card already expired.","status":"invalid_request_error","error_code":"card_expired","error_info":{"user_message":"Card expired.","developer_message":"Card expired. Card expiry year/month cannot be less than current year/month.","code":"INVALID_INPUT","category":"USER_ERROR"}}
Not passing payment method
400
Bad Request
{"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
Bad Request
{"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"}}
Passing a non configured currency
400
Bad Request
{"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 supporting PROMPTPAY payment method.","code":"GATEWAY_NOT_FOUND","category":"CONFIG_ERROR"}}

For Pre-auth and Capture:

Scroll inside to view more
Scenario
Error Codes
Description
Sample Error Message
Transaction without passing coma before the pre_auth_enabled field
400
Bad Request
{"error_message":"Bad request.","status":"ERROR","error_code":"Bad request.","error_info":{"user_message":"Bad request.","fields":[{"field_name":"merchant_id","reason":"Field required but not passed."}],"developer_message":"Failed while parsing your request.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Transaction without passing pre_auth_enabled field
400
Bad Request
{"error_message":"Bad request.","status":"ERROR","error_code":"Bad request.","error_info":{"user_message":"Bad request.","fields":[{"field_name":"merchant_id","reason":"Field required but not passed."}],"developer_message":"Failed while parsing your request.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
Last updated 9 months ago