Import the JudoPay class from the judokit-react-native package:
import JudoPay from 'judokit-react-native'`
Provide your token and secret OR paymentSession:
`const judoPay = new JudoPay({token: "my-token", secret: "my-secret"})`
Or,
`const judoPay = new JudoPay({token: "my-token", paymentSession: "my-payment-session"})`
You can generate a payment session using one of our Server SDKs, or by making a call to our Transaction API.
Merchants operating in specific money movement and financial services categories, as defined by the card schemes must include additional data in the payment sessionpayment session.
For more information, see Account Funding Transactions.
Set the SDK in sandbox mode:
`judoPay.isSandboxed = true`
Making a Transaction
The method for making a transaction and configuring the flow:
This feature is intended to allow the merchant to access cardTokens stored securely by the Mobile SDK, to then use the cardToken to make a server-to-server transaction using our Server SDK Integration, or our Transaction API.
This is typically intended for scenarios where a merchant might want to process a Merchant Initiated Transaction using the card details stored by the consumer.
Specify a Server to Server Transaction
Set the JudoTransactionMode to ServerToServer when calling the Judo methods:
JudoKit-ReactNative supports 3D Secure 2 (EMV 3DS).
3D Secure 2 is available in JudoKit React Native version 3.0.0 or higher, and is available on Github.
const uiConfiguration: JudoUIConfiguration = {
isAVSEnabled: false,
shouldPaymentMethodsVerifySecurityCode: false,
shouldPaymentButtonDisplayAmount: false,
shouldPaymentMethodsDisplayAmount: false,
// sets whether the billing information screen should be presented to the consumer
shouldAskForBillingInformation: true
}
// If you don't want to present the billing info screen to the consumer, set the address instead:
const cardAddress: JudoAddress = {
line1: 'My house',
line2: 'My street'
town: 'My town',
postCode: 'TR14 8PA',
countryCode: 382,
}
const judo: JudoConfiguration = {
judoId: '123456',
amount,
reference,
paymentMethods: JudoPaymentMethod.Card,
supportedCardNetworks: JudoCardNetwork.Visa,
uiConfiguration,
cardAddress,
// sets the value for challenge request indicator,
// possible values:
// ChallengeRequestIndicator.NoPreference
// ChallengeRequestIndicator.NoChallenge
// ChallengeRequestIndicator.ChallengePreferred
// ChallengeRequestIndicator.ChallengeAsMandate
challengeRequestIndicator: ChallengeRequestIndicator.ChallengeAsMandate,
// sets the value for SCA exemption,
// possible values:
// ScaExemption.LowValue
// ScaExemption.SecureCorporate
// ScaExemption.TrustedBeneficiary
// ScaExemption.TransactionRiskAnalysis
scaExemption: ScaExemption.LowValue,
// email address
emailAddress: '[email protected]',
// sets the maximum timeout for 3DS 2.0 transactions in minutes,
// always use 2 characters when setting the timeout
threeDSTwoMaxTimeout: 30,
// sets phone number country code
phoneCountryCode: '44',
// phone number
mobileNumber: '0799999999',
}
Customising the Payment Experience
Every transaction requires a JudoConfiguration object to be passed as a parameter. The JudoConfiguration object sets all the required parameters for configuring the payment flow, including all optional parameters to customise the payment experience.
To configure the payment flow:
Import:
JudoConfiguration
JudoAmount
JudoReference
from the judokit-react-native package:
import JudoPay, {
JudoConfiguration,
JudoAmount,
JudoReference
}
from 'judokit-react-native'
You can customise the payment experience for the consumer by configuring the following UI behaviour properties in the JudoUIConfiguration object:
The JudoUIConfiguration object allows you to:
Enable | disable the Address Verification Service
Enable | disable consumers entering the CVV/CV2 code
Show | hide the amount in the payment button
Show | hide the amount in the Payments Widget
Enable | disable consumers entering their billing information
Show | hide the transaction amount from the Payments Widget.
Default = True
shouldAskForBillingInformation
Boolean
Optional
Show | hide the billing information screen.
Default = False
theme
Object
Optional
Customise various elements of the payment screen.
For example:
bodyFont
bodySize
buttonColor
buttonTitleColor
The incremental authorisation feature allows you to increment the value of your original pre-authorisation for scenarios where you need to charge your customer a higher total amount.
By incrementing the pre-authorisation value, you will be able to capture the total amount that you wish to charge your customer when you are ready.
This feature is not available with all acquirers.
Check with our customer service team, or your account manager for your eligibility to use this.
The isAllowIncrement flag is a part of the main judo-configuration config object, and can be set directly in the configuration object.
Set theisAllowIncrement flag to true.
If present = it is automatically applied for preAuth requests.
If no value is provided = then false is set by default.
Example:
val configuration: JudoConfiguration = {
...
isAllowIncrement: true,
};
Each incremental authorisation generates its own receiptId.
If an authorisation has been incremented, any subsequent void request must reference the receiptId of the original pre-authorisation transaction.
Using the receiptId returned following an incremental authorisation will result in an error.
The void amount must be the sum of the original authorisation amount and all successful increments.
Any attempt to process a partial void, the sum of any but not all authorisations and increments, will result in an error.
For example:
Initial preAuth: £100
incrementalAuth request amount: £20
incrementalAuth request amount: £30
Total authorised amount after increments: £150
To void this transaction:
Use the receiptId of the Initial preAuth.
Submit a void request for £150.
To set up the transaction amount:
//From the imported JudoAmount interface:
interface JudoAmount {
value: string,
currency: string,
}
//Create a new variable that implements the JudoAmount interface
//Add the variable to the configuration object:
const amount: JudoAmount = {
value: '999.99',
currency: 'GBP'
}
To set the primary account details when using an alternative payment method, see Adding Payment Methods.
It is mandatory for merchants who have an MCC code of 6012, 6051 and 7299 to submit additional Information about the primary account holder in primaryAccountDetails property for payment pre-authorisation.
For the purpose of this exercise, Visa and MasterCard are set as the only supported card networks:
const cardNetworks = JudoCardNetwork.Visa | JudoCardNetwork.Mastercard
To explicitly set all card networks to be supported, instead of using the | operator to combine all the card networks, set:
const cardNetworks = JudoCardNetwork.All
To set the card address when using an alternative payment method, see Adding Payment Methods.
To send additional card address details with the transaction:
Set the cardAddress parameter in the JudoConfiguration object:
By default, all payment methods are displayed in the Payments Widget (as long as the required parameters are set).
As a merchant, you have flexibility over which payment methods to support.
Change the paymentMethods property to the JudoPaymentMethod value in the JudoConfiguration instance:
You can set multiple values using the | operator.
For the purpose of this exercise, Card and Apple Pay™ are set as available payment methods:
const myPaymentMethods = JudoPaymentMethod.Card | JudoPaymentMethod.ApplePay
To explicitly state all payment methods are to be displayed, instead of using the | operator to combine all the payment methods, set:
const myPaymentMethods = JudoPaymentMethod.All
You can:
Add any language you need.
Override some or all of the translations of an existing language.
The Judokit React Native SDK supports: en (default), fr, es.
For your React Native project (the wrapper for the Android and iOS SDKs), language translations can override the strings using the standard Android and iOS localisation processes.
Use Existing Translations
To use or test one of Judopay's default language transalations, simply change the language on your:
Android:
Settings → System → Language & input → Languages
iOS:
Settings → General → Language & Region → iPhone Language
The translation will be applied automatically.
Override Existing Translations
To override existing translations, follow the Android or iOS localisation modifying steps below:
Android
iOS
Identify the SDK String Keys.
The SDK uses string resources defined in its strings.xml file.
You can find the list of all String Keys below.
To modify the value of an existing string, add a new one with the same key to the strings.xml file in your Android project.
You will find this located in the "res/values directory".
This will override the SDK value of this string.
If your app supports multiple languages, ensure you add translations for the overridden string in the appropriate values <language_code> folders.
For example values-fr for French or values-es for Spanish.
Identify the SDK String Keys.
The SDK uses string resources defined in its Localizable.strings file.
You can find the list of all String Keys below.
To modify the value of an existing string, add a new one with the same key to the Localizable.strings file in your iOS project.
This will override the SDK value of this string,
If your app supports multiple languages, ensure you add translations for the overridden string in the corresponding .lproj directories.
For example: fr.lproj for French, es.lproj for Spanish.
Also, remember to declare any new language in "Project > Info > Localizations". This will ensure the translation is recognised by the framework.
To add a new language
To add a new language, follow the Android or iOS steps below:
Android
iOS
Identify the SDK String Keys and prepare the translations for all values in the language you wish to add or override.
You can find the list of all String Keys below.
In your app’s "res/values directory", create a new folder for the language you want to add.
Make sure you use the correct language and region codes, for example:
‘values-es’ for Spanish
‘values-zh-rCN’ for Simplified Chinese
Inside the new language folder, create a strings.xml file if one does not already exist.
Within the newly created strings.xml ensure you provide the translations for all String Keys used by the SDK, otherwise the translation may end up incomplete.
When overriding or adding new String Keys, be careful to avoid String Key conflicts between the SDK and your app.
Any matching Key will cause your app’s value to override the SDK's default value, which could potentially lead to unintended behaviour, or mismatched translations.
Identify the SDK String Keys and prepare the translations for all values in the language you wish to add or override.
You can find the list of all String Keys below.
In your app’s project directory, create a new .lproj folder for the language you want to add.
Ensure you use the correct language and region codes.
For example:
es.lproj for Spanish
zh-Hans.lproj for Simplified Chinese.
Inside the new language folder, create a Localizable.strings file if one does not already exist.
Within the newly created Localizable.strings file ensure you provide the translations for all String Keys used by the SDK, otherwise the translation may end up incomplete.
Declare the new language in: "Project > Info > Localizations".
This will ensure the translation is recognised by the framework.
When overriding or adding new String Keys, be careful to avoid String Key conflicts between the SDK and your app.
Any matching Key will cause your app’s value to override the SDK's default value, which could potentially lead to unintended behaviour, or mismatched translations.
String Keys
Android SDK String Keys
iOS SDK String Keys
<string name="add_address_line">Add address line (optional)</string>
<string name="add_card">Add card</string>
<string name="address_line_1_hint">Address line 1</string>
<string name="address_line_2_hint">Address line 2</string>
<string name="address_line_3_hint">Address line 3</string>
<string name="back">Back</string>
<string name="billing_details_title">Billing Details</string>
<string name="button_done">Done</string>
<string name="button_edit">Edit</string>
<string name="button_scan_card">Scan card</string>
<string name="cancel">Cancel</string>
<string name="ca_province_hint">Province or territory</string>
<string name="card_holder_hint">Cardholder Name</string>
<string name="card_holder_name_required">Cardholder Name is required</string>
<string name="card_holder_name_special_chars">Cardholder Name can't contain numbers or special characters</string>
<string name="card_holder_name_too_short">Cardholder Name can't be less than 4 characters</string>
<string name="card_number_hint">Card number</string>
<string name="card_subtitle">Ending</string>
<string name="cards">Cards</string>
<string name="check_amex_security_code">Check your CID</string>
<string name="check_card">Check Card</string>
<string name="check_card_number">Invalid card number</string>
<string name="check_china_union_pay_security_code">Check your CVN2</string>
<string name="check_cvv">Check your CVV</string>
<string name="check_expiry_date">Check expiry date</string>
<string name="check_jcb_security_code">Check your CAV2</string>
<string name="check_mastercard_security_code">Check your CVC2</string>
<string name="check_visa_security_code">Check your CVV2</string>
<string name="choose_payment_method">Choose a Payment Method</string>
<string name="city_hint">City</string>
<string name="close">Close</string>
<string name="connected_cards">Connected Cards</string>
<string name="continue_text">Continue</string>
<string name="country_canada">Canada</string>
<string name="country_hint">Country</string>
<string name="country_other">Other</string>
<string name="country_uk">UK</string>
<string name="country_usa">USA</string>
<string name="customize_card">Customise Card</string>
<string name="cvv_hint">CVV</string>
<string name="date_hint">MM/YY</string>
<string name="default_amex_card_title">My American Express Card</string>
<string name="default_chinaunionpay_card_title">My China Union Pay Card</string>
<string name="default_dinnersclub_card_title">My Diners Club Card</string>
<string name="default_discover_card_title">My Discover Card</string>
<string name="default_jcb_card_title">My JCB Card</string>
<string name="default_maestro_card_title">My Maestro Card</string>
<string name="default_mastercard_card_title">My MasterCard Card</string>
<string name="default_visa_card_title">My VISA Card</string>
<string name="delete">Delete</string>
<string name="delete_card_alert_message">Are you sure you want to delete this card from your wallet?</string>
<string name="delete_card_alert_title">Delete Card?</string>
<string name="dismiss">Dismiss</string>
<string name="email_hint">Email</string>
<string name="error_amex_not_supported">American Express is not supported</string>
<string name="error_card_title_too_long">Card Name cannot be longer than %1$d characters</string>
<string name="error_country_should_not_be_empty">Please select a country</string>
<string name="error_diners_club_not_supported">Diners Club is not supported</string>
<string name="error_discover_not_supported">Discover is not supported</string>
<string name="error_jcb_not_supported">JCB is not supported</string>
<string name="error_maestro_not_supported">Maestro is not supported</string>
<string name="error_mastercard_not_supported">Mastercard is not supported</string>
<string name="error_province_territory_should_not_be_empty">Please select a province or territory</string>
<string name="error_state_should_not_be_empty">Please select a state</string>
<string name="error_union_pay_not_supported">China UnionPay is not supported</string>
<string name="error_unknown_not_supported">Unknown Card Network is not supported</string>
<string name="error_visa_not_supported">Visa is not supported</string>
<string name="expire_soon">Expire soon</string>
<string name="expired">Expired</string>
<string name="invalid_address">Please enter a valid address</string>
<string name="invalid_city">Please enter a valid city</string>
<string name="invalid_email_address">Please enter a valid email</string>
<string name="invalid_mobile_number">Please enter a valid mobile number</string>
<string name="invalid_phone_country_code">Please enter a valid country code</string>
<string name="invalid_postcode">Invalid postcode entered</string>
<string name="invalid_zip_code">Invalid ZIP code entered</string>
<string name="is_expired">Is expired</string>
<string name="mobile_number_hint">Mobile number</string>
<string name="no">No</string>
<string name="no_cards_added">You didn’t add any cards yet. Add one right now or use any of the payment methods below</string>
<string name="no_connected_cards">You didn't connect any cards yet</string>
<string name="ok">Ok</string>
<string name="pay_amount">Pay %1$s</string>
<string name="pay_now">Pay Now</string>
<string name="phone_country_code_hint">+()</string>
<string name="post_code_hint">Postcode</string>
<string name="processing">Transaction pending…</string>
<string name="register_card">Register Card</string>
<string name="retry">Retry</string>
<string name="save">Save</string>
<string name="save_as_default_payment_method">Save as default payment method</string>
<string name="save_card">Save Card</string>
<string name="scan_card_confirm">Got it</string>
<string name="scan_card_go_to_settings">Go to Settings</string>
<string name="scan_card_no_permission_message">Permissions must be granted in order to use the scan card functionality. Please go to Settings and toggle Camera on</string>
<string name="scan_card_no_permission_title">Camera permissions not granted</string>
<string name="secure_checkout">Secure Checkout</string>
<string name="secure_server_transmission">Your card details are encrypted using TLS before transmission to our secure payment service provider.</string>
<string name="there_is_a_delay">This is taking longer than expected. Please wait…</string>
<string name="three_d_secure_check">3D Secure Check</string>
<string name="transaction_successful">Transaction success!</string>
<string name="transaction_unsuccessful">Transaction unsuccessful - please try again</string>
<string name="unable_to_process_request_error_title">Unable to process</string>
<string name="us_state_hint">State</string>
<string name="will_expire_soon">will expire soon</string>
<string name="yes">Yes</string>
<string name="you_will_pay">You will pay</string>
"add_card" = "Add card";
"apple_pay" = "Apple Pay";
"button_done" = "DONE";
"button_edit" = "Edit";
"button_scan_card" = "Scan card";
"button_add_address_line_card" = "+ Add address line (optional)";
"cancel" = "Cancel";
"back" = "Back";
"card_holder_email_hint" = "Email";
"card_holder_hint" = "Cardholder Name";
"card_holder_country_hint" = "Country";
"card_holder_state_hint" = "State";
"card_holder_province_hint" = "Province or territory";
"card_holder_phone_hint" = "Mobile number";
"card_holder_city_hint" = "City";
"card_holder_adress_line_hint" = "Address line";
"card_number_hint" = "Card Number";
"card_subtitle" = "Ending";
"cards" = "Cards";
"check_card" = "Check Card";
"check_expiry_date" = "Check expiry date";
"choose_payment_method" = "Choose a Payment Method";
"connected_cards" = "Connected cards";
"country_canada" = "Canada";
"country_other" = "Other";
"country_uk" = "UK";
"country_usa" = "USA";
"customize_card" = "Customise Card";
"default_amex_card_title" = "My American Express Card";
"default_chinaunionpay_card_title" = "My China Union Pay Card";
"default_dinersclub_card_title" = "My Diners Club Card";
"default_discover_card_title" = "My Discover Card";
"default_jcb_card_title" = "My JCB Card";
"default_maestro_card_title" = "My Maestro Card";
"default_mastercard_card_title" = "My MasterCard Card";
"default_visa_card_title" = "My VISA Card";
"delete" = "Delete";
"delete_card_alert_message" = "Are you sure you want to delete this card from your wallet?";
"delete_card_alert_title" = "Delete Card?";
"dismiss" = "Dismiss";
"error" = "Error";
"enter_card_title" = "Enter a card title...";
"error_card_title_too_long" = "Card Name cannot be longer than 28 characters";
"error_invalid_card_number_desc" = "Invalid card number";
"error_unsupported_card_desc" = " is not supported";
"expire_soon" = "Expire soon";
"expired" = "Expired";
"expiry_date" = "MM/YY";
"invalid_expiry_date_value" = "Invalid date value entered";
"invalid_email_value" = "Invalid email entered";
"invalid_phone_code_value" = "Invalid phone code entered";
"invalid_phone_value" = "Invalid phone entered";
"invalid_postcode" = "Invalid postcode entered";
"invalid_zip_code" = "Invalid ZIP code entered";
"invalid_email_address" = "Please enter a valid email";
"invalid_state_should_not_be_empty" = "Please select a state";
"invalid_province_territory_should_not_be_empty" = "Please select a province or territory";
"invalid_address" = "Please enter a valid address";
"invalid_mobile_number" = "Please enter a valid mobile number";
"invalid_city" = "Please enter a valid city";
"is_expired" = "Is expired";
"no_cards_added" = "You didn’t add any cards yet. Add one right now or use any of the payment methods below";
"no_connected_cards" = "You didn't connect any cards yet";
"ok" = "Ok";
"pay_amount" = "Pay %@";
"pay_now" = "Pay Now";
"continue" = "Continue";
"post_code_hint" = "Postcode";
"email_hint" = "Email";
"phone_country_code_hint" = "+()";
"mobile_number_hint" = "Mobile number";
"address_line_1_hint" = "Address line 1";
"address_line_2_hint" = "Address line 2";
"address_line_3_hint" = "Address line 3";
"city_hint" = "City";
"processing" = "Transaction pending...";
"register_card" = "Register Card";
"retry" = "Retry";
"save" = "Save";
"save_as_default_payment_method" = "Save as default payment method";
"save_card" = "Save Card";
"scan_card_confirm" = "Got it";
"scan_card_go_to_settings" = "Go to Settings";
"scan_card_hint_subtitle" = "We will do our best to scan it";
"scan_card_hint_title" = "Position card in this frame";
"scan_card_no_permission_message" = "Permissions must be granted in order to use the scan card functionality. Please go to Settings and toggle Camera on";
"scan_card_no_permission_title" = "Camera permissions not granted";
"scan_card_restricted_message" = "Scan camera functionality is not available due to restriction on your device";
"scan_card_restricted_title" = "Camera access restricted";
"scan_card_simulator_title" = "Camera not available on iOS simulators";
"secure_server_transmission" = "Your card details are encrypted using TLS before transmission to our secure payment service provider.";
"three_d_secure_check" = "3D Secure Check";
"transaction_delayed" = "This is taking longer than expected...";
"transaction_successful" = "Transaction success!";
"transaction_timeout" = "Transaction timed out!";
"transaction_unsuccessful" = "Card transaction unsuccessful - please try again";
"unknown_card_network" = "Unknown card network";
"will_expire_soon" = "It will expire soon";
"you_will_pay" = "You will pay";
"error_apple_pay_not_supported_desc" = "Apple Pay is not supported on this device.";
"error_apple_pay_not_supported_reason" = "An Apple Pay transaction was attempted on a device that either does not support, or does not have Apple Pay set up.";
"error_request_failed_desc" = "The request has failed or responded without data.";
"error_request_failed_reason" = "The transaction response returned without any data or there was an error while forming the request.";
"error_request_timeout_desc" = "The request has timed out.";
"error_request_timeout_reason" = "The request failed to complete in the allocated time frame.";
"error_json_serialization_desc" = "The response data could not be serialized into a JSON.";
"error_json_serialization_reason" = "The server responded with an invalid data format.";
"error_user_cancelled_desc" = "The transaction was cancelled by the user.";
"error_user_cancelled_reason" = "The user closed the transaction flow without completing the transaction.";
"error_internet_connection_desc" = "No internet connection found.";
"error_internet_connection_reason" = "The request could not be sent due to no internet connection.";
"error_invalid_card_number_reason" = "The number entered is not a valid card number or is not supported by the SDK.";
"error_unsupported_card_reason" = "The number entered belongs to a card network that is not allowed by the merchant.";
"error_response_parse_desc" = "Unexpected response format returned.";
"error_response_parse_reason" = "The response did not contain some of the required parameters needed to complete the transaction.";
"error_no_message_desc" = "The request has failed with no underlying message.";
"error_no_message_reason" = "The server responded with an error.";
"error_apple_pay_missing_items_desc" = "The Apple Pay configuration must have at least one payment item.";
"error_apple_pay_missing_items_reason" = "The Payment Items array of the Apple Pay configuration is either empty or missing.";
"error_apple_pay_missing_shipping_desc" = "The Apple Pay configuration must have at least one shipping method.";
"error_apple_pay_missing_shipping_reason" = "Shipping methods must be set if the required shipping contact fields are specified.";
"error_judo_id_missing_desc" = "The Judo ID parameter cannot be null or empty.";
"error_judo_id_missing_reason" = "The required Judo ID parameter has not been set in the Judo configuration.";
"error_invalid_judo_id_desc" = "The Judo ID entered is invalid.";
"error_invalid_judo_id_reason" = "The specified Judo ID parameter has an incorrect format.";
"error_currency_missing_desc" = "Currency cannot be null or empty.";
"error_currency_missing_reason" = "The required Currency parameter has not been set in the Judo configuration.";
"error_invalid_currency_desc" = "The specified currency code is not supported.";
"error_invalid_currency_reason" = "The currency code entered is either not a valid ISO 4217 code or is not supported by the SDK.";
"error_apple_pay_merchant_id_missing_desc" = "The Apple Pay merchant ID cannot be null or empty.";
"error_apple_pay_merchant_id_missing_reason" = "Apple Pay needs a valid merchant ID to be able to identify your transaction.";
"error_invalid_country_code_desc" = "The specified country code is not supported.";
"error_invalid_country_code_reason" = "The country code entered is either not a valid ISO 3166 2-letter code or is not supported by the SDK.";
"error_apple_pay_config_missing_desc" = "The Apple Pay transaction has not been configured.";
"error_apple_pay_config_missing_reason" = "No Apple Pay configuration was found in your Judo configuration object.";
"error_invalid_amount_desc" = "The amount specified should be a positive number.";
"error_invalid_amount_reason" = "The amount parameter has either not been set or has an incorrect format.";
"error_invalid_consumer_ref_desc" = "The consumer reference entered is invalid.";
"error_invalid_consumer_ref_reason" = "The consumer reference parameter has either not been set or has an incorrect format.";
"error_invalid_token_payment_transaction_type_desc" = "Token payments transactions only support JPTransactionTypePayment and JPTransactionTypePreAuth as the transaction type.";
"error_invalid_token_payment_transaction_type_reason" = "Invalid transaction type passed to token payment transaction configuration.";
"error_preauth_properties_conflict_desc" = "Both delayedAuthorisation and allowIncrement flags can't be set to true.";
"error_preauth_properties_conflict_reason" = "Preauth properties conflict";
"error_recommendation_server_prevented_transaction_desc" = "The recommendation server has prevented this transaction.";
"error_recommendation_server_prevented_transaction_reason" = "It appears that the transaction you attempted to make has been blocked by the recommendation server.";
"error_recommendation_server_request_failed_desc" = "There was an error when retrieving the recommendation response.";
"error_recommendation_server_request_failed_reason" = "We are unable to process this request as there was an error when retrieving the recommendation response.";
"error_recommendation_invalid_authorization_type_desc" = "Payment session is required for using the recommendation feature.";
"error_recommendation_invalid_authorization_type_reason" = "To use the recommendation feature, it is mandatory to have a payment session.";
"error_recommendation_invalid_URL_desc" = "The URL field in the recommendation configuration is required.";
"error_recommendation_invalid_URL_reason" = "It is mandatory to provide a URL in the recommendation configuration.";
"error_recommendation_invalid_rsa_public_key_desc" = "The RSAPublicKey field in the recommendation configuration is required.";
"error_recommendation_invalid_rsa_public_key_reason" = "It is mandatory to provide a RSAPublicKey in the recommendation configuration.";
"error_recommendation_invalid_timeout_desc" = "The timeout value provided in the recommendation configuration must be a number.";
"error_recommendation_invalid_timeout_reason" = "The timeout in the recommendation configuration should be an instance of NSNumber.";
"error_missing_recurring_description_desc" = "Recurring Payment description cannot be null";
"error_missing_recurring_description_reason" = "The required Recurring Payment parameter has not been set in the Apple Pay configuration.";
"error_missing_recurring_management_url_desc" = "Recurring Payment management URL cannot be null";
"error_missing_recurring_management_url_reason" = "The required Recurring Payment parameter has not been set in the Apple Pay configuration.";
"error_missing_recurring_regular_billing_desc" = "Recurring Payment regular billing cannot be null";
"error_missing_recurring_regular_billing_reason" = "The required Recurring Payment configuration sub-object is missing.";
"error_missing_recurring_amount_desc" = "Recurring Payment amount cannot be null";
"error_missing_recurring_amount_reason" = "The required Recurring Payment parameter has not been set in the Apple Pay configuration.";
"error_missing_recurring_label_desc" = "Recurring Payment label cannot be null";
"error_missing_recurring_label_reason" = "The required Recurring Payment parameter has not been set in the Apple Pay configuration.";
"continue_text" = "Continue";
"add_address_line" = "Add address line (optional)";
"billing_details_title" = "Billing Details";
"back" = "Back";
"card_holder_name_required" = "Cardholder Name is required";
"card_holder_name_too_short" = "Cardholder Name can't be less than 4 characters";
"card_holder_name_special_chars" = "Cardholder Name can't contain numbers or special characters";
"check_security_code" = "Check your ";
To make custom fonts work, they must be added to your client app first.
Styling
The JudoTheme property handles the:
Font families
Font sizes
Font colors
Please note this will only apply styles and themes to the iOS platform.
Setting up the transaction reference enables you to also set up your consumerReference and paymentReference which are included within the transaction.
These references help you to identify your consumer and transaction.
The last item in the JudoPaymentSummaryItem list must always represent the total amount of the previous items.
Apple Pay™ Recurring Payments
Judopay provides support for Apple Pay™ recurring payments.
This feature enables merchants to utilise the Apple Pay™ recurring payment token, by also being able to use the token for Merchant-Initiated Transactions (MITs).
The Apple Pay™ recurring payment token is generated by Apple Pay's servers and sent to Judopay, where it is securely stored.
In return, you will receive a Judopay token that is linked to the stored Apple Pay™ token.
This Judopay token can then be used for future MITs. For more information on MITs, see Merchant Initiated Transactions.
You are responsible for initiating Merchant-Initiated Transactions.
Setting up the Apple Pay™ Transaction for Recurring Payments
To use the Apple Pay™ recurring payments feature, begin with an initial Apple Pay™ transaction with these additional steps:
Attach the recurring payment configuration object recurringPaymentRequest to your applePayConfiguration set in Step One.
// Create a regular billing item
const regularBilling: JudoRecurringPaymentSummaryItem = {
label: "Premium Music Subscription",
amount: "9.99",
intervalUnit: JudoCalendarUnit.Month,
intervalCount: 1
};
// Create the Recurring Payment Request configuration object
const managementURL = "https://example.com/manage-subscription";
const request: JudoRecurringPaymentRequest = {
paymentDescription: "Monthly subscription for Premium Music Service",
managementURL: managementURL,
regularBilling: regularBilling,
billingAgreement: "By subscribing, you agree to monthly billing of £9.99 for the Music Service until canceled."
};
// Assign the recurring payment request to the Apple Pay configuration (if not done already on Apple Pay Configuration initialization)
applePayConfiguration.recurringPaymentRequest = request;
JudoRecurringPaymentRequest
Name
Type
Description
paymentDescription
string
(non null / required)
Provide a description of the recurring payment.
This will be displayed in the payment sheet to the consumer.
The regular billing cycle for the recurring payment.
Includes:
start date
end date
an interval
an interval count
managementUrl
string
(non null / required)
A URL to a web page where the consumer can update or delete the payment method for the recurring payment.
Note: It is best practice to use a universal link for this URL.
The same link can direct the consumer to either a page in the app (if the app is installed), or to a page on the merchant’s website.
For more information on adopting universal links, see Universal links.
billingAgreement
string
(nullable / optional)
Maximum string length = 500 characters.
A localised billing agreement.
This agreement is displayed via the payment sheet to the consumer before they authorise the payment.
Note: This string can include information on:
the recurring payment amount
recurring intervals
other payment conditions
information on how the consumer can cancel payments
This string is not intended to replace any payment terms that you provide outside of the Apple Pay™ payment sheet.
The Apple Pay™ payment sheet displays the text of the billingAgreement string.
For long billingAgreement strings that can not fit on the payment sheet, these will appear truncated with an ellipsis.
Consumers can select the Billing Details on the payment sheet to read the full text.
JudoRecurringPaymentSummaryItem
Name
Type
Description
label
string
(non null / required)
A short, localised description of the item.
Note: Provide the label in title case.
For example:
VAT Tax
Gift Wrap and Card
Discount
Ensure you omit any punctuation and whitespace after the label.
The label is formatted for display by the framework.
amount
string
(non null / required)
The amount of the summary item.
To specify the currency, set a value for the currency property on the Apple Pay configuration object.
intervalUnit
JudoCalendarUnit
(nullable / optional)
The amount of time in calendar units that represents a fraction of the total payment interval.
The supported JudoCalendarUnit intervalUnits are:
minute
hour
day
month
year
intervalCount
number
(nullable / optional)
The number of interval units that make up the total payment interval.
Note: The default value for the interval count is 1.
startDate
string
(nullable / optional)
The date of the first payment.
Formatted as ISO 8601 string:
"2025-01-17T14:35:22.123Z
The default value is nil which requests the first payment as part of the initial transaction.
endDate
string
(nullable / optional)
The date of the final payment.
The default value is nil which specifies no end date.
The above configuration object property descriptions are extracts from the Apple developer documentation.
For a full description on all the object properties, see the Apple Pay Documentation.
2. To initiate a series of scheduled / recurring payments, set the initialRecurringPayment flag in the Judopay configuration object to true.
let configuration = {} as JudoConfiguration;
(...)
configuration = {
...configuration,
isInitialRecurringPayment: true,
};
If you plan to use the Judopay token for unscheduled / Ad Hoc MIT transaction(s) in the future, leave the initialRecurringPayment flag = false (default).
Prerequisite
You have set up your Google Pay™ payments profile.