Eligibility Check (Native)

Always invoke this method whenever there is a change in the order amount.

To display the complete list of SDK based wallet instruments (ApplePay), call the below process function with action as ‘sdkWalletEligibility’.

Note

Depending on the isEligible parameter in the response, the merchant needs to decide to show or hide the corresponding instrument.

Verify whether the device supports Apple Pay

The applePayCapabilities method asynchronously contacts Apple Pay servers as part of the verification process and returns the paymentCredentialStatus of the device.

The following are possible return values:

  1. paymentCredentialsAvailable

    Confirms that the device supports Apple Pay and there’s at least one active payment credential in Wallet that qualifies for payments on the web. Show an Apple Pay button and offer Apple Pay as the primary, but not necessarily sole, payment option.

  2. applePayUnsupported

    Indicates that the device doesn’t support Apple Pay. Don’t display an Apple Pay button or offer Apple Pay as a payment option.

Request Parameters

requestId
String
Mandatory

Unique identifier for the request.

service
String
Mandatory

Always in.juspay.hyperapi

payload
Object
Mandatory

Contains the main request payload.

payload Object Parameters

country_code
String
Mandatory

Country code

Example:- AE

mandate
String
Mandatory

Mandate details for recurring payments.

currency
String
Optional

Transaction currency

Example:- AED

action
String
Mandatory

Action type. Always sdkWalletEligibility.

customerId
String
Mandatory

Unique customer ID generated by Juspay.

amount
String
Mandatory

Transaction amount.

clientAuthToken
String
Mandatory

Authentication token from the merchant backend.

gatewayId
String
Mandatory

Use gatewayId to route payments through a specific gateway configured in your Juspay account.

gatewayReferenceId
String
Mandatory

Use gatewayReferenceId to target a particular gateway setup using its specific reference ID.

paymentMethods
String
Mandatory

List of payment methods to check eligibility.

mandate Object Parameters

frequency
String
Mandatory

This is the billing frequency for the subscription. This also gets displayed on the payment sheet.

Example:- Monthly

billing_agreement
String
Optional

Text for the billing agreement.

Note

The merchant can optionally include a localized billing_Agreement string (up to 500 characters). This string can be used to describe recurring payment details such as the amount, frequency, or other payment terms, as well as how the user can cancel the subscription. However, it is not meant to replace the full payment terms that are provided outside of the Apple Pay payment sheet.

end_date
String
Optional

End date of the mandate in epoch milliseconds.

recurring_amount
String
Optional

This field allows the merchant to display the recurring subscription amount that will be charged for future debits. If the merchant does not provide this value, the mandate max_amount will be shown instead.

start_date
String
Optional

Start date of the mandate in epoch milliseconds.

management_url
String
Mandatory

A URL that directs the user to a page where they can modify or remove the payment method used for the recurring payment.

max_amount
String
Mandatory

Max amount which can be debited in subsequent mandate payments.

payment_description
String
Optional

A description of the deferred payment. Use a simple language description that explains what the payment is for.

Example:- Hotel stay, 2 nights

paymentMethods Array Parameters

paymentMethodType
String
Mandatory

Always WALLET

paymentMethod
String
Mandatory

Use JP_APPLEPAY for mandates or APPLEPAY for normal payments.

Last updated 8 months ago