PayPal
PayPal is currently in BETA.
PayPal is a popular eWallet, whereby their users are able to send and receive money using funds directly from their wallet and/or from their credit/debit card.
Link your existing PayPal account to Judopay, to enable an easy integration of PayPal alongside other payment methods. Reconcile your PayPal payments within the Judopay Portal.
Integrate PayPal using our Web SDK.
Integrating PayPal (BETA)
Contact Developer Support to link your production PayPal account to your Judopay account.
Currently, you are only able to link your production PayPal account.
For more details on testing, contact Developer Support.
Prerequisites
Make sure you are using Web SDK Version 0.0.18 (or higher).
Make sure you have implemented the following prerequisites:
-
From the Web SDK integration guide, you have completed the following:
The payment form iFrame must be loaded onto the page in order for payments to work. However displaying the form to the consumer is not required for this transaction type.
To hide the payment form iFrame, use:
<div id="payment-iframe" style="position:absolute;width:0;height:0;border:0;"></div>
To automatically receive non-breaking changes, you can pin to the minor version (0.0) rather than the current patch version (0.0.31).
Step One: Display the PayPal Button
Currently /payments
(immediate capture) is supported when implementing PayPal via the Web SDK.
Make sure the following parameters are the same values as those entered in Step One: Create a paymentSession, otherwise the transaction will fail:
-
merchantPaymentReference
-
merchantConsumerReference
-
JudoID
-
Currency
-
Amount
This is used to cross reference the validity of the transaction.
Your backend server should store the paymentSession response reference returned by Judopay's API. Use this reference from the response to populate yourPaymentSession.
-
Make sure you replace the payPalConfiguration object values with your own:
When the PayPal button is clicked, the Web SDK will call the method to make the transaction.
For more information on the PayPal button, see Button Render Options.
See below for more details on the parameters that create the payPalConfiguration object:

Parameter |
Description |
---|---|
style String Optional |
Set the style for the PayPal button. For a full list of styling options, see Styling. |
merchantId String Optional |
Your PayPal Merchant ID. To get your PayPal Merchant ID: Navigate to your PayPal Account Settings -> Business Information -> PayPal Merchant ID:
|
amount Float Required |
The amount to process. Format:
For currencies using a different structure please contact Judopay for support. |
currency String Required |
The currency of the transaction. Any ISO 4217 alphabetic currency code:
|
merchantPaymentReference String Required |
Your unique reference for this payment. Format:
This value should be unique in order to protect your customers against duplicate transactions. If you set this reference it will be used. Otherwise a reference will be internally generated. |
judoId String Required |
Unique ID supplied by Judopay.Specific to a merchant and/or location. Format:
|
dynamicDescriptor String Optional |
The merchant’s ‘Trading Name’ that will appear on the consumer’s statement. The value is returned in the response within the appearsOnStatement field. Format:
|
paymentSession String Required |
The additional way to authenticate a 3D Secure 2 payments or preauths transaction. For more information on how to create a paymentSession, see .Option One - Create PaymentSession |
consumer Object Required |
Consumer details:
|
billingAddress Object Optional |
Billing address details:
|
shippingAddress Object Optional |
Shipping address details:
|
onSuccess Object Required |
Callback invoked when the payment is successful. The response object is provided as a parameter, with the following properties:
|
onError Object Required |
Callback invoked when the payment fails. The error object is provided as a parameter. |
Step Two: Handle the Response
Once the authorisation is complete you will receive either:
-
A JSON object response (a Judopay receipt object)
For more information and schema on the JSON object, see API Transaction Response.
-
An error object
For more information on error responses returned, see Web SDK Error Responses.
The consumer should be redirected to the outcome screen and the response/error should be handled accordingly.
For example, if the result = SUCCESS redirect the consumer to the Success Page, else ERROR.
For more information on the response codes, see Codes.