RESTful API

Our RESTful API is the core of our payment processing platform – it powers our mobile SDKs and makes it easy for you to integrate payments into your app's back-office or administrative system.

This reference covers using the raw RESTful API, if you want to integrate Judopay into your app we recommend using our SDKs rather than creating your own REST client from scratch.

Environment management

All the elements and examples listed in this table are built pointing to the sandbox environment. This environment allows you to process test transactions while developing your app. Check our testing sandbox environment guide for further detail.

Note: Please note only sandbox API tokens and test cards will work only in the sandbox. Check our Dashboard guide if you don't know where to find them.

In case you are ready to go live, delete the ‘-sandbox’ from the reference and use your live token and secret. Access to your live credentials by following our Access to your token and secret guide and attend the best live environment practices for your reference.

https://gw1.judopay.com/

Table of content

POST GET
Card payment List of all transactions
Pre-authorization List individual transactions
Register a card Filtered list of transactions
Token payment  
Token pre-authorization  
Collection  
Refund  
Void  
Validate a payment  
Save Card  

Register a card

POST · Register a card to be stored for future transactions. See Register a card for a full description.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/registercard
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/registercard
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '
{
  "yourConsumerReference": "5678849",
  "yourPaymentReference": "9908865755",
  "cardNumber": "4976000000003436",
  "expiryDate": "12/20",
  "cv2": "452",
  "amount": 1.01,
  "currency": "GBP",
  "judoId": "1234-5678",
  "yourPaymentMetaData": {},
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The JSON returned upon successful processing of a card transaction contains all the information the Consumer might need to see about their transactions.

Status code: 200
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set.

Example : >
{
    "receiptId": "2463768",
    "yourPaymentReference": "Judo_RegisterCardPreAuth_635847291992565525",
    "type": "PreAuth",
    "createdAt": "2015-12-03T08:46:39.3935+00:00",
    "result": "Success",
    "message": "AuthCode: 740265",
    "judoId": 100337815,
    "merchantName": "trading",
    "appearsOnStatementAs": "trading                  ",
    "originalAmount": "1.01",
    "amountCollected": "0.00",
    "netAmount": "1.01",
    "amount": "1.01",
    "currency": "GBP",
    "cardDetails": {
        "cardLastfour": "3436",
        "endDate": "1215",
        "cardToken": "dTIgjPaZxW6FvIb0DsmXRX3aLMJ42Ghp",
        "cardType": 1
    },
    "consumer": {
        "consumerToken": "OMr6neBdzDvcBJGt",
        "yourConsumerReference": "5678849"
    },
    "risks": {
        "postCodeCheck": "UNKNOWN"
    }
}

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Card payment

POST · Charge a card using a card’s full details (16-digit card number, expiry date and CV2). See Card payments for a full description.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/payments
API-Version: 5.2
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/payments
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret

-d '{
  "yourConsumerReference": "consumer0053252",
  "yourPaymentReference": "payment12412312",
  "yourPaymentMetaData": {},
  "judoId": "1234-4567",
  "amount": 12.34,
  "cardNumber": "4976000000003436",
  "expiryDate": "12/20",
  "cv2": "452",
  "currency": "GBP",
  "cardAddress": {
    "line1": "242 Acklam Road",
    "line2": "Westbourne Park",
    "line3": "",
    "town": "London",
    "postCode": "W10 5JJ"
  },
  "consumerLocation": {
    "latitude": 51.5214541344954,
    "longitude": -0.203098409696038
  },
  "mobileNumber": "07100000000",
  "emailAddress": "cardholder@test.com"
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The Judopay API returns a response with the HTTP status code 200 (OK) when we've been able to successfully parse the payment request and have passed it to the consumer's bank for processing. You should check the "result" property in the response JSON document to determine the outcome of the payment. This JSON document contains all the information about this transaction you and your consumer might need.

If the transaction was successful we'll also include a cardToken value within the cardDetails object. This can be saved along with the consumer token and used later to process additional payments against the consumer's card. You should treat these tokens as sensitive data, and store them securely.

It's recommended that for any result, you record the receiptId value. This will make reconciling your orders and payments easier later.

Status code: 200

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set

Example : >
{
  "receiptId": "532555334",
  "yourPaymentReference": "payment12412312",
  "type": "Payment",
  "createdAt": "2012-12-05T14:40:53.4529+00:00",
  "result": "Success",
  "message": "Payment was successful",
  "judoId": "123-456",
  "merchantName": "AnyMerchant Ltd",
  "appearsOnStatementAs": "Judo Payments/AnyMerch",
  "amount": 12.34,
  "netAmount": 12.34,
  "currency": "GBP",
  "yourPaymentMetaData": {
    "any": "value"
  },
  "cardDetails": {
    "cardLastFour": "3436",
    "endDate": "12/15",
    "cardToken": "ax035fds95325df3",
    "cardType": 1
  },
  "consumer": {
    "consumerToken": "abcdefghijklABCDDEF",
    "yourConsumerReference": "consumer0053252"
  },
}

JSON Reference : >

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however the Judopay API returns a JSON document detailing any detected problems.

Status code: 400

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

    
Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Token payment

POST · Charge a card using a stored card and a consumer token. See Repeat card payments for a full description.

Note: When performing token payment, the Consumer Reference has to be the same used when the card token was originally created. See our API reference for more information.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/payments 
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/payments
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret

{
  "yourConsumerReference": "consumer0053252",
  "yourPaymentReference": "payment12412312",
  "yourPaymentMetaData": {
    "any": "value"
  },
  "judoId": "123-456",
  "amount": 12.34,
  "consumerToken": "3UW4DV9wI0oKkMFS",
  "cardToken": "SXw4hnv1vJuEujQR",
  "cv2": "452",
  "currency": "GBP",
  "consumerLocation": {
    "latitude": 51.5214541344954,
    "longitude": -0.203098409696038
  },
  "mobileNumber": "07100000000",
  "emailAddress": "cardholder@test.com"
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Headers

The JSON returned upon successful processing of a card transaction contains all the information the Consumer might need to see about their transactions.If the transaction was successful then a cardToken will be returned within the nested cardDetails object.

The Consumer and Card Tokens and the information within the card details object can be securely stored on your own systems if you wish to use this card for future payments. This means the Consumer will not need to re-enter their entire card details for future payments in your application. Using tokenized data to process payments decreases your PCI compliancy obligations.

Status code: 200
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set

Example : >
{
    "receiptId": "532555334",
    "yourPaymentReference": "payment12412312",
    "type": "Payment",
    "createdAt": "2012-12-05T14:40:53.4529+00:00",
    "result": "Success",
    "message": "Payment was successful",
    "judoId": "123-456",
    "merchantName": "AnyMerchant Ltd",
    "appearsOnStatementAs": "Judo Payments/AnyMerch",
    "amount": 12.34,
    "netAmount": 12.34,
    "currency": "GBP",
    "yourPaymentMetaData": {
    "any": "value"
    },
    "cardDetails": {
        "cardLastFour": "3436",
        "endDate": "12/15",
        "cardToken": "SXw4hnv1vJuEujQR",
        "cardType": 1
    },
    "consumer": {
        "consumerToken": "3UW4DV9wI0oKkMFS",
        "yourConsumerReference": "consumer0053252"
    },
}

For JSON reference, please see: API reference · Response fields

For JSON reference, please see: API reference · Response fields

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however the judoPay API returns a JSON document detailing any detected problems.

Status code: 400

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Pre-authorization

POST · Reserve funds on a card. See Reserve and collect funds for a full description.

Note: If a pre-authorization is not collected, it will expire within the next three days, releasing the reserved funds for that particular transaction.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/preauths 
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/preauths
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '{
    "yourConsumerReference": "consumer0053252",
    "yourPaymentReference": "payment12412312",
    "yourPaymentMetaData": {
        "any": "value"
    },
    "judoId": "123-456",
    "amount": 12.34,
    "cardNumber": "4976000000003436",
    "expiryDate": "12/20",
    "cv2": "452",
    "currency": "GBP",
    "cardAddress": {
        "line1": "242 Acklam Road",
        "line2": "Westbourne Park",
        "line3": "",
        "town": "London",
        "postCode": "W10 5JJ"
    },
    "consumerLocation": {
        "latitude": 51.5214541344954,
        "longitude": -0.203098409696038
    },
    "mobileNumber": "07100000000",
    "emailAddress": "cardholder@test.com"
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The JSON returned upon successful processing of a card transaction contains all the information the Consumer might need to see about their transactions. If the transaction was successful then a cardToken will be returned within the nested cardDetails object.

If you wish to process future payments on the Consumer's card you should capture the Consumer and Card Tokens from the response and store these securely on your user's device. This means your Consumer will not need to re-enter their entire card details for future payments in your application. This also means you do not have to worry about any PCI compliance issues.

Status code: 200

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Example : >
{
    "receiptId": "532555334",
    "yourPaymentReference": "payment12412312",
    "type": "PreAuth",
    "createdAt": "2012-12-05T14:40:53.4529+00:00",
    "result": "Success",
    "message": "Payment was successful",
    "judoId": "123-456",
    "merchantName": "AnyMerchant Ltd",
    "appearsOnStatementAs": "Judo Payments/AnyMerch",
    "refunds": 5.23,
    "amount": 12.34,
    "netAmount": 12.34,
    "currency": "GBP",
    "yourPaymentMetaData": {
        "any": "value"
    },
    "cardDetails": {
        "cardLastFour": "3436",
        "endDate": "12/15",
        "cardToken": "ax035fds95325df3",
        "cardType": 1
    },
    "consumer": {
        "consumerToken": "abcdefghijklABCDDEF",
        "yourConsumerReference": "consumer0053252"
    },
    "amountCollected": 0.00
}

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Token pre-authorization

POST · Reserve funds on a card with a stored card token and a consumer token. See Reserve and collect funds for a full description.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/preauths 
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/preauths
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '
{
    "yourConsumerReference": "consumer0053252",
    "yourPaymentReference": "payment12412312",
    "yourPaymentMetaData": {
        "any": "value"
    },
    "judoId": "123-456",
    "amount": 53.31,
    "consumerToken": "3UW4DV9wI0oKkMFS",
    "cardToken": "SXw4hnv1vJuEujQR",
    "cv2": "452",
    "currency": "GBP",
    "consumerLocation": {
        "latitude": 51.5214541344954,
        "longitude": -0.203098409696038
    },
    "mobileNumber": "07100000000",
    "emailAddress": "cardholder@test.com"
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The JSON returned upon successful processing of a card transaction contains all the information the Consumer might need to see about their transactions.If the transaction was successful then a cardToken will be returned within the nested cardDetails object.

The Consumer and Card Tokens and the information within the card details object can be securely stored on your own systems if you wish to use this card for future payments. This means the Consumer will not need to re-enter their entire card details for future payments in your application. Using tokenized data to process payments decreases your PCI compliancy obligations.

Status code: 200
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Example : >
{
  "receiptId": "532555334",
  "yourPaymentReference": "payment12412312",
  "type": "PreAuth",
  "createdAt": "2012-12-05T14:40:53.4529+00:00",
  "result": "Success",
  "message": "Payment was successful",
  "judoId": "123-456",
  "merchantName": "AnyMerchant Ltd",
  "appearsOnStatementAs": "Judo Payments/AnyMerch",
  "amountCollected": 0.00,
  "amount": 53.31,
  "netAmount": 53.31,
  "currency": "GBP",
  "yourPaymentMetaData": {
    "any": "value"
  },
  "cardDetails": {
    "cardLastFour": "3436",
    "endDate": "12/15",
    "cardToken": "ax035fds95325df3",
    "cardType": 1
  },
  "consumer": {
    "consumerToken": "abcdefghijklABCDDEF",
    "yourConsumerReference": "consumer0053252"
  },
}

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Collection

POST ·To collect the funds you’ve previously reserved with a pre-authorization. See Reserve and collect funds for a full description.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/collections
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/collections
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '
{
"receiptId": "654865", "amount": 12.34, "yourPaymentReference": "payment12412312"
}

For JSON reference, please see: API reference · Request fields

Response

OK (200)

HTTP Header

The JSON returned upon successful processing of a card transaction contains all the information the Consumer might need to see about their transactions.

Status code: 200
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set.

Example : >
{
  "receiptId": "532555334",
  "yourPaymentReference": "payment12412312",
  "type": "Collection",
  "createdAt": "2012-12-05T14:40:53.4529+00:00",
  "result": "Success",
  "message": "Payment was successful",
  "judoId": "123-456",
  "merchantName": "AnyMerchant Ltd",
  "appearsOnStatementAs": "Judo Payments/AnyMerch",
  "amount": 12.34,
  "netAmount": 12.34,
  "currency": "GBP",
  "originalReceiptId": "43121212",
  "cardDetails": {
    "cardLastFour": "3436",
    "endDate": "12/15",
    "cardToken": "ax035fds95325df3",
    "cardType": 1
  },
  "consumer": {
    "consumerToken": "abcdefghijklABCDDEF",
    "yourConsumerReference": "consumer0053252"
  },
}

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Refund

POST · Process a full or partial refund to the customer. See Refunds for a full description.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/refunds 
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring}

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/refunds
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '
{
  "receiptId": "1234",
  "amount": 12.34,
  "yourPaymentReference": "payment12412312"
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The JSON returned a verification or an error in the request / process related with the refund of a particular transaction, with all the information about the payment.

Example : >
{
  "receiptId": "2830586",
  "originalReceiptId": "2830560",
  "yourPaymentReference": "002",
  "type": "Refund",
  "createdAt": "2016-02-05T08:32:51.4933+00:00",
  "result": "Success",
  "message": "Refund successful",
  "judoId": 100337815,
  "merchantName": "Test limited",
  "appearsOnStatementAs": "Test limited",
  "originalAmount": "10.01",
  "netAmount": "0.00",
  "amount": "10.01",
  "currency": "GBP",
  "cardDetails": {
  "cardLastfour": "3436",
  "endDate": "1220",
  "cardToken": "mkmpb7wGfBu07kRWyD95DTh0gsAeeyz7",
  "cardType": 1
  },
  "consumer": {
    "consumerToken": "Z81657QmOEZk88kZ",
    "yourConsumerReference": "001"
  }
}

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8 
Expires: -1
Content-Length: X

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Void

POST · Void a pre-authorization or a card registration. See Void transactions for a full description.

Note: Not all the banks support voiding transactions.

Request

Request

HTTP Header

POST https://gw1.judopay-sandbox.com/transactions/voids
API-Version: 5.2 
Accept: application/json 
Authorization: Basic {authstring} 

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X POST https://gw1.judopay-sandbox.com/transactions/voids
-H "API-Version: 5.2" 
-H "Content-Type: application/json"
-u Token:Secret
-d '
{
 "yourPaymentReference": "Judo_RegisterCardPreAuth_635899459370802132",
 "yourPaymentMetaData" : "",
 "judoId": "100337815",
 "amount": 1.01,
 "ReceiptId": 2805752,
 "currency": "GBP",
}

For JSON reference, please see: API reference · Request fields.

Response

OK (200)

HTTP Header

The JSON returned a verification or an error in the request / process related with the void of a particular pre-authorization or register card method, with all the information about the payment.

Example : >
{
   "receiptId": "2805760",
   "originalReceiptId": "2805752",
   "yourPaymentReference": "Judo_RegisterCardPreAuth_635899459370802132",
   "type": "VOID",
   "createdAt": "2016-02-01T17:53:14.4929+00:00",
   "result": "Success",
   "message": "Void successful",
   "judoId": 100337815,
   "merchantName": "trading",
   "appearsOnStatementAs": "trading ",
   "originalAmount": "1.01",
   "amountCollected": "0.00",
   "netAmount": "1.01",
   "amount": "1.01",
   "currency": "GBP",
   "cardDetails": {
     "cardLastfour": "3436",
     "endDate": "1220",
     "cardToken": "xJKN0vvyKg5vuDnacCzFLBvTK25VezHC",
     "cardType": 1
   },
   "consumer": {
     "consumerToken": "eWKhuJxBccgItx1B",
     "yourConsumerReference": "10DF4FB9-3A32-4461-A7C7-5E3CE45389A5"
   }
}
JSON Reference : >

For JSON reference, please see: API reference · Response fields.

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however they all return an error document as below detailing the cause of the problem.

Status code: 400
Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
 "errorMessage": "The original transaction has already been voided.",
 "errorType": 9,
 "modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: X

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Validate a payment

POST · If you need to check a payment before actually processing it you can POST the payment to ‘‘/transactions/payments/validate’’. We'll perform our internal checks on the payment without sending it to the customer’s bank.

We check that the merchant identified by the Judo ID can accept the payment, that the card can be accepted and that the card number passes the LUHN check. The request format for the validation is exactly the same as making a card payment.

The request format for the validation is exactly the same as making a card payment.

Note: We can only check the card payment against our own systems. Your payment may still be declined by your consumer's issuing bank.

List of all transactions

GET · A number of the Judopay API resources support paging and sorting. The paging for these resources is controlled using the following query-string parameters:

URL Parameter Description
pageSize The number of records to display per-page
default: 10
offset The start point in the sorted list of records from which the results set will start. For example, "?pageSize=10&offset=20" will return the second page of results
default: 0
sort Determines how Judopay sorts the list. The list can be displayed as time-descending and time-ascending
default: time-descending

Paging is most useful on the transaction resources, where you can get a list of the last 15 transactions processed:

GET /transactions?pageSize=15&offset=0&sort=time-descending

Or the first 5 payments you processed:

GET /transactions/payments?pageSize=5&offset=0&sort=time-ascending

Request

Request

HTTP Header

GET /transactions/
Host: gw1.judopay-sandbox.com
Api-Version: 5.2
Content-Type: application/json
Authorization: Basic {authstring}
Cache-Control: no-cache

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X GET https://gw1.judopay-sandbox.com/transactions/
-H "API-Version: 5.2"
-H "Content-Type: application/json"
-u Token:Secret
Response

OK (200)

HTTP Header

Status code: 200
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: X

Where the value of X depends on the size of your result set

Example : >
    {
    "resultCount": 76,
    "pageSize": 10,
    "offset": 0,
    "results": [
        {
            "receiptId": "2152023",
            "yourPaymentReference": "002",
            "type": "Payment",
            "createdAt": "2015-11-18T15:06:04.2478+00:00",
            "result": "Success",
            "message": "AuthCode: 808159",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "0.01",
            "amount": "0.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "izFWlMVaNs92o72c",
                "yourConsumerReference": "001"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2140002",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:40:38.6697+00:00",
            "result": "Success",
            "message": "AuthCode: 871158",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2139996",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:40:00.6239+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        },
        {
            "receiptId": "2139988",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:39:26.3735+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "12.30",
            "amount": "12.30",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        },
        {
            "receiptId": "2139970",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:39:02.9211+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "asdasd"
            }
        },
        {
            "receiptId": "2139962",
            "yourPaymentReference": "abvbdd",
            "type": "Payment",
            "createdAt": "2015-11-17T08:38:56.3715+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        },
        {
            "receiptId": "2139954",
            "yourPaymentReference": "12345",
            "type": "Payment",
            "createdAt": "2015-11-17T08:38:51.4210+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        },
        {
            "receiptId": "2139947",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:37:55.3004+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        },
        {
            "receiptId": "2139939",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:37:32.1040+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            }
        },
        {
            "receiptId": "2139913",
            "yourPaymentReference": "1701577",
            "type": "Payment",
            "createdAt": "2015-11-17T08:37:06.1004+00:00",
            "result": "Declined",
            "message": "Your transaction has been declined.",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "netAmount": "5.00",
            "amount": "5.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "yourPaymentMetaData": {
                "driver": "999"
            }
        }
    ],
    "sort": "time-descending"
    

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however the judoPay API returns a JSON document detailing any detected problems.

Status code: 400

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not Found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

List individual transaction

GET

Request

Request

GET /transactions/{receipt ID}
Host: gw1.judopay-sandbox.com
Api-Version: 5.2
Content-Type: application/json
Authorization: Basic {authstring}
Cache-Control: no-cache

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X GET https://gw1.judopay-sandbox.com/transactions/2152023
-H "API-Version: 5.2"
-H "Content-Type: application/json"
-u Token:Secret

Response

OK (200)

HTTP Header

Status code: 200
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: X

Example : >
{
    "receiptId": "2152023",
    "yourPaymentReference": "002",
    "type": "Payment",
    "createdAt": "2015-11-18T15:06:04.2478+00:00",
    "result": "Success",
    "message": "AuthCode: 808159",
    "judoId": 100337815,
    "merchantName": "trading",
    "appearsOnStatementAs": "trading                  ",
    "netAmount": "0.01",
    "amount": "0.01",
    "currency": "GBP",
    "cardDetails": {
        "cardLastfour": "3436",
        "endDate": "1215",
        "cardType": 0
    },
    "consumer": {
        "consumerToken": "izFWlMVaNs92o72c",
        "yourConsumerReference": "001"
    },
    "postCodeCheckResult": "Failed"
}

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however the judoPay API returns a JSON document detailing any detected problems.

Status code: 400

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not Found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Filtered list of transactions

GET · A number of the Judopay API resources support paging and sorting. The paging for these resources is controlled using the following query-string parameters:

URL Parameter Description
pageSize The number of records to display per-page
default: 10
offset The start point in the sorted list of records from which the results set will start. For example, "?pageSize=10&offset=20" will return the second page of results
default: 0
sort Determines how Judopay sorts the list. The list can be displayed as time-descending and time-ascending
default: time-descending

Paging is most useful on the transaction resources, where you can get a list of the last 15 transactions processed:

GET /transactions/preauths?pageSize=15&offset=0&sort=time-descending

Or the first 5 payments you processed:

GET /transactions/payments?pageSize=5&offset=0&sort=time-ascending

Request

Request

GET /transactions/{transaction type}
Host: gw1.judopay-sandbox.com
Api-Version: 5.2
Content-Type: application/json
Authorization: Basic {authstring}
Cache-Control: no-cache

You can change {transaction type} by payments, preauths, collections or refunds, depending on your interest.

You should replace {authstring} with the base64 encoding of your API token (username) then a colon and then your API secret (password).

Example : >
curl -X GET https://gw1.judopay-sandbox.com/transactions/preauths
-H "API-Version: 5.2"
-H "Content-Type: application/json"
-u Token:Secret

Response

OK (200)

HTTP Header

Status code: 200
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: X

Example : >
{
    "resultCount": 22,
    "pageSize": 10,
    "offset": 0,
    "results": [
        {
            "receiptId": "2139830",
            "yourPaymentReference": "Judo_RegisterCardPreAuth_635833458755393913",
            "type": "PreAuth",
            "createdAt": "2015-11-17T08:31:16.7945+00:00",
            "result": "Success",
            "message": "AuthCode: 898086",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "1.01",
            "amount": "1.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "JT6YqNZ5eGr472ui",
                "yourConsumerReference": "TestJudo001"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2067197",
            "yourPaymentReference": "Judo_RegisterCardPreAuth_635826627832544778",
            "type": "PreAuth",
            "createdAt": "2015-11-09T10:46:23.3255+00:00",
            "result": "Success",
            "message": "AuthCode: 726683",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "1.01",
            "amount": "1.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "B6SRZ6Gz2ncfAvvK",
                "yourConsumerReference": "1BDE2096-3437-47AB-8775-16067CE417BD"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2067056",
            "yourPaymentReference": "Judo_RegisterCardPreAuth_635826620986454670",
            "type": "PreAuth",
            "createdAt": "2015-11-09T10:34:58.7175+00:00",
            "result": "Success",
            "message": "AuthCode: 122828",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "1.01",
            "amount": "1.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "B6SRZ6Gz2ncfAvvK",
                "yourConsumerReference": "1BDE2096-3437-47AB-8775-16067CE417BD"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2067023",
            "yourPaymentReference": "Judo Test 002",
            "type": "PreAuth",
            "createdAt": "2015-11-09T10:26:30.9743+00:00",
            "result": "Success",
            "message": "AuthCode: 493456",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "0.01",
            "amount": "0.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "peBGLyECGBmMTBOu",
                "yourConsumerReference": "Judo Test 001"
            },
            "yourPaymentMetaData": {
                "test": "data"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2066884",
            "yourPaymentReference": "Judo_RegisterCardPreAuth_635826613545426119",
            "type": "PreAuth",
            "createdAt": "2015-11-09T10:22:34.6306+00:00",
            "result": "Success",
            "message": "AuthCode: 332754",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "1.01",
            "amount": "1.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "B6SRZ6Gz2ncfAvvK",
                "yourConsumerReference": "1BDE2096-3437-47AB-8775-16067CE417BD"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "2066876",
            "yourPaymentReference": "Judo_RegisterCardPreAuth_635826612353776966",
            "type": "PreAuth",
            "createdAt": "2015-11-09T10:20:35.9578+00:00",
            "result": "Success",
            "message": "AuthCode: 971117",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "1.01",
            "amount": "1.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 1
            },
            "consumer": {
                "consumerToken": "gO7JhjAvUzHJH0ug",
                "yourConsumerReference": "4cb87ebc-74a0-3487-87c1-cad93d3ecdf923"
            },
            "postCodeCheckResult": "Unknown"
        },
        {
            "receiptId": "1908409",
            "yourPaymentReference": "Judo Test 002",
            "type": "PreAuth",
            "createdAt": "2015-10-15T10:30:32.3624+01:00",
            "result": "Success",
            "message": "AuthCode: 362104",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "0.01",
            "amount": "0.01",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "peBGLyECGBmMTBOu",
                "yourConsumerReference": "Judo Test 001"
            },
            "yourPaymentMetaData": {
                "test": "data"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "1231794",
            "yourPaymentReference": "abcdef",
            "type": "PreAuth",
            "createdAt": "2015-07-07T17:11:34.2798+01:00",
            "result": "Success",
            "message": "AuthCode: 832281",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "3.00",
            "amount": "3.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "YJc56653iZUwtCU1",
                "yourConsumerReference": "consumerJudoPreAuthTest123"
            },
            "yourPaymentMetaData": {
                "test": "data"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "1231737",
            "yourPaymentReference": "abcdef",
            "type": "PreAuth",
            "createdAt": "2015-07-07T17:07:29.2493+01:00",
            "result": "Success",
            "message": "AuthCode: 375304",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "3.00",
            "amount": "3.00",
            "currency": "GBP",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "YJc56653iZUwtCU1",
                "yourConsumerReference": "consumerJudoPreAuthTest123"
            },
            "yourPaymentMetaData": {
                "test": "data"
            },
            "postCodeCheckResult": "Failed"
        },
        {
            "receiptId": "1227024",
            "yourPaymentReference": "Judotest123415",
            "type": "PreAuth",
            "createdAt": "2015-07-06T15:28:57.2830+01:00",
            "result": "Success",
            "message": "AuthCode: 220000",
            "judoId": 100337815,
            "merchantName": "trading",
            "appearsOnStatementAs": "trading                  ",
            "amountCollected": "0.00",
            "netAmount": "3.00",
            "amount": "3.00",
            "currency": "USD",
            "cardDetails": {
                "cardLastfour": "3436",
                "endDate": "1215",
                "cardType": 0
            },
            "consumer": {
                "consumerToken": "YJc56653iZUwtCU1",
                "yourConsumerReference": "consumerJudoPreAuthTest123"
            },
            "yourPaymentMetaData": {
                "test": "data"
            },
            "postCodeCheckResult": "Failed"
        }
    ],
    "sort": "time-descending"
}

Not modified (304)

HTTP Header

Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.

Status code: 304

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "3D-Secure was not successful for this transaction.",
"errorType": "60",
"modelErrors": []
}
JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Bad request (400)

HTTP Header

There are many causes of a bad request response, however the judoPay API returns a JSON document detailing any detected problems.

Status code: 400

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we're unable to process your request. Please check your details and try again.",
"errorType": "1",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Forbidden (403)

HTTP Header

The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. "you don't have necessary permissions for the resource".

Status code: 403

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the API version you are targeting is invalid. Please review this and try again.",
"errorType": "40",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Not Found (404)

HTTP Header

The requested resource could not be found. Subsequent requests by the client are permissible.

Status code: 404

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the transaction specified was not found.",
"errorType": "19",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Method not allowed (405)

HTTP Header

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.

Status code: 405

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but this application has already gone live and cannot be updated via this endpoint.",
"errorType": "20002",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Conflict (409)

HTTP Header

Indicates that the request could not be processed because of conflict in the request.

Status code: 409

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry,we were unable to process your payment at this time. Your card has not been charged.",
"errorType": "11",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Unsupported media type (415)

HTTP Header

The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.

Status code: 415

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, but the content-type was not specified or is currently unsupported. Currently only application/json is supported.",
"errorType": "80",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.

Internal server error (500)

HTTP Header

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Status code: 500

Cache-Control: no-cache 
Pragma: no-cache 
Content-Type: application/json; charset=utf-8 
Expires: -1 
Content-Length: X 

Where the value of X depends on the size of your result set

Body : >
{
"errorMessage": "Sorry, we encountered an error while authenticating your request. Please check your authentication details and try again. If this issue continues, please contact customer services.",
"errorType": "81",
"modelErrors": []
}

This is an example of error message. You can consult all the rest of error messages here.

JSON Reference : >
Property Type Notes
errorMessage date a user friendly error message
errorType integer enumeration Code describing the error. Please see below for different error codes
modelErrors Array description of each model error

You can consult all the error messages by Http Status Code here.