Retrieve details of a completed payment session
1 min
code examples curl request get \\ \ url https //api sandbox judopay com/transactions/{receiptid}/webpayment \\ \ header 'accept application/json' \\ \ header 'api version 6 23'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("api version", "6 23"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api sandbox judopay com/transactions/{receiptid}/webpayment", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api sandbox judopay com/transactions/{receiptid}/webpayment") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["api version"] = "6 23" response = https request(request) puts response read body import requests import json url = "https //api sandbox judopay com/transactions/{receiptid}/webpayment" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'api version' '6 23' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful response { "amount" 10 99, "cardaddress" {}, "clientipaddress" "1 2 3 4", "clientuseragent" "mozilla/5 0", "companyname" "test merchant", "currency" "gbp", "expirydate" "2026 02 05t16 28 32 8596+00 00", "judoid" "100100100", "paymentcancelurl" "https //my web site/cancel", "paymentsuccessurl" "https //my web site/success", "reference" "5qcaaaiaaaamaaaadwaaapwlgcqclu6slrnhi8kt1veovlwifjc2ektqt7jxb2xeqrqyyw", "allowedcardtyes" \[ 0 ], "response" { "posturl" "https //pay sandbox judopay com/v2", "reference" "5qcaaaiaaaamaaaadwaaapwlgcqclu6slrnhi8kt1veovlwifjc2ektqt7jxb2xeqrqyyw" }, "status" "success", "transactiontype" "preauth", "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", "yourpaymentmetadata" {}, "yourpaymentreference" "6482c678 cad3 4efd b081 aeae7a89a134", "receipt" { "receiptid" "1001131610340495360", "originalreceiptid" "1001124307998347264", "yourpaymentreference" "6482c678 cad3 4efd b081 aeae7a89a134", "type" "preauth", "createdat" "2025 02 05t16 28 32 8596+00 00", "result" "success", "message" "authcode 123456", "judoid" 100100100, "merchantname" "test merchant", "appearsonstatementas" "apl /testmerchant ", "originalamount" "10 99", "amountcollected" "1 99", "netamount" "1 00", "amount" "1 00", "currency" "gbp", "recurringpaymenttype" "mit", "acquirertransactionid" "33666277256892153705", "externalbankresponsecode" "a", "authcode" "123456", "postcodecheckresult" "passed", "wallettype" 1, "acquirer" "mybank", "webpaymentreference" "5qcaaamaaaasaaaadaaaahakm0p0p ew6vrbhpxjxvmlinjomzejwg k7kj53udvrgq3qa", "noofauthattempts" 1, "paymentnetworktransactionid" "123456789012345", "allowincrement" true, "isincrementalauth" true, "disablenetworktokenisation" true, "carddetails" { "cardlastfour" "1234", "enddate" "1225", "cardtoken" "ck3aenlbfjvs9d61mnzig0gtcvijqvkr", "cardtype" 2, "startdate" "0121", "cardscheme" "mastercard", "cardfunding" "credit", "cardcategory" "acquirer only", "cardcountry" "gb", "bank" "santander uk plc", "cardholdername" "john doe", "ownertype" "personal" }, "billingaddress" {}, "consumer" { "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408" }, "device" { "identifier" "d73b4a7b58ce4e54a3bd73b7eda061e6" }, "yourpaymentmetadata" {}, "threedsecure" { "attempted" true, "result" "passed", "eci" "05", "challengerequestindicator" "challengemandated", "scaexemption" "" }, "risks" { "postcodecheck" "passed", "cv2check" "passed", "merchantsuggestion" "allow" }, "networktokenisationdetails" { "networktokenprovisioned" true, "networktokenused" true, "virtualpan" { "lastfour" "1234", "expirydate" "0129" } } }, "portaluserrecid" 1509318, "webpaymentoperation" 0, "ispaybylink" true, "isjudoaccept" false, "isthreedsecuretwo" false, "mobilenumber" "07999999999", "phonecountrycode" "44", "emailaddress" "test user\@judopay com", "noofauthattempts" 1, "shortreference" "p5dqoa" }// bad request (api version header missing) // unauthorized { "requestid" "", "message" "", "code" 0, "category" 0 }// forbidden if token used does not have required permission { "requestid" "", "message" "", "code" 0, "category" 0 }// receiptid not found, or not associated with a payment session, or doesn't match authentication details