Server-to-Server registration tokens
Last updated: 2026-03-26
This guide explains how to store card and non-card data and use the stored details for payment transactions.
- To understand registration tokens in eCommerce, read the Tokenisation guide.
- To use network tokens issued by card networks, refer to Server-to-Server network tokens.
- To collect card data, you must be PCI-DSS compliant. To reducde compliance requirements, use COPYandPAY registration tokens.
You can use Server-to-Server registration tokens in the below ways ways:
- Standalone tokenisation
- Tokenisation during payment
- One-click payment
- Payment with token
- Token deletion
- Token extension
Standalone tokenisation
The merchant collects card data from the customer and initiates registration tokenisation. This process does not involve a payment request or flow. The system provisions a registration token synchronously and returns it to the merchant. The merchant can then use the registration token in subsequent payments.
1. Create the token
Send a server-to-server POST request with the required customer data, excluding paymentType. If the request succeeds, the response includes an id. Store this id and use it in subsequent payments.
Sample request:
curl https://sandbox-card.peachpayments.com/v1/registrations \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentBrand=VISA" \
-d "card.number=4242422667258079" \
-d "card.expiryMonth=12" \
-d "card.expiryYear=2026" \
-d "card.holder=John Smith" \
-d "card.cvv=123" \
-d "testMode=EXTERNAL" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data="entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422667258079" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&testMode=EXTERNAL";
string url = "https://sandbox-card.peachpayments.com/v1/registrations";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422667258079" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&testMode=EXTERNAL"
def url = "https://sandbox-card.peachpayments.com/v1/registrations".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&card.number=4242422667258079"
+ "&card.expiryMonth=12"
+ "&card.expiryYear=2026"
+ "&card.holder=John Smith"
+ "&card.cvv=123"
+ "&testMode=EXTERNAL";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path = '/v1/registrations';
const data = querystring.stringify({
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'card.number': '4242422667258079',
'card.expiryMonth': '12',
'card.expiryYear': '2026',
'card.holder': 'John Smith',
'card.cvv': '123',
'testMode': 'EXTERNAL'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function(res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations";
$data = "entityId=8a8294174e735d0c014e78cf26461790" .
"&paymentBrand=VISA" .
"&card.number=4242422667258079" .
"&card.expiryMonth=12" .
"&card.expiryYear=2026" .
"&card.holder=John Smith" .
"&card.cvv=123" .
"&testMode=EXTERNAL";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations"
data = {
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'card.number': '4242422667258079',
'card.expiryMonth': '12',
'card.expiryYear': '2026',
'card.holder': 'John Smith',
'card.cvv': '123',
'testMode': 'EXTERNAL'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/registrations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790',
'paymentBrand' => 'VISA',
'card.number' => '4242422667258079',
'card.expiryMonth' => '12',
'card.expiryYear' => '2026',
'card.holder' => 'John Smith',
'card.cvv' => '123',
'testMode' => 'EXTERNAL'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations"
val data = (
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422667258079" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&testMode=EXTERNAL"
)
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST")
case _ => throw new ClassCastException
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream())
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
IOUtils.toString(conn.getErrorStream())
} else {
IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422667258079" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&testMode=EXTERNAL"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id":"8ac7a4a09d21e349019d29508dc26779",
"result":{
"code":"000.100.112",
"description":"Request successfully processed in 'Merchant in Connector Test Mode'"
},
"card":{
"bin":"424242",
"last4Digits":"5885",
"holder":"John Smith",
"expiryMonth":"12",
"expiryYear":"2027"
},
"customParameters":{
"PAYMENT_INHOUSE_FACADE":"true"
},
"risk":{
"score":"0"
},
"buildNumber":"9092e7a6af8301accda2f9a3a38f743f907dadd5@2026-03-23 16:50:06 +0000",
"timestamp":"2026-03-26 08:43:58+0000",
"ndc":"8a8294174e735d0c014e78cf26461790_1d6484da5df34aa1896156f0158570db"
}2. Send payment using the token
Perform a server-to-server POST request over the registration token retrieved in the previous step. Or use one-click payment to authorise the payment with a selected stored registration token.
Sample request:
https://sandbox-card.peachpayments.com/v1/registrations/8ac7a4a09d21e349019d29508dc26779/payments
curl https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentBrand=VISA" \
-d "paymentType=DB" \
-d "amount=17.99" \
-d "currency=EUR" \
-d "testMode=EXTERNAL" \
-d "standingInstruction.type=RECURRING" \
-d "standingInstruction.mode=INITIAL" \
-d "standingInstruction.source=CIT" \
-d "threeDSecure.eci=05" \
-d "threeDSecure.authenticationStatus=Y" \
-d "threeDSecure.version=2.2.0" \
-d "threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" \
-d "threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" \
-d "threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" \
-d "threeDSecure.amount=19.99" \
-d "threeDSecure.currency=EUR" \
-d "threeDSecure.flow=challenge" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge";
string url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static Map request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
def url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&amount=17.99"
+ "¤cy=EUR"
+ "&testMode=EXTERNAL"
+ "&standingInstruction.type=RECURRING"
+ "&standingInstruction.mode=INITIAL"
+ "&standingInstruction.source=CIT"
+ "&threeDSecure.eci=05"
+ "&threeDSecure.authenticationStatus=Y"
+ "&threeDSecure.version=2.2.0"
+ "&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e"
+ "&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8"
+ "&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA="
+ "&threeDSecure.amount=19.99"
+ "&threeDSecure.currency=EUR"
+ "&threeDSecure.flow=challenge";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) {
is = conn.getErrorStream();
} else {
is = conn.getInputStream();
}
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path = '/v1/registrations/{id}/payments';
const data = querystring.stringify({
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'paymentType': 'DB',
'amount': '17.99',
'currency': 'EUR',
'testMode': 'EXTERNAL',
'standingInstruction.type': 'RECURRING',
'standingInstruction.mode': 'INITIAL',
'standingInstruction.source': 'CIT',
'threeDSecure.eci': '05',
'threeDSecure.authenticationStatus': 'Y',
'threeDSecure.version': '2.2.0',
'threeDSecure.dsTransactionId': 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId': '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId': 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount': '19.99',
'threeDSecure.currency': 'EUR',
'threeDSecure.flow': 'challenge'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function(res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
$data = "entityId=8a8294174e735d0c014e78cf26461790" .
"&paymentBrand=VISA" .
"&paymentType=DB" .
"&amount=17.99" .
"¤cy=EUR" .
"&testMode=EXTERNAL" .
"&standingInstruction.type=RECURRING" .
"&standingInstruction.mode=INITIAL" .
"&standingInstruction.source=CIT" .
"&threeDSecure.eci=05" .
"&threeDSecure.authenticationStatus=Y" .
"&threeDSecure.version=2.2.0" .
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" .
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" .
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" .
"&threeDSecure.amount=19.99" .
"&threeDSecure.currency=EUR" .
"&threeDSecure.flow=challenge";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // This should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
data = {
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'paymentType': 'DB',
'amount': '17.99',
'currency': 'EUR',
'testMode': 'EXTERNAL',
'standingInstruction.type': 'RECURRING',
'standingInstruction.mode': 'INITIAL',
'standingInstruction.source': 'CIT',
'threeDSecure.eci': '05',
'threeDSecure.authenticationStatus': 'Y',
'threeDSecure.version': '2.2.0',
'threeDSecure.dsTransactionId': 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId': '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId': 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount': '19.99',
'threeDSecure.currency': 'EUR',
'threeDSecure.flow': 'challenge'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790',
'paymentBrand' => 'VISA',
'paymentType' => 'DB',
'amount' => '17.99',
'currency' => 'EUR',
'testMode' => 'EXTERNAL',
'standingInstruction.type' => 'RECURRING',
'standingInstruction.mode' => 'INITIAL',
'standingInstruction.source' => 'CIT',
'threeDSecure.eci' => '05',
'threeDSecure.authenticationStatus' => 'Y',
'threeDSecure.version' => '2.2.0',
'threeDSecure.dsTransactionId' => 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId' => '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId' => 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount' => '19.99',
'threeDSecure.currency' => 'EUR',
'threeDSecure.flow' => 'challenge'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
val data = (
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
)
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST")
case _ => throw new ClassCastException
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream())
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
IOUtils.toString(conn.getErrorStream())
} else {
IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id": "8ac7a49f9d2fd5bd019d3895acca5771",
"paymentType": "DB",
"amount": "17.99",
"currency": "EUR",
"descriptor": "5284.6287.4340 MAC_Channel ",
"result": {
"code": "000.100.110",
"description": "Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"resultDetails": {
"Payment Status": "CLO",
"ConnectorTxID1": "payment_55cd30eb3b5a499b3a3a2f5b6cf3f11a",
"Cvv Check": "unchecked",
"Transaction Status": "SUCCESS",
"ConnectorTxID3": "123456",
"Amount": "0.0",
"Operation Id": "64403c94-0978-4d5f-abd7-28a4e5d99556",
"Payment Method Category": "card",
"CardholderInitiatedTransactionID": "123456",
"ExtendedDescription": "Transaction succeeded",
"Customer Token": "cus_4d184daa989cac82224b856bac739b60",
"Paid Amount": "0.0",
"Payment Account Reference": "V001NPX3IQC6OFS2TAWCVD2WTXRWY",
"Sender Details": "{\"address\":\"null\",\"firstName\":\"null\",\"lastName\":\"null\",\"postcode\":\"null\",\"city\":\"AE\",\"state\":\"null\",\"country\":\"null\",\"companyName\":\"null\"}",
"AcquirerResponse": "SUCCESS",
"Beneficiary Details": "{\"firstName\":\"null\",\"lastName\":\"null\",\"address\":\"null\",\"dob\":\"null\",\"gender\":\"null\",\"email\":\"null\",\"state\":\"null\",\"cardNumber\":\"null\",\"cardExpirationMonth\":\"null\",\"cardExpirationYear\":\"null\",\"nationality\":\"null\",\"city\":\"NY\",\"postcode\":\"null\",\"identificationType\":\"null\",\"identificationValue\":\"null\"\"category\":\"null\"}",
"Statement Descriptor": "044153838562 Rapyd Nat"
},
"threeDSecure": {
"eci": "05",
"verificationId": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=",
"version": "2.2.0",
"dsTransactionId": "c75f23af-9454-43f6-ba17-130ed529507e",
"acsTransactionId": "2c42c553-176f-4f08-af6c-f9364ecbd0e8",
"flow": "challenge",
"authenticationStatus": "Y",
"amount": "19.99",
"currency": "EUR"
},
"customParameters": {
"PAYMENT_INHOUSE_FACADE": "true"
},
"risk": {
"score": "0"
},
"buildNumber": "2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp": "2026-03-29 07:53:46+0000",
"ndc": "8a8294174e735d0c014e78cf26461790_f81567050b3c4576b1519f81af27db91",
"standingInstruction": {
"source": "CIT",
"type": "RECURRING",
"mode": "INITIAL",
"initialTransactionId": "123456",
"expiry": "2035-12-31",
"frequency": "0001",
"recurringType": "SUBSCRIPTION"
}
}Tokenisation during payment
The merchant collects card data from the customer and initiates registration tokenisation along with an account verification (zero amount authorisation) or initial purchase. The system synchronously provisions a registration token and returns it to the merchant after completing the payment. The merchant can then use the registration token in subsequent payments.
Create the token during payment
Perform a server-to-server POST request with createRegistration=true and all required payment and customer data, including payment type, amount, and currency. If the request succeeds, the response includes a registrationId. Store this registrationId and use it in subsequent payments.
Sample request:
curl https://sandbox-card.peachpayments.com/v1/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentBrand=VISA" \
-d "card.number=4242422534706888" \
-d "card.expiryMonth=12" \
-d "card.expiryYear=2026" \
-d "card.holder=John Smith" \
-d "card.cvv=123" \
-d "paymentType=DB" \
-d "amount=15.99" \
-d "currency=EUR" \
-d "createRegistration=true" \
-d "testMode=EXTERNAL" \
-d "standingInstruction.type=RECURRING" \
-d "standingInstruction.mode=INITIAL" \
-d "standingInstruction.source=CIT" \
-d "threeDSecure.eci=05" \
-d "threeDSecure.authenticationStatus=Y" \
-d "threeDSecure.version=2.2.0" \
-d "threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" \
-d "threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" \
-d "threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" \
-d "threeDSecure.amount=19.99" \
-d "threeDSecure.currency=EUR" \
-d "threeDSecure.flow=challenge" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422534706888" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&paymentType=DB" +
"&amount=15.99" +
"¤cy=EUR" +
"&createRegistration=true" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge";
string url = "https://sandbox-card.peachpayments.com/v1/payments";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422534706888" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&paymentType=DB" +
"&amount=15.99" +
"¤cy=EUR" +
"&createRegistration=true" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
def url = "https://sandbox-card.peachpayments.com/v1/payments".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/payments");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&card.number=4242422534706888"
+ "&card.expiryMonth=12"
+ "&card.expiryYear=2026"
+ "&card.holder=John Smith"
+ "&card.cvv=123"
+ "&paymentType=DB"
+ "&amount=15.99"
+ "¤cy=EUR"
+ "&createRegistration=true"
+ "&testMode=EXTERNAL"
+ "&standingInstruction.type=RECURRING"
+ "&standingInstruction.mode=INITIAL"
+ "&standingInstruction.source=CIT"
+ "&threeDSecure.eci=05"
+ "&threeDSecure.authenticationStatus=Y"
+ "&threeDSecure.version=2.2.0"
+ "&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e"
+ "&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8"
+ "&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA="
+ "&threeDSecure.amount=19.99"
+ "&threeDSecure.currency=EUR"
+ "&threeDSecure.flow=challenge";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) {
is = conn.getErrorStream();
} else {
is = conn.getInputStream();
}
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path = '/v1/payments';
const data = querystring.stringify({
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'card.number': '4242422534706888',
'card.expiryMonth': '12',
'card.expiryYear': '2026',
'card.holder': 'John Smith',
'card.cvv': '123',
'paymentType': 'DB',
'amount': '15.99',
'currency': 'EUR',
'createRegistration': 'true',
'testMode': 'EXTERNAL',
'standingInstruction.type': 'RECURRING',
'standingInstruction.mode': 'INITIAL',
'standingInstruction.source': 'CIT',
'threeDSecure.eci': '05',
'threeDSecure.authenticationStatus': 'Y',
'threeDSecure.version': '2.2.0',
'threeDSecure.dsTransactionId': 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId': '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId': 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount': '19.99',
'threeDSecure.currency': 'EUR',
'threeDSecure.flow': 'challenge'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function (res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/payments";
$data = "entityId=8a8294174e735d0c014e78cf26461790" .
"&paymentBrand=VISA" .
"&card.number=4242422534706888" .
"&card.expiryMonth=12" .
"&card.expiryYear=2026" .
"&card.holder=John Smith" .
"&card.cvv=123" .
"&paymentType=DB" .
"&amount=15.99" .
"¤cy=EUR" .
"&createRegistration=true" .
"&testMode=EXTERNAL" .
"&standingInstruction.type=RECURRING" .
"&standingInstruction.mode=INITIAL" .
"&standingInstruction.source=CIT" .
"&threeDSecure.eci=05" .
"&threeDSecure.authenticationStatus=Y" .
"&threeDSecure.version=2.2.0" .
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" .
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" .
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" .
"&threeDSecure.amount=19.99" .
"&threeDSecure.currency=EUR" .
"&threeDSecure.flow=challenge";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/payments"
data = {
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'card.number': '4242422534706888',
'card.expiryMonth': '12',
'card.expiryYear': '2026',
'card.holder': 'John Smith',
'card.cvv': '123',
'paymentType': 'DB',
'amount': '15.99',
'currency': 'EUR',
'createRegistration': 'true',
'testMode': 'EXTERNAL',
'standingInstruction.type': 'RECURRING',
'standingInstruction.mode': 'INITIAL',
'standingInstruction.source': 'CIT',
'threeDSecure.eci': '05',
'threeDSecure.authenticationStatus': 'Y',
'threeDSecure.version': '2.2.0',
'threeDSecure.dsTransactionId': 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId': '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId': 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount': '19.99',
'threeDSecure.currency': 'EUR',
'threeDSecure.flow': 'challenge'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/payments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790',
'paymentBrand' => 'VISA',
'card.number' => '4242422534706888',
'card.expiryMonth' => '12',
'card.expiryYear' => '2026',
'card.holder' => 'John Smith',
'card.cvv' => '123',
'paymentType' => 'DB',
'amount' => '15.99',
'currency' => 'EUR',
'createRegistration' => 'true',
'testMode' => 'EXTERNAL',
'standingInstruction.type' => 'RECURRING',
'standingInstruction.mode' => 'INITIAL',
'standingInstruction.source' => 'CIT',
'threeDSecure.eci' => '05',
'threeDSecure.authenticationStatus' => 'Y',
'threeDSecure.version' => '2.2.0',
'threeDSecure.dsTransactionId' => 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId' => '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId' => 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount' => '19.99',
'threeDSecure.currency' => 'EUR',
'threeDSecure.flow' => 'challenge'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()import java.net.{URL, HttpURLConnection}
import javax.net.ssl.HttpsURLConnection
import org.apache.commons.io.IOUtils
def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/payments"
val data = (
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422534706888" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&paymentType=DB" +
"&amount=15.99" +
"¤cy=EUR" +
"&createRegistration=true" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
)
val conn = new URL(url).openConnection() match {
case secureConn: HttpsURLConnection =>
secureConn.setRequestMethod("POST")
secureConn
case _ => throw new ClassCastException("Connection is not HTTPS")
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream, "UTF-8")
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode >= 400) {
IOUtils.toString(conn.getErrorStream, "UTF-8")
} else {
IOUtils.toString(conn.getInputStream, "UTF-8")
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/payments"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&card.number=4242422534706888" +
"&card.expiryMonth=12" +
"&card.expiryYear=2026" +
"&card.holder=John Smith" +
"&card.cvv=123" +
"&paymentType=DB" +
"&amount=15.99" +
"¤cy=EUR" +
"&createRegistration=true" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id": "8ac7a49f9d2fd5bd019d38744f912f64",
"registrationId": "8ac7a4a19d2fd573019d38744efb3a98",
"paymentType": "DB",
"paymentBrand": "VISA",
"amount": "15.99",
"currency": "EUR",
"descriptor": "6025.5064.2404 MAC_Channel ",
"result": {
"code": "000.100.110",
"description": "Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"resultDetails": {
"Payment Status": "CLO",
"ConnectorTxID1": "payment_55cd30eb3b5a499b3a3a2f5b6cf3f11a",
"Cvv Check": "unchecked",
"Transaction Status": "SUCCESS",
"ConnectorTxID3": "123456",
"Amount": "0.00",
"Operation Id": "64403c94-0978-4d5f-abd7-28a4e5d99556",
"Payment Method Category": "card",
"CardholderInitiatedTransactionID": "123456",
"ExtendedDescription": "Transaction succeeded",
"Customer Token": "cus_4d184daa989cac82224b856bac739b60",
"Paid Amount": "0.0",
"Payment Account Reference": "V001NPX3IQC6OFS2TAWCVD2WTXRWY",
"Sender Details": "{\"address\":\"null\",\"firstName\":\"null\",\"lastName\":\"null\",\"postcode\":\"null\",\"city\":\"AE\",\"state\":\"null\",\"country\":\"null\",\"companyName\":\"null\"}",
"AcquirerResponse": "SUCCESS",
"Beneficiary Details": "{\"firstName\":\"null\",\"lastName\":\"null\",\"address\":\"null\",\"dob\":\"null\",\"gender\":\"null\",\"email\":\"null\",\"state\":\"null\",\"cardNumber\":\"null\",\"cardExpirationMonth\":\"null\",\"cardExpirationYear\":\"null\",\"nationality\":\"null\",\"city\":\"NY\",\"postcode\":\"null\",\"identificationType\":\"null\",\"identificationValue\":\"null\"\"category\":\"null\"}",
"Statement Descriptor": "044153838562 Rapyd Nat"
},
"card": {
"bin": "424242",
"last4Digits": "6888",
"holder": "John Smith",
"expiryMonth": "12",
"expiryYear": "2026"
},
"threeDSecure": {
"eci": "05",
"verificationId": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=",
"version": "2.2.0",
"dsTransactionId": "c75f23af-9454-43f6-ba17-130ed529507e",
"acsTransactionId": "2c42c553-176f-4f08-af6c-f9364ecbd0e8",
"flow": "challenge",
"authenticationStatus": "Y",
"amount": "19.99",
"currency": "EUR"
},
"customParameters": {
"PAYMENT_INHOUSE_FACADE": "true",
"OPP_card.bin": "424242"
},
"risk": {
"score": "0"
},
"buildNumber": "2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp": "2026-03-29 07:17:19+0000",
"ndc": "8a8294174e735d0c014e78cf26461790_c5cd9ef5bcf24efdba91f791fe933882",
"standingInstruction": {
"source": "CIT",
"type": "RECURRING",
"mode": "INITIAL",
"initialTransactionId": "123456",
"expiry": "2035-12-31",
"frequency": "0001",
"recurringType": "SUBSCRIPTION"
}
}One-click payment
Speed up checkout by reusing raw card data a customer entered before. When the customer returns to the merchant's website, an unscheduled one-click purchase occurs using one of the saved registration tokens. The system authorises the cardholder-initiated (CIT) payment with real card data.
1. Authenticate the customer
Authenticate the customer against your records to receive the registration tokens linked to their account. To prepare the one-click payment form, retrieve the extra stored token data points that enable the customer to check out with the desired stored card:
- Registration token identifier
- Account brand
- Last four digits of the account number
- Expiry date (if applicable)
2. Show the checkout form
Retrieve the stored token information and offer it as an option for checkout. Include normal payment methods alongside the one-click payment page for a better user experience.
HTML example:
<!DOCTYPE HTML>
<html>
<head>
<script>
var wpwlOptions = {
style: "card"
}
</script>
<script src="https://sandbox-card.peachpayments.com/v1/paymentWidgets.js?checkoutId={checkoutId}"></script>
<style>
body { background-color:white; width:720px; margin:auto;padding:10px;font-size:14px;}
h2 { margin-top:25px;margin-bottom:10px;padding:5px;width:100%;background-color:#eee;
border:1px solid #ccc;border-radius:6px;font-size: 16px;font-weight:normal; }
</style>
</head>
<body>
<h2><input type="radio" checked="checked" /> Checkout with stored payment details</h2>
<table>
<tr>
<td width="100px">Visa</td>
<td width="200px">xxxx-xxxx-xxxx-1234</td>
<td width="200px">Dec / 2018</td>
</tr>
</table>
<div><button type="submit" name="pay" class="myButton">Pay now</button></div><br /><br />
<h2><input type="radio" /> Checkout with new payment method</h2>
<form action="http://localhost/pay.html">
MASTER VISA AMEX CHINAUNIONPAY
</form>
</body>
</html>3. Send the payment
When the customer checks out via the one-click form, send a server-to-server POST request for a new payment using the selected registration token.
Sample request:
https://sandbox-card.peachpayments.com/v1/registrations/8ac7a4a29d21e3c1019d2958d376782a/payments
curl https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentBrand=VISA" \
-d "paymentType=DB" \
-d "amount=18.99" \
-d "currency=EUR" \
-d "testMode=EXTERNAL" \
-d "standingInstruction.type=RECURRING" \
-d "standingInstruction.mode=INITIAL" \
-d "standingInstruction.source=CIT" \
-d "threeDSecure.eci=05" \
-d "threeDSecure.authenticationStatus=Y" \
-d "threeDSecure.version=2.2.0" \
-d "threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" \
-d "threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" \
-d "threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" \
-d "threeDSecure.amount=19.99" \
-d "threeDSecure.currency=EUR" \
-d "threeDSecure.flow=challenge" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=18.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge";
string url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=18.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
def url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&amount=18.99"
+ "¤cy=EUR"
+ "&testMode=EXTERNAL"
+ "&standingInstruction.type=RECURRING"
+ "&standingInstruction.mode=INITIAL"
+ "&standingInstruction.source=CIT"
+ "&threeDSecure.eci=05"
+ "&threeDSecure.authenticationStatus=Y"
+ "&threeDSecure.version=2.2.0"
+ "&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e"
+ "&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8"
+ "&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA="
+ "&threeDSecure.amount=19.99"
+ "&threeDSecure.currency=EUR"
+ "&threeDSecure.flow=challenge";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path='/v1/registrations/{id}/payments';
const data = querystring.stringify({
'entityId':'8a8294174e735d0c014e78cf26461790',
'paymentBrand':'VISA',
'paymentType':'DB',
'amount':'18.99',
'currency':'EUR',
'testMode':'EXTERNAL',
'standingInstruction.type':'RECURRING',
'standingInstruction.mode':'INITIAL',
'standingInstruction.source':'CIT',
'threeDSecure.eci':'05',
'threeDSecure.authenticationStatus':'Y',
'threeDSecure.version':'2.2.0',
'threeDSecure.dsTransactionId':'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId':'2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId':'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount':'19.99',
'threeDSecure.currency':'EUR',
'threeDSecure.flow':'challenge'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization':'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function(res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
$data = "entityId=8a8294174e735d0c014e78cf26461790" .
"&paymentBrand=VISA" .
"&paymentType=DB" .
"&amount=18.99" .
"¤cy=EUR" .
"&testMode=EXTERNAL" .
"&standingInstruction.type=RECURRING" .
"&standingInstruction.mode=INITIAL" .
"&standingInstruction.source=CIT" .
"&threeDSecure.eci=05" .
"&threeDSecure.authenticationStatus=Y" .
"&threeDSecure.version=2.2.0" .
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" .
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" .
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" .
"&threeDSecure.amount=19.99" .
"&threeDSecure.currency=EUR" .
"&threeDSecure.flow=challenge";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
data = {
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'paymentType': 'DB',
'amount': '18.99',
'currency': 'EUR',
'testMode': 'EXTERNAL',
'standingInstruction.type': 'RECURRING',
'standingInstruction.mode': 'INITIAL',
'standingInstruction.source': 'CIT',
'threeDSecure.eci': '05',
'threeDSecure.authenticationStatus': 'Y',
'threeDSecure.version': '2.2.0',
'threeDSecure.dsTransactionId': 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId': '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId': 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount': '19.99',
'threeDSecure.currency': 'EUR',
'threeDSecure.flow': 'challenge'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790',
'paymentBrand' => 'VISA',
'paymentType' => 'DB',
'amount' => '18.99',
'currency' => 'EUR',
'testMode' => 'EXTERNAL',
'standingInstruction.type' => 'RECURRING',
'standingInstruction.mode' => 'INITIAL',
'standingInstruction.source' => 'CIT',
'threeDSecure.eci' => '05',
'threeDSecure.authenticationStatus' => 'Y',
'threeDSecure.version' => '2.2.0',
'threeDSecure.dsTransactionId' => 'c75f23af-9454-43f6-ba17-130ed529507e',
'threeDSecure.acsTransactionId' => '2c42c553-176f-4f08-af6c-f9364ecbd0e8',
'threeDSecure.verificationId' => 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=',
'threeDSecure.amount' => '19.99',
'threeDSecure.currency' => 'EUR',
'threeDSecure.flow' => 'challenge'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
val data = ("" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=18.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
)
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST")
case _ => throw new ClassCastException
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream())
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
IOUtils.toString(conn.getErrorStream())
} else {
IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=18.99" +
"¤cy=EUR" +
"&testMode=EXTERNAL" +
"&standingInstruction.type=RECURRING" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&threeDSecure.eci=05" +
"&threeDSecure.authenticationStatus=Y" +
"&threeDSecure.version=2.2.0" +
"&threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" +
"&threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" +
"&threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" +
"&threeDSecure.amount=19.99" +
"&threeDSecure.currency=EUR" +
"&threeDSecure.flow=challenge"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id": "8ac7a4a29d2fe001019d3876b2f1285b",
"paymentType": "DB",
"amount": "18.99",
"currency": "EUR",
"descriptor": "5919.5004.6948 MAC_Channel ",
"result": {
"code": "000.100.110",
"description": "Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"resultDetails": {
"Payment Status": "CLO",
"ConnectorTxID1": "payment_55cd30eb3b5a499b3a3a2f5b6cf3f11a",
"Cvv Check": "unchecked",
"Transaction Status": "SUCCESS",
"ConnectorTxID3": "123456",
"Amount": "0.0",
"Operation Id": "64403c94-0978-4d5f-abd7-28a4e5d99556",
"Payment Method Category": "card",
"CardholderInitiatedTransactionID": "123456",
"ExtendedDescription": "Transaction succeeded",
"Customer Token": "cus_4d184daa989cac82224b856bac739b60",
"Paid Amount": "0.0",
"Payment Account Reference": "V001NPX3IQC6OFS2TAWCVD2WTXRWY",
"Sender Details": "{\"address\":\"null\",\"firstName\":\"null\",\"lastName\":\"null\",\"postcode\":\"null\",\"city\":\"AE\",\"state\":\"null\",\"country\":\"null\",\"companyName\":\"null\"}",
"AcquirerResponse": "SUCCESS",
"Beneficiary Details": "{\"firstName\":\"null\",\"lastName\":\"null\",\"address\":\"null\",\"dob\":\"null\",\"gender\":\"null\",\"email\":\"null\",\"state\":\"null\",\"cardNumber\":\"null\",\"cardExpirationMonth\":\"null\",\"cardExpirationYear\":\"null\",\"nationality\":\"null\",\"city\":\"NY\",\"postcode\":\"null\",\"identificationType\":\"null\",\"identificationValue\":\"null\"\"category\":\"null\"}",
"Statement Descriptor": "044153838562 Rapyd Nat"
},
"threeDSecure": {
"eci": "05",
"verificationId": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=",
"version": "2.2.0",
"dsTransactionId": "c75f23af-9454-43f6-ba17-130ed529507e",
"acsTransactionId": "2c42c553-176f-4f08-af6c-f9364ecbd0e8",
"flow": "challenge",
"authenticationStatus": "Y",
"amount": "19.99",
"currency": "EUR"
},
"customParameters": {
"PAYMENT_INHOUSE_FACADE": "true"
},
"risk": {
"score": "0"
},
"buildNumber": "2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp": "2026-03-29 07:19:56+0000",
"ndc": "8a8294174e735d0c014e78cf26461790_cc7ad261c1ab48c7b1dc06ec1d0e99bc",
"standingInstruction": {
"source": "CIT",
"type": "RECURRING",
"mode": "INITIAL",
"initialTransactionId": "123456",
"expiry": "2035-12-31",
"frequency": "0001",
"recurringType": "SUBSCRIPTION"
}
}Payment with token
The merchant submits a subsequent payment based on the card-on-file agreement with the customer. This transaction can be a cardholder-initiated (CIT) or merchant-initiated (MIT) payment.
Send payment using the token
Perform a server-to-server POST request over the stored registration token with all required payment and customer data, including payment type, amount, and currency.
Sample request:
https://sandbox-card.peachpayments.com/v1/registrations/8ac7a4a29d21e3c1019d2958d376782a/payments
curl https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "paymentBrand=VISA" \
-d "paymentType=DB" \
-d "amount=17.99" \
-d "currency=EUR" \
-d "standingInstruction.type=UNSCHEDULED" \
-d "standingInstruction.mode=REPEATED" \
-d "standingInstruction.source=MIT" \
-d "testMode=EXTERNAL" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=" public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.source=MIT" +
"&testMode=EXTERNAL";
string url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.source=MIT" +
"&testMode=EXTERNAL"
def url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&amount=17.99"
+ "¤cy=EUR"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&standingInstruction.mode=REPEATED"
+ "&standingInstruction.source=MIT"
+ "&testMode=EXTERNAL";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path = '/v1/registrations/{id}/payments';
const data = querystring.stringify({
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'paymentType': 'DB',
'amount': '17.99',
'currency': 'EUR',
'standingInstruction.type': 'UNSCHEDULED',
'standingInstruction.mode': 'REPEATED',
'standingInstruction.source': 'MIT',
'testMode': 'EXTERNAL'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function (res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments";
$data = "entityId=8a8294174e735d0c014e78cf26461790" .
"&paymentBrand=VISA" .
"&paymentType=DB" .
"&amount=17.99" .
"¤cy=EUR" .
"&standingInstruction.type=UNSCHEDULED" .
"&standingInstruction.mode=REPEATED" .
"&standingInstruction.source=MIT" .
"&testMode=EXTERNAL";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
data = {
'entityId': '8a8294174e735d0c014e78cf26461790',
'paymentBrand': 'VISA',
'paymentType': 'DB',
'amount': '17.99',
'currency': 'EUR',
'standingInstruction.type': 'UNSCHEDULED',
'standingInstruction.mode': 'REPEATED',
'standingInstruction.source': 'MIT',
'testMode': 'EXTERNAL'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790',
'paymentBrand' => 'VISA',
'paymentType' => 'DB',
'amount' => '17.99',
'currency' => 'EUR',
'standingInstruction.type' => 'UNSCHEDULED',
'standingInstruction.mode' => 'REPEATED',
'standingInstruction.source' => 'MIT',
'testMode' => 'EXTERNAL'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
val data = (""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&amount=17.99"
+ "¤cy=EUR"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&standingInstruction.mode=REPEATED"
+ "&standingInstruction.source=MIT"
+ "&testMode=EXTERNAL"
)
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST")
case _ => throw new ClassCastException
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream())
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
return IOUtils.toString(conn.getErrorStream())
}
else {
return IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&amount=17.99" +
"¤cy=EUR" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.source=MIT" +
"&testMode=EXTERNAL"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id": "8ac7a4a19d2fd573019d3877f3ca3eb4",
"paymentType": "DB",
"amount": "17.99",
"currency": "EUR",
"descriptor": "7897.8412.7204 MAC_Channel ",
"result": {
"code": "000.100.110",
"description": "Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"resultDetails": {
"Payment Status": "CLO",
"ConnectorTxID1": "payment_55cd30eb3b5a499b3a3a2f5b6cf3f11a",
"Cvv Check": "unchecked",
"Transaction Status": "SUCCESS",
"ConnectorTxID3": "123456",
"Amount": "0.0",
"Operation Id": "64403c94-0978-4d5f-abd7-28a4e5d99556",
"Payment Method Category": "card",
"CardholderInitiatedTransactionID": "123456",
"ExtendedDescription": "Transaction succeeded",
"Customer Token": "cus_4d184daa989cac82224b856bac739b60",
"Paid Amount": "0.0",
"Payment Account Reference": "V001NPX3IQC6OFS2TAWCVD2WTXRWY",
"Sender Details": "{\"address\":\"null\",\"firstName\":\"null\",\"lastName\":\"null\",\"postcode\":\"null\",\"city\":\"AE\",\"state\":\"null\",\"country\":\"null\",\"companyName\":\"null\"}",
"AcquirerResponse": "SUCCESS",
"Beneficiary Details": "{\"firstName\":\"null\",\"lastName\":\"null\",\"address\":\"null\",\"dob\":\"null\",\"gender\":\"null\",\"email\":\"null\",\"state\":\"null\",\"cardNumber\":\"null\",\"cardExpirationMonth\":\"null\",\"cardExpirationYear\":\"null\",\"nationality\":\"null\",\"city\":\"NY\",\"postcode\":\"null\",\"identificationType\":\"null\",\"identificationValue\":\"null\"\"category\":\"null\"}",
"Statement Descriptor": "044153838562 Rapyd Nat"
},
"customParameters": {
"PAYMENT_INHOUSE_FACADE": "true"
},
"risk": {
"score": "0"
},
"buildNumber": "2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp": "2026-03-29 07:21:18+0000",
"ndc": "8a8294174e735d0c014e78cf26461790_def05a9a5dc940b7a1a81b5bc767344b",
"standingInstruction": {
"source": "MIT",
"type": "UNSCHEDULED",
"mode": "REPEATED",
"initialTransactionId": "123456"
}
}Token deletion
The merchant initiates a deletion request for the registration token. The system disables the deregistered token, preventing its use in subsequent payments.
https://sandbox-card.peachpayments.com/v1/registrations/8ac7a4a29d21e3c1019d2958d376782a
Sample request:
curl -X DELETE "https://sandbox-card.peachpayments.com/v1/registrations/{id}?entityId=8a8294174e735d0c014e78cf26461790" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790";
string url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}?" + data;
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "DELETE";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790"
def url = ("https://sandbox-card.peachpayments.com/v1/registrations/{id}?" + data).toURL()
def connection = url.openConnection()
connection.setRequestMethod("DELETE")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations/{id}?entityId=8a8294174e735d0c014e78cf26461790");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("DELETE");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
var path = '/v1/registrations/{id}';
path += '?entityId=8a8294174e735d0c014e78cf26461790';
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'DELETE',
headers: {
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function (res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}";
$url .= "?entityId=8a8294174e735d0c014e78cf26461790";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}"
url += '?entityId=8a8294174e735d0c014e78cf26461790'
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=b'')
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'DELETE'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
path = ("?entityId=8a8294174e735d0c014e78cf26461790")
uri = URI.parse('https://sandbox-card.peachpayments.com/v1/registrations/{id}' + path)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
res = http.delete(uri.request_uri)
return JSON.parse(res.body)
end
puts request()def initialPayment : String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}"
url +="?entityId=8a8294174e735d0c014e78cf26461790"
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("DELETE")
case _ => throw new ClassCastException
}
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
return IOUtils.toString(conn.getErrorStream())
}
else {
return IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations/{id}" + _
"?entityId=8a8294174e735d0c014e78cf26461790"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "DELETE"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim res As WebResponse = req.GetResponse()
Dim resStream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id":"8ac7a4a29d21e3c1019d295b3bcc0052",
"referencedId":"8ac7a4a29d21e3c1019d2958d376782a",
"result":{
"code":"000.100.110",
"description":"Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"buildNumber":"9092e7a6af8301accda2f9a3a38f743f907dadd5@2026-03-23 16:50:06 +0000",
"timestamp":"2026-03-26 08:55:38+0000",
"ndc":"8a8294174e735d0c014e78cf26461790_91d4aa2e75214ef39b46726fb5eff7db"
}Token extension
The merchant has business requirements to keep unused registration tokens alive for a longer period than stipulated by the Data Retention Policy. The default retention period can extend up to 24 months. This applies to both card and non-card registration tokens. Examples:
- The system generates a card-based registration token today with an expiry date of 1-Feb-Y1. By default, the token deletes 14 months after the card expires, which is 1-Apr-Y2. If there is a good reason to keep the registration token for a longer period, the 14-month retention period can adjust.
- The same rule applies for a non-card-based registration token. However, the token deletes 14 months after the last transaction performed with that registration token.
For further details, read the Data retention policy.
Perform a server-to-server POST request over the stored registration token to extend its retention. Do not include any extra parameters in the request.
Sample request:
https://sandbox-card.peachpayments.com/v1/registrations/8ac7a4a29d21e3c1019d2958d376782a/extendlife
curl https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data = "entityId=8a8294174e735d0c014e78cf26461790";
string url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife";
byte[] buffer = Encoding.ASCII.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.Headers["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=";
request.ContentType = "application/x-www-form-urlencoded";
Stream PostData = request.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
var s = new JavaScriptSerializer();
responseData = s.Deserialize<Dictionary<string, dynamic>>(reader.ReadToEnd());
reader.Close();
dataStream.Close();
}
return responseData;
}
responseData = Request()["result"]["description"];import groovy.json.JsonSlurper
public static String request() {
def data = "entityId=8a8294174e735d0c014e78cf26461790"
def url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife".toURL()
def connection = url.openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream << data
def json = new JsonSlurper().parseText(connection.inputStream.text)
json
}
println request()private String request() throws IOException {
URL url = new URL("https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = ""
+ "entityId=8a8294174e735d0c014e78cf26461790";
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}const https = require('https');
const querystring = require('querystring');
const request = async () => {
const path = '/v1/registrations/{id}/extendlife';
const data = querystring.stringify({
'entityId': '8a8294174e735d0c014e78cf26461790'
});
const options = {
port: 443,
host: 'sandbox-card.peachpayments.com',
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length,
'Authorization': 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
}
};
return new Promise((resolve, reject) => {
const postRequest = https.request(options, function(res) {
const buf = [];
res.on('data', chunk => {
buf.push(Buffer.from(chunk));
});
res.on('end', () => {
const jsonString = Buffer.concat(buf).toString('utf8');
try {
resolve(JSON.parse(jsonString));
} catch (error) {
reject(error);
}
});
});
postRequest.on('error', reject);
postRequest.write(data);
postRequest.end();
});
};
request().then(console.log).catch(console.error);function request() {
$url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife";
$data = "entityId=8a8294174e735d0c014e78cf26461790";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$responseData = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return $responseData;
}
$responseData = request();try:
from urllib.parse import urlencode
from urllib.request import build_opener, Request, HTTPHandler
from urllib.error import HTTPError, URLError
except ImportError:
from urllib import urlencode
from urllib2 import build_opener, Request, HTTPHandler, HTTPError, URLError
import json
def request():
url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife"
data = {
'entityId' : '8a8294174e735d0c014e78cf26461790'
}
try:
opener = build_opener(HTTPHandler)
request = Request(url, data=urlencode(data).encode('utf-8'))
request.add_header('Authorization', 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
request.get_method = lambda: 'POST'
response = opener.open(request)
return json.loads(response.read())
except HTTPError as e:
return json.loads(e.read())
except URLError as e:
return e.reason
responseData = request()
print(responseData)require 'net/https'
require 'uri'
require 'json'
def request()
uri = URI('https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path)
req.set_form_data({
'entityId' => '8a8294174e735d0c014e78cf26461790'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment: String = {
val url = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife"
val data = (""
+ "entityId=8a8294174e735d0c014e78cf26461790"
)
val conn = new URL(url).openConnection()
conn match {
case secureConn: HttpsURLConnection => secureConn.setRequestMethod("POST")
case _ => throw new ClassCastException
}
conn.setDoInput(true)
conn.setDoOutput(true)
IOUtils.write(data, conn.getOutputStream())
conn.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
conn.connect()
if (conn.getResponseCode() >= 400) {
return IOUtils.toString(conn.getErrorStream())
}
else {
return IOUtils.toString(conn.getInputStream())
}
}Public Function Request() As Dictionary(Of String, Object)
Dim url As String = "https://sandbox-card.peachpayments.com/v1/registrations/{id}/extendlife"
Dim data As String = "" + "entityId=8a8294174e735d0c014e78cf26461790"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
req.ContentType = "application/x-www-form-urlencoded"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(data)
req.ContentLength = byteArray.Length
Dim dataStream As Stream = req.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim res As WebResponse = req.GetResponse()
Dim resStream As Stream = res.GetResponseStream()
Dim reader As New StreamReader(resStream)
Dim response As String = reader.ReadToEnd()
reader.Close()
resStream.Close()
res.Close()
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(response)
Return dict
End Function
responseData = Request()("result")("description"){
"id":"8ac7a4a29d2d45a8019d2eb70e221304",
"referencedId":"8ac7a4a29d2d45a8019d2eafd27f74d4",
"result":{
"code":"000.100.110",
"description":"Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"buildNumber":"2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp":"2026-03-27 09:54:01+0000",
"ndc":"8a8294174e735d0c014e78cf26461790_93dd44af96564ed6945b232fa571673a"
}Updated about 7 hours ago