Card-on-file
Overview
You can perform recurring payments by adding one extra parameter, standingInstruction, to the payment request.
A recurring workflow consists of two phases:
- The initial payment request
- Subsequent payment requests
Send the initial payment
During the initial payment, marked by the parameter standingInstruction.mode with the value INITIAL, standingInstruction.type with the value UNSCHEDULED, and standingInstruction.source with the value CIT, the customer is present. This initial request should contain extra parameters that authenticate the customer, like card.cvv for card payments, and you can also include checks like 3-D Secure.
In COPYandPAY, this behaviour comes standard. To enable it, follow the COPYandPAY integration guide and add the following parameters to the /checkouts request in step 1:
standingInstruction.mode=INITIAL
standingInstruction.type=UNSCHEDULED
standingInstruction.source=CITstandingInstruction.mode=INITIAL
standingInstruction.type=RECURRING
standingInstruction.source=CITstandingInstruction.mode=INITIAL
standingInstruction.type=INSTALLMENT
standingInstruction.source=CITCheck the card-on-file section for possible standingInstruction parameters. For the Server-to-Server integration, you have the option to append the standingInstruction parameter to the initial /payments request that also stores the token, as shown in the following example:
curl https://sandbox-card.peachpayments.com/v1/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=92.00" \
-d "currency=EUR" \
-d "paymentBrand=VISA" \
-d "paymentType=DB" \
-d "card.number=4200000000000000" \
-d "card.holder=Jane Jones" \
-d "card.expiryMonth=05" \
-d "card.expiryYear=2034" \
-d "card.cvv=123" \
-d "standingInstruction.mode=INITIAL" \
-d "standingInstruction.source=CIT" \
-d "standingInstruction.type=UNSCHEDULED" \
-d "createRegistration=true" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data="entityId=8a8294174e735d0c014e78cf26461790" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&card.number=4200000000000000" +
"&card.holder=Jane Jones" +
"&card.expiryMonth=05" +
"&card.expiryYear=2034" +
"&card.cvv=123" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&standingInstruction.type=UNSCHEDULED" +
"&createRegistration=true";
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" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&card.number=4200000000000000" +
"&card.holder=Jane Jones" +
"&card.expiryMonth=05" +
"&card.expiryYear=2034" +
"&card.cvv=123" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&standingInstruction.type=UNSCHEDULED" +
"&createRegistration=true"
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"
+ "&amount=92.00"
+ "¤cy=EUR"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&card.number=4200000000000000"
+ "&card.holder=Jane Jones"
+ "&card.expiryMonth=05"
+ "&card.expiryYear=2034"
+ "&card.cvv=123"
+ "&standingInstruction.mode=INITIAL"
+ "&standingInstruction.source=CIT"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&createRegistration=true";
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',
'amount':'92.00',
'currency':'EUR',
'paymentBrand':'VISA',
'paymentType':'DB',
'card.number':'4200000000000000',
'card.holder':'Jane Jones',
'card.expiryMonth':'05',
'card.expiryYear':'2034',
'card.cvv':'123',
'standingInstruction.mode':'INITIAL',
'standingInstruction.source':'CIT',
'standingInstruction.type':'UNSCHEDULED',
'createRegistration':'true'
});
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" .
"&amount=92.00" .
"¤cy=EUR" .
"&paymentBrand=VISA" .
"&paymentType=DB" .
"&card.number=4200000000000000" .
"&card.holder=Jane Jones" .
"&card.expiryMonth=05" .
"&card.expiryYear=2034" .
"&card.cvv=123" .
"&standingInstruction.mode=INITIAL" .
"&standingInstruction.source=CIT" .
"&standingInstruction.type=UNSCHEDULED" .
"&createRegistration=true";
$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',
'amount' : '92.00',
'currency' : 'EUR',
'paymentBrand' : 'VISA',
'paymentType' : 'DB',
'card.number' : '4200000000000000',
'card.holder' : 'Jane Jones',
'card.expiryMonth' : '05',
'card.expiryYear' : '2034',
'card.cvv' : '123',
'standingInstruction.mode' : 'INITIAL',
'standingInstruction.source' : 'CIT',
'standingInstruction.type' : 'UNSCHEDULED',
'createRegistration' : 'true'
}
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',
'amount' => '92.00',
'currency' => 'EUR',
'paymentBrand' => 'VISA',
'paymentType' => 'DB',
'card.number' => '4200000000000000',
'card.holder' => 'Jane Jones',
'card.expiryMonth' => '05',
'card.expiryYear' => '2034',
'card.cvv' => '123',
'standingInstruction.mode' => 'INITIAL',
'standingInstruction.source' => 'CIT',
'standingInstruction.type' => 'UNSCHEDULED',
'createRegistration' => 'true'
})
res = http.request(req)
return JSON.parse(res.body)
end
puts request()def initialPayment : String = {
val url = "https://sandbox-card.peachpayments.com/v1/payments"
val data = (""
+ "entityId=8a8294174e735d0c014e78cf26461790"
+ "&amount=92.00"
+ "¤cy=EUR"
+ "&paymentBrand=VISA"
+ "&paymentType=DB"
+ "&card.number=4200000000000000"
+ "&card.holder=Jane Jones"
+ "&card.expiryMonth=05"
+ "&card.expiryYear=2034"
+ "&card.cvv=123"
+ "&standingInstruction.mode=INITIAL"
+ "&standingInstruction.source=CIT"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&createRegistration=true"
)
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/payments"
Dim data As String = "" +
"entityId=8a8294174e735d0c014e78cf26461790" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentBrand=VISA" +
"&paymentType=DB" +
"&card.number=4200000000000000" +
"&card.holder=Jane Jones" +
"&card.expiryMonth=05" +
"&card.expiryYear=2034" +
"&card.cvv=123" +
"&standingInstruction.mode=INITIAL" +
"&standingInstruction.source=CIT" +
"&standingInstruction.type=UNSCHEDULED" +
"&createRegistration=true"
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":"8ac7a4a29d2d45a8019d2d7ea4724bcb",
"registrationId":"8ac7a49f9d2d37ef019d2d7ea35f7afe",
"paymentType":"DB",
"paymentBrand":"VISA",
"amount":"92.00",
"currency":"EUR",
"descriptor":"9854.7094.8388 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"
},
"card":{
"bin":"420000",
"last4Digits":"0000",
"holder":"Jane Jones",
"expiryMonth":"05",
"expiryYear":"2034"
},
"customParameters":{
"PAYMENT_INHOUSE_FACADE":"true",
"OPP_card.bin":"420000"
},
"risk":{
"score":"100"
},
"buildNumber":"2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp":"2026-03-27 04:12:47+0000",
"ndc":"8a8294174e735d0c014e78cf26461790_243e65d3ec394b22a2b5879af7bfa823",
"standingInstruction":{
"source":"CIT",
"type":"UNSCHEDULED",
"mode":"INITIAL",
"initialTransactionId":"123456"
}
}For some cases, you might want to use an alternative approach: if the customer registered their data without sending a payment at the same time, you would send their payment directly to the /registrations endpoint as described in the Server-to-Server tokenisation guide. In the same way as described above, add the standingInstruction.mode=INITIAL, standingInstruction.type=UNSCHEDULED, and standingInstruction.source=CIT parameters to the request to flag that this is the first in a series of recurring payments.
Visit the tokenisation tutorial for more details on the Server-to-Server option using either /payments or /registrations.
Send a subsequent payment
Any payment request following the initial one must include the following parameters:
standingInstruction.modewith the valueREPEATEDstandingInstruction.typewith the valueUNSCHEDULEDstandingInstruction.sourcewith the valueMITstandingInstruction.initialTransactionIdwith the value received in the response of the initial CIT transaction
This flag indicates that the request is part of a series of payments on this account but also tells the payment system that no user is present. Parameters like card.cvv or 3-D authentication shouldn't be present for that reason. Combined with the stored payment data of the registration, this reduces the number of parameters in such a request:
standingInstruction.mode=REPEATED
standingInstruction.type=UNSCHEDULED
standingInstruction.source=MITstandingInstruction.mode=REPEATED
standingInstruction.type=RECURRING
standingInstruction.initialTransactionId=123456780 Note: This value is received in the original CIT transaction response
standingInstruction.source=MITstandingInstruction.mode=REPEATED
standingInstruction.type=INSTALLMENT
standingInstruction.source=MIT
standingInstruction.initialTransactionId=123456780 // Note: This value is received in original CIT transaction responseSee the card-on-file API reference for possible standingInstruction parameters.
curl https://sandbox-card.peachpayments.com/v1/registrations/{id}/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=92.00" \
-d "currency=EUR" \
-d "paymentType=PA" \
-d "standingInstruction.mode=REPEATED" \
-d "standingInstruction.type=UNSCHEDULED" \
-d "standingInstruction.source=MIT" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="public Dictionary<string, dynamic> Request() {
Dictionary<string, dynamic> responseData;
string data="entityId=8a8294174e735d0c014e78cf26461790" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentType=PA" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.source=MIT";
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" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentType=PA" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.source=MIT"
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"
+ "&amount=92.00"
+ "¤cy=EUR"
+ "&paymentType=PA"
+ "&standingInstruction.mode=REPEATED"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&standingInstruction.source=MIT";
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',
'amount':'92.00',
'currency':'EUR',
'paymentType':'PA',
'standingInstruction.mode':'REPEATED',
'standingInstruction.type':'UNSCHEDULED',
'standingInstruction.source':'MIT'
});
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" .
"&amount=92.00" .
"¤cy=EUR" .
"&paymentType=PA" .
"&standingInstruction.mode=REPEATED" .
"&standingInstruction.type=UNSCHEDULED" .
"&standingInstruction.source=MIT";
$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',
'amount' : '92.00',
'currency' : 'EUR',
'paymentType' : 'PA',
'standingInstruction.mode' : 'REPEATED',
'standingInstruction.type' : 'UNSCHEDULED',
'standingInstruction.source' : 'MIT'
}
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',
'amount' => '92.00',
'currency' => 'EUR',
'paymentType' => 'PA',
'standingInstruction.mode' => 'REPEATED',
'standingInstruction.type' => 'UNSCHEDULED',
'standingInstruction.source' => 'MIT'
})
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"
+ "&amount=92.00"
+ "¤cy=EUR"
+ "&paymentType=PA"
+ "&standingInstruction.mode=REPEATED"
+ "&standingInstruction.type=UNSCHEDULED"
+ "&standingInstruction.source=MIT"
)
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" +
"&amount=92.00" +
"¤cy=EUR" +
"&paymentType=PA" +
"&standingInstruction.mode=REPEATED" +
"&standingInstruction.type=UNSCHEDULED" +
"&standingInstruction.source=MIT"
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":"8ac7a49f9d2d37ef019d2d808cb17da5",
"paymentType":"PA",
"amount":"92.00",
"currency":"EUR",
"descriptor":"1311.7755.6772 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":"100"
},
"buildNumber":"2a7cf1d3d14ccb52500fbcb1ceb7ff4a15b6843b@2026-03-27 00:42:41 +0000",
"timestamp":"2026-03-27 04:14:52+0000",
"ndc":"8a8294174e735d0c014e78cf26461790_cafe15cf951c4648940861d2e174cb9f",
"standingInstruction":{
"source":"MIT",
"type":"UNSCHEDULED",
"mode":"REPEATED",
"initialTransactionId":"123456"
}
}Updated about 7 hours ago