post https://api.juspay.in/customers//eligibility
The API is used to check if the customer is eligible for the pay later options. The API would return the list of all the pay later options that is configured in your account. It is a sync API, ie when merchants call the eligibility API Juspay checks the eligibility with the respective wallets and return the response. Hence the latency of the API can be comparatively higher.
Request
Note:
- Either amount or the order_id should be present in the request so as to get the eligibility.
- gateway_data is gateway specific information, it can be mandatory for some
gateways
Format Supported:
- application/JSON
- application/x-www-form-urlencoded
Response
Filed | Type | Description |
---|---|---|
payment_methods_eligibility | Array | Lists all the payment methods which has eligibility criteria |
EligibilityData
Filed | Type | Description |
---|---|---|
payment_method | String | Name o f the Payment Method which has eligibility criteria |
payment_method_type | String | Type of the payment method like WALLET |
description | String | Description about the payment method |
is_eligible | Boolean | Flag which specifies if the customer is eligible for the payment method |
eligibility_strategy | String | Different strategy of eligibility like Transaction eligibility, User eligibility |
balance | Double | Balance given in the gateway eligibility response |
status | String | The Juspay mapped error status for the corresponding gateway error code. |
due_date | String | Due date of the pay later option bill payment. |
gateway_error_code | String | Error code |
gateway_error_message | String | Error message given by gateway |
Status and description:
Status | Description |
---|---|
SUCCESS | Successful |
USER_NOT_FOUND | User not found for that gateway |
BAD_REQUEST | Bad Request |
INVALID_DATA | Invalid header or input data or any of the values are expired |
NOT_ACCESSIBLE | When the user does not have access because of the insufficient credit limit or blocked to that wallet |
PENDING_DUES | Pending dues are present in the wallet which user needs to clear |
UNAUTHORIZED | Unauthorized |
ERROR | Any other error mapping |
Error Code And Description
Error Code | Description |
---|---|
linking_required | Link the Simpl account |
pending_bill | Clear the previous dues to proceed |
insufficient_credit | Clear the previous dues to proceed |
unable_to_process | Transaction Amount exceeds spending limit |
user_unauthorized | User is not eligible to use Simpl |