Judopay Documentation

Web Payments

With our Web Payments solution, a minimal integration is all that is required to enable you to take a payment. When your consumer clicks the Pay button, they are re-directed to Judopay's hosted payments page.

Integrate Web Payments on your website to:

  • Minimise your PCI scope

  • Allow for a seamless consumer journey by customising your UI with:

    • Company Logo

    • Button Colours

    • Company Name

Web Payments - Version 2 (BETA)

New payment methods have been added to Judopay's hosted payments page.

You can enable alternative payment methods, as well as offering consumers the traditional pay with card payment method.

There is no additional integration required, just contact customer support to enable this for you.

For more details, see Web Payments - Version 2.

Web Payments Flow Diagram

WP_NewFlow.png

Web Payments Set Up

Caution

Web Payments is not the same as using the Web SDK.

Enable Web Payments Configuration

Note

Web Payments do not apply for Mobile and your Server Side or Mobile only integrations.

web payments configuration

Step

Description

One.png

From the side menu, select Your apps.

Select the app you wish to edit. For the purpose of this exercise, Document Testing App is selected.

This configuration is to be set up for each of your web payments apps.

Two.png

Select Web payments configuration.

Three.png

The Web payments configuration screen appears.

Four.png

Select the Enable Web payments (hosted redirect web payment) tickbox

Specify the Success and Failure URLs.

 

(Depending on the transaction result, this is where the consumer will be redirected once the transaction process is completed).

Five.png

Click Save configuration.

Tip

Success and Failure URLs should be configured using the https protocol.

This will prevent the browser’s pop-up messages warning the consumer of insecure connectivity.

To set permissions for your web app, see Edit App Permissions.

To test your web payment integration:

Web Payments - Version 2

Warning

This feature is currently in BETA.

New payment methods have been added to Judopay's hosted payments page. You can enable alternative payment methods, as well as offering consumers the traditional pay with card payment method.

There is no additional integration required, just contact customer support to enable this for you.

An example of the payment methods you can offer to your consumers:

WP_Flow1.png

Web Payments - Consumer Payment Flow

The consumer's payment flow within Judopay's hosted payments page:

WP_Flow_Non_threeDS.png

Step

Description

One.png

The consumer is re-directed to the hosted payments page.

The amount to pay is displayed, including all available payment methods.

Two.png

For the purpose of this exercise, Pay with card is selected.

Three.png

The Pay with card screen appears.

Four.png

The consumer enters their card details.

Five.png

Tap Continue.

Six.png

The Payment Successful screen appears.

The transaction information is displayed.

Web Payments - Transaction Request

To create a transaction request:

Request:

https://api-sandbox.judopay.com/webpayments/payments

HTTP Method: POST

--header 'Api-Version: 6.4' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--data-raw '{  
       "judoId":"100016172",
       "amount": 125.00,
       "currency": "GBP",
        "yourConsumerReference": "example_customer_reference_00001",
        "yourPaymentReference": "example_payment_reference_00001",
        "yourPaymentMetaData":{
            "invoiceNumber": "000546" ,
            "customerNumber": "ABC123456"
                },
        "primaryAccountDetails": { 
  	    "Name": "Smith",
  	    "AccountNumber": "9999999",
  	    "DateOfBirth": "1989-09-19",
  	    "PostCode": "NW1 1UE"
  },
    "clientIpAddress": "127.0.0.1",
    "clientUserAgent": "example browser 5.25"
}

For more information on the message request structure, see our API documentation Request Message Structure.

Response Reference - Version 1

Retrieve Judopay’s API response:

"postUrl": "https://pay.judopay-sandbox.com/v1",
"reference": "yth67_82nhjmf903jnmaiine…"

Caution

The reference example has an expiration time of 30 minutes.

If the transaction is not completed within this time, the transaction will Fail and the status = Expired.

Response Reference - Version 2

Retrieve Judopay’s API response:

"postUrl": "https://pay.judopay-sandbox.com/v2", 
    "reference": "yth67_82nhjmf903jnmaiine…" 

Caution

The reference example has an expiration time of 30 minutes.

If the transaction is not completed within this time, the transaction will Fail and the status = Expired.

Check Transaction Results and Receipts

Caution

Do not confuse reference with yourPaymentReference

  • Reference: push and pull information with our API. 

  • yourPaymentReference: a variable to track the transaction.

To check the transaction result, send a request to our API using the Reference from Judopay's response:

https://api-sandbox.judopay.com/webpayments/payments/{reference}

HTTP Method: GET

You will receive the following transaction receipt information:

{
    "amount": 1.01,
    "cardAddress": {
    "countryCode": 826
            },
                "clientIpAddress": "127.0.0.1",
                "clientUserAgent": "Mozilla/5.0 (Windows NT 6.2; Win64; x64)...",
                "companyName": "trading",
                "currency": "GBP",
                "expiryDate": "2015-11-13T14:47:52.1183+00:00",
                "judoId": "100337815",
                "partnerServiceFee": 1.01,
                "paymentCancelUrl": "http://www.marca.com/",
                "paymentSuccessUrl": "http://www.20minutos.es/",
                "reference": "3wcAAAsAAAANAAAADgAAAJ_C3aHop-cZcb5PTdUGOH8ceQ1_wn8fP46UmY_CWYMZ8jcUgA",
    "allowedCardTypes": [
                1,
                2,
                3,
                8,
                10,
                11,
                12,
                13
                        ],
    "response": {
        "postUrl": "https://pay.judopay-sandbox.com/v1",
        "reference": "3wcAAAsAAAANAAAADgAAAJ_C3aHop-cZcb5PTdUGOH8ceQ1_wn8fP46UmY_CWYMZ8jcUgA"
            },
    "status": "Expired",
    "transactionType": "SALE",
    "yourConsumerReference": "001",
    "yourPaymentMetaData": {},
    "yourPaymentReference": "003",
    "webPaymentOperation": 0
}

We recommend displaying the following order information on your receipt screen:

  • Date and Time

  • Amount

  • Result (Success or Failure message)

  • appearsOnStatementAs (This will appear on your card statement as ….)

Web Payments - PreAuth Transaction Request

Use webpayments/preauths to reserve funds on a consumer's account.

Preauths will postpone the completion of the transaction until the goods have been delivered or the service fulfilled.

To create a preauth request:

Request:

https://api-sandbox.judopay.com/webpayments/preauths

HTTP Method: POST

{  
    "judoId":"958389",
    "amount":1.01,
    "yourConsumerReference":"JudoTest?0000771",
    "yourPaymentReference":"{{$guid}}",
    "currency":"GBP"
}

Response Reference - Version 1

Retrieve Judopay’s API response:

{
    "payByLinkUrl": "https://pay.karatepay.com/KDyPdg",
    "postUrl": "https://pay.karatepay.com/v1",
    "reference": "5QcAAAEAAAAbAAAAEAAAAHZVMqgikR_bu-hMzNlt8pHULA3kxJaF9-pulnDlTfvKusklaQ"
}

Response Reference - Version 2

Retrieve Judopay's API response:

{
    "payByLinkUrl": "https://pay.karatepay.com/KDyPdg",
    "postUrl": "https://pay.karatepay.com/v1",
    "reference": "5QcAAAEAAAAbAAAAEAAAAHZVMqgikR_bu-hMzNlt8pHULA3kxJaF9-pulnDlTfvKusklaQ"
}

Web Payments - CheckCard Request

Caution

Checkcard is supported for Web Payments Version 2.

Use webpayments/checkcard to verify your consumer's card, without having to reserve funds on their account.

The checkcard request will perform a zero amount pre-authorisation (0 Auth).

To create a checkcard request:

Request:

https://api-sandbox.judopay.com/webpayments/checkcard

HTTP Method: POST

{  
    "judoId":"100915867",
    "yourConsumerReference":"JudoTest?0000771",
    "yourPaymentReference":"{{$guid}}",
    "currency":"GBP"
}

Response Reference

Retrieve Judopay’s API response:

{
    "payByLinkUrl": "https://pay.karatepay.com/6Mzl12",
    "postUrl": "https://pay.karatepay.com/v1",
    "reference": "5QcAAAEAAAAbAAAACgAAAG3IH373lp7Kmcf2al4FS_fGOiPofUf_sPGgxUwDjQQCpqihcg"
}