/transactions/collections
1 min
code examples curl request post \\ \ url https //api sandbox judopay com/transactions/collections \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'api version 6 23' \\ \ data '{ "receiptid" "1001131610340495360", "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("api version", "6 23"); var raw = json stringify({ "receiptid" "1001131610340495360", "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api sandbox judopay com/transactions/collections", 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/collections") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["api version"] = "6 23" request body = json dump({ "receiptid" "1001131610340495360", "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542" }) response = https request(request) puts response read body import requests import json url = "https //api sandbox judopay com/transactions/collections" payload = json dumps({ "receiptid" "1001131610340495360", "yourpaymentreference" "aa648425 2230 4e4e 8a61 27f06df54542" }) headers = { 'accept' 'application/json', 'content type' 'application/json', 'api version' '6 23' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "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", "wallettype" 1, "riskscore" 0, "paymentnetworktransactionid" "123456789012345", "allowincrement" true, "isincrementalauth" true, "emailaddress" "test user\@judopay com", "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" }, "disablenetworktokenisation" true, "networktokenisationdetails" { "networktokenprovisioned" true, "networktokenused" true, "virtualpan" { "lastfour" "1234", "expirydate" "0129" } } }// unauthorized { "requestid" "", "message" "", "code" 0, "category" 0 }// forbidden if token used does not have required permission { "requestid" "", "message" "", "code" 0, "category" 0 }