Smart Retry integration guide

Last updated: 2026-03-26

This guide helps you optimise payment processing with Smart Retry. Transactions are intelligently routed to the best acquirers to boost acceptance rates and conversions. To get started, enable the necessary configuration settings:

  • Soft bank reject codes: Customise or use the default list to retry failed transactions.
  • Standalone payments: Automatically retry failed transactions with a fallback acquirer.
  • Card on file payments: Automatically retry unscheduled, recurring, or instalment payments.
  • Fallback merchant account: Configure a fallback account to direct transactions to the preferred acquirer.

Engage with the Customer Success Manager to understand which acquirers are compatible as fallbacks for COF payments.

Use cases

Use caseSummary
Fallback acquirerSmart Retry with the same or a different acquirer.
SCA on fallback acquirerSmart Retry with SCA results after a fallback acquirer requests it due to a soft decline.

Fallback acquirer

The merchant initiates the payment authorisation with Acquirer A and due to a Soft Bank Reject the payment is automatically retried with the fallback Acquirer B.

How it works

  1. Smart retry with the fallback acquirer. Retry the payment request with the fallback acquirer upon a soft bank reject. Transactions: DB - Soft Bank Reject.
  2. Optional: Manage the payment. Send the back-office payment request to the fallback acquirer if the original payment was processed there. Transactions: RF, CB, CR, RB.

1. Smart retry with the fallback acquirer

Initiate a Server-to-Server POST request with the required payment data. If the default acquirer is temporarily unavailable, the transaction is routed to the fallback acquirer. The response to a successful request includes an id that should be stored and used in subsequent back-office operations.

Simulating a Soft Bank Reject

To simulate a soft bank reject, use the card.holder parameter in the request with the appropriate soft bank reject code.

📘

You can use any of the following response codes to simulate a decline:

  • 800.100.100
  • 800.100.152
  • 800.100.154
  • 800.100.158
  • 800.100.163
  • 800.100.164
  • 800.100.176
  • 900.100.100
  • 900.100.200
  • 900.100.201
  • 900.100.300
  • 900.100.400
  • 900.100.600

Sample request:

curl https://sandbox-card.peachpayments.com/v1/payments \
 -d "entityId=YOUR_ENTITY_ID" \
 -d "paymentBrand=VISA" \
 -d "card.holder=800.100.100" \
 -d "amount=19.99" \
 -d "paymentType=DB" \
 -d "currency=EUR" \
 -d "testMode=EXTERNAL" \
 -d "card.number=4242420268342714" \
 -d "card.expiryMonth=12" \
 -d "card.expiryYear=2027" \
 -d "card.cvv=123" \
 -d "[email protected]" \
 -d "customer.givenName=Smith" \
 -d "customer.ip=192.168.0.0" \
 -d "customer.surname=John" \
 -d "customer.language=DE" \
 -d "billing.city=MyCity" \
 -d "billing.country=DE" \
 -d "billing.postcode=712121" \
 -d "billing.state=DE" \
 -d "billing.street1=MyStreet" \
 -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=MTIzNDU2Nzg5MDEyMzQ1Njc40TA=" \
 -d "threeDSecure.amount=19.99" \
 -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
using System.Net.Http;
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox-card.peachpayments.com/v1/payments");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_ACCESS_TOKEN");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string>
{
  ["entityId"] = "YOUR_ENTITY_ID",
  ["paymentBrand"] = "VISA",
  ["card.holder"] = "800.100.100",
  ["amount"] = "19.99",
  ["paymentType"] = "DB",
  ["currency"] = "EUR",
  ["testMode"] = "EXTERNAL",
  ["card.number"] = "4242420268342714",
  ["card.expiryMonth"] = "12",
  ["card.expiryYear"] = "2027",
  ["card.cvv"] = "123",
  ["customer.email"] = "[email protected]",
  ["customer.givenName"] = "Smith",
  ["customer.ip"] = "192.168.0.0",
  ["customer.surname"] = "John",
  ["customer.language"] = "DE",
  ["billing.city"] = "MyCity",
  ["billing.country"] = "DE",
  ["billing.postcode"] = "712121",
  ["billing.state"] = "DE",
  ["billing.street1"] = "MyStreet",
  ["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"] = "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  ["threeDSecure.amount"] = "19.99"
});
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
def url = "https://sandbox-card.peachpayments.com/v1/payments"
def body = [
  entityId: "YOUR_ENTITY_ID",
  paymentBrand: "VISA",
  "card.holder": "800.100.100",
  amount: "19.99",
  paymentType: "DB",
  currency: "EUR",
  testMode: "EXTERNAL",
  "card.number": "4242420268342714",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet",
  "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": "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  "threeDSecure.amount": "19.99"
]
def connection = new URL(url).openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer YOUR_ACCESS_TOKEN")
connection.doOutput = true
connection.outputStream.withWriter { it << body.collect { k, v -> "$k=$v" }.join("&") }
def response = connection.inputStream.text
HttpClient client = HttpClient.newHttpClient();
String body = "entityId=YOUR_ENTITY_ID" +
  "&paymentBrand=VISA" +
  "&card.holder=800.100.100" +
  "&amount=19.99" +
  "&paymentType=DB" +
  "&currency=EUR" +
  "&testMode=EXTERNAL" +
  "&card.number=4242420268342714" +
  "&card.expiryMonth=12" +
  "&card.expiryYear=2027" +
  "&card.cvv=123" +
  "&[email protected]" +
  "&customer.givenName=Smith" +
  "&customer.ip=192.168.0.0" +
  "&customer.surname=John" +
  "&customer.language=DE" +
  "&billing.city=MyCity" +
  "&billing.country=DE" +
  "&billing.postcode=712121" +
  "&billing.state=DE" +
  "&billing.street1=MyStreet" +
  "&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=MTIzNDU2Nzg5MDEyMzQ1Njc40TA=" +
  "&threeDSecure.amount=19.99";
HttpRequest request = HttpRequest.newBuilder()
  .uri(URI.create("https://sandbox-card.peachpayments.com/v1/payments"))
  .header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .POST(HttpRequest.BodyPublishers.ofString(body))
  .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
const fetch = require("node-fetch");

const body = new URLSearchParams({
  entityId: "YOUR_ENTITY_ID",
  paymentBrand: "VISA",
  "card.holder": "800.100.100",
  amount: "19.99",
  paymentType: "DB",
  currency: "EUR",
  testMode: "EXTERNAL",
  "card.number": "4242420268342714",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet",
  "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": "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  "threeDSecure.amount": "19.99"
});

const response = await fetch("https://sandbox-card.peachpayments.com/v1/payments", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" },
  body
});
const data = await response.text();
$url = "https://sandbox-card.peachpayments.com/v1/payments";
$data = http_build_query([
  "entityId" => "YOUR_ENTITY_ID",
  "paymentBrand" => "VISA",
  "card.holder" => "800.100.100",
  "amount" => "19.99",
  "paymentType" => "DB",
  "currency" => "EUR",
  "testMode" => "EXTERNAL",
  "card.number" => "4242420268342714",
  "card.expiryMonth" => "12",
  "card.expiryYear" => "2027",
  "card.cvv" => "123",
  "customer.email" => "[email protected]",
  "customer.givenName" => "Smith",
  "customer.ip" => "192.168.0.0",
  "customer.surname" => "John",
  "customer.language" => "DE",
  "billing.city" => "MyCity",
  "billing.country" => "DE",
  "billing.postcode" => "712121",
  "billing.state" => "DE",
  "billing.street1" => "MyStreet",
  "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" => "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  "threeDSecure.amount" => "19.99"
]);

$options = [
  "http" => [
    "method" => "POST",
    "header" => "Authorization: Bearer YOUR_ACCESS_TOKEN\r\n" .
                "Content-Type: application/x-www-form-urlencoded\r\n",
    "content" => $data
  ]
];

$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
import requests

payload = {
  "entityId": "YOUR_ENTITY_ID",
  "paymentBrand": "VISA",
  "card.holder": "800.100.100",
  "amount": "19.99",
  "paymentType": "DB",
  "currency": "EUR",
  "testMode": "EXTERNAL",
  "card.number": "4242420268342714",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet",
  "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": "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  "threeDSecure.amount": "19.99"
}

response = requests.post(
  "https://sandbox-card.peachpayments.com/v1/payments",
  headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN"},
  data=payload
)
require "net/http"

uri = URI("https://sandbox-card.peachpayments.com/v1/payments")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer YOUR_ACCESS_TOKEN"
request.set_form_data(
  "entityId" => "YOUR_ENTITY_ID",
  "paymentBrand" => "VISA",
  "card.holder" => "800.100.100",
  "amount" => "19.99",
  "paymentType" => "DB",
  "currency" => "EUR",
  "testMode" => "EXTERNAL",
  "card.number" => "4242420268342714",
  "card.expiryMonth" => "12",
  "card.expiryYear" => "2027",
  "card.cvv" => "123",
  "customer.email" => "[email protected]",
  "customer.givenName" => "Smith",
  "customer.ip" => "192.168.0.0",
  "customer.surname" => "John",
  "customer.language" => "DE",
  "billing.city" => "MyCity",
  "billing.country" => "DE",
  "billing.postcode" => "712121",
  "billing.state" => "DE",
  "billing.street1" => "MyStreet",
  "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" => "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
  "threeDSecure.amount" => "19.99"
)
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
import scalaj.http._

val response = Http("https://sandbox-card.peachpayments.com/v1/payments")
  .postForm(Seq(
    "entityId" -> "YOUR_ENTITY_ID",
    "paymentBrand" -> "VISA",
    "card.holder" -> "800.100.100",
    "amount" -> "19.99",
    "paymentType" -> "DB",
    "currency" -> "EUR",
    "testMode" -> "EXTERNAL",
    "card.number" -> "4242420268342714",
    "card.expiryMonth" -> "12",
    "card.expiryYear" -> "2027",
    "card.cvv" -> "123",
    "customer.email" -> "[email protected]",
    "customer.givenName" -> "Smith",
    "customer.ip" -> "192.168.0.0",
    "customer.surname" -> "John",
    "customer.language" -> "DE",
    "billing.city" -> "MyCity",
    "billing.country" -> "DE",
    "billing.postcode" -> "712121",
    "billing.state" -> "DE",
    "billing.street1" -> "MyStreet",
    "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" -> "MTIzNDU2Nzg5MDEyMzQ1Njc40TA=",
    "threeDSecure.amount" -> "19.99"
  ))
  .header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
  .asString
Imports System.Net
Imports System.Text

Dim url = "https://sandbox-card.peachpayments.com/v1/payments"
Dim data = "entityId=YOUR_ENTITY_ID&paymentBrand=VISA&card.holder=800.100.100&amount=19.99&paymentType=DB&currency=EUR&testMode=EXTERNAL&card.number=4242420268342714&card.expiryMonth=12&card.expiryYear=2027&card.cvv=123&[email protected]&customer.givenName=Smith&customer.ip=192.168.0.0&customer.surname=John&customer.language=DE&billing.city=MyCity&billing.country=DE&billing.postcode=712121&billing.state=DE&billing.street1=MyStreet&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=MTIzNDU2Nzg5MDEyMzQ1Njc40TA=&threeDSecure.amount=19.99"
Dim request = CType(WebRequest.Create(url), HttpWebRequest)
request.Method = "POST"
request.Headers.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
request.ContentType = "application/x-www-form-urlencoded"
Dim bytes = Encoding.UTF8.GetBytes(data)
request.ContentLength = bytes.Length
Using stream = request.GetRequestStream()
  stream.Write(bytes, 0, bytes.Length)
End Using
Dim response = CType(request.GetResponse(), HttpWebResponse)
{
  "id":"8ac7a4a19d2a59fa019d2a982c110971",
  "paymentType":"DB",
  "paymentBrand":"VISA",
  "amount":"19.99",
  "currency":"EUR",
  "descriptor":"0344.0840.7076 SmartRetry_Channel ",
  "result":{
    "code":"000.100.112",
    "description":"Request successfully processed in 'Merchant in Connector Test Mode'"
  },
  "resultDetails":{
    "ExtendedDescription":"Approved or completed successfully",
    "ConnectorTxID1":"772225",
    "ConnectorTxID3":"71E00629",
    "AcquirerResponse":"00",
    "reconciliationId":"034408407076"
  },
  "card":{
    "bin":"424242",
    "last4Digits":"7741",
    "holder":"800.100.100",
    "expiryMonth":"12",
    "expiryYear":"2027"
  },
  "customer":{
    "givenName":"Smith",
    "surname":"John",
    "email":"[email protected]",
    "ip":"192.168.0.0",
    "language":"DE"
  },
  "billing":{
    "street1":"MyStreet",
    "city":"MyCity",
    "state":"DE",
    "postcode":"712121",
    "country":"DE"
  },
  "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"
  },
  "buildNumber":"9092e7a6af8301accda2f9a3a38f743f907dadd5@2026-03-23 16:50:06 +0000",
  "timestamp":"2026-03-26 14:41:49+0000",
  "ndc":"8ac7a4c793bdf2a00193bff58b4202ff_d5007e22b9ad4172a164f7381b8d6660",
  "processingDetails":{
    "transactions":[
      {
        "reason":"smartRetry",
        "transactionId":"8ac7a4a19d2a59fa019d2a982b8a0960",
        "clearingInstituteName":"DUMMY_CI",
        "merchantAccountId":"8ac7a4c793bdf2a00193bff58d1a0304",
        "paymentType":"DB",
        "result":{
          "code":"800.100.100",
          "description":"transaction declined for unknown reason"
        }
      }
    ]
  }
}

2. Manage the payment

Initiate a back-office server-to-server POST request over the authorised payment. If the original payment was processed with the fallback acquirer, the request is handled by the fallback acquirer.

  • Refund either the full captured amount or a part of the captured amount (see refund)
  • Reflect the chargeback processed by the bank (see chargeback)
  • Reflect the chargeback reversal processed by the bank (see chargeback)

SCA upon fallback

The merchant initiates the payment authorisation with Acquirer A and due to a Soft Bank Reject the payment is automatically retried with the fallback Acquirer B. The fallback acquirer soft declines the transaction requesting Strong Customer Authentication (SCA).

How it works

  1. Smart retry with the fallback acquirer. Retry the payment request with the fallback acquirer upon a soft bank reject. Transactions: DB - Soft Bank Reject, DB - Soft Decline.
  2. Redirect to SCA. Redirect the shopper to perform Strong Customer Authentication (SCA). Transactions: DB, 3D.
  3. Get the payment status. Find out if the payment was successful.

1. Smart retry with the fallback acquirer

To simulate a smart retry to the fallback acquirer, initiate a server-to-server POST request with the required payment data. If the default acquirer is temporarily unavailable, the transaction is routed to the fallback acquirer. Strong Customer Authentication (SCA) is requested if the fallback acquirer responds with an issuer soft decline.

Simulating a Soft Bank Reject

To simulate a soft bank reject, use the amount parameter in the request. Based on the specified amount, different types of soft bank rejects can be simulated. To simulate a soft decline with the issuer upon a soft bank reject with the fallback acquirer, use the card.holder parameter with the value 300.100.100.

📘

You can use any of the following response codes to simulate a decline:

  • 800.100.152
  • 800.100.158
  • 900.100.400

Sample request:

curl https://sandbox-card.peachpayments.com/v1/payments \
 -d "entityId=8ac7a4c793bdf2a00193bff58b4202ff" \
 -d "paymentBrand=VISA" \
 -d "card.holder=300.100.100" \
 -d "amount=42.05" \
 -d "paymentType=DB" \
 -d "currency=USD" \
 -d "customParameters[3DS2_enrolled]=true" \
 -d "customParameters[3DS2_flow]=frictionless" \
 -d "shopperResultUrl=https://developer.peachpayments.com/docs/oppwa-integrations-sdr" \
 -d "testMode=EXTERNAL" \
 -d "card.number=4242428524383950" \
 -d "card.expiryMonth=12" \
 -d "card.expiryYear=2027" \
 -d "card.cvv=123" \
 -d "[email protected]" \
 -d "customer.givenName=Smith" \
 -d "customer.ip=192.168.0.0" \
 -d "customer.surname=John" \
 -d "customer.language=DE" \
 -d "billing.city=MyCity" \
 -d "billing.country=DE" \
 -d "billing.postcode=712121" \
 -d "billing.state=DE" \
 -d "billing.street1=MyStreet" \
 -H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="
using System.Net.Http;
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox-card.peachpayments.com/v1/payments");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string>
{
  ["entityId"] = "8ac7a4c793bdf2a00193bff58b4202ff",
  ["paymentBrand"] = "VISA",
  ["card.holder"] = "300.100.100",
  ["amount"] = "42.05",
  ["paymentType"] = "DB",
  ["currency"] = "USD",
  ["customParameters[3DS2_enrolled]"] = "true",
  ["customParameters[3DS2_flow]"] = "frictionless",
  ["shopperResultUrl"] = "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  ["testMode"] = "EXTERNAL",
  ["card.number"] = "4242428524383950",
  ["card.expiryMonth"] = "12",
  ["card.expiryYear"] = "2027",
  ["card.cvv"] = "123",
  ["customer.email"] = "[email protected]",
  ["customer.givenName"] = "Smith",
  ["customer.ip"] = "192.168.0.0",
  ["customer.surname"] = "John",
  ["customer.language"] = "DE",
  ["billing.city"] = "MyCity",
  ["billing.country"] = "DE",
  ["billing.postcode"] = "712121",
  ["billing.state"] = "DE",
  ["billing.street1"] = "MyStreet"
});
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
def url = "https://sandbox-card.peachpayments.com/v1/payments"
def body = [
  entityId: "8ac7a4c793bdf2a00193bff58b4202ff",
  paymentBrand: "VISA",
  "card.holder": "300.100.100",
  amount: "42.05",
  paymentType: "DB",
  currency: "USD",
  "customParameters[3DS2_enrolled]": "true",
  "customParameters[3DS2_flow]": "frictionless",
  shopperResultUrl: "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  testMode: "EXTERNAL",
  "card.number": "4242428524383950",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet"
]
def connection = new URL(url).openConnection()
connection.setRequestMethod("POST")
connection.setRequestProperty("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
connection.doOutput = true
connection.outputStream.withWriter { it << body.collect { k, v -> "$k=$v" }.join("&") }
def response = connection.inputStream.text
HttpClient client = HttpClient.newHttpClient();
String body = "entityId=8ac7a4c793bdf2a00193bff58b4202ff" +
  "&paymentBrand=VISA" +
  "&card.holder=300.100.100" +
  "&amount=42.05" +
  "&paymentType=DB" +
  "&currency=USD" +
  "&customParameters[3DS2_enrolled]=true" +
  "&customParameters[3DS2_flow]=frictionless" +
  "&shopperResultUrl=https://developer.peachpayments.com/docs/oppwa-integrations-sdr" +
  "&testMode=EXTERNAL" +
  "&card.number=4242428524383950" +
  "&card.expiryMonth=12" +
  "&card.expiryYear=2027" +
  "&card.cvv=123" +
  "&[email protected]" +
  "&customer.givenName=Smith" +
  "&customer.ip=192.168.0.0" +
  "&customer.surname=John" +
  "&customer.language=DE" +
  "&billing.city=MyCity" +
  "&billing.country=DE" +
  "&billing.postcode=712121" +
  "&billing.state=DE" +
  "&billing.street1=MyStreet";
HttpRequest request = HttpRequest.newBuilder()
  .uri(URI.create("https://sandbox-card.peachpayments.com/v1/payments"))
  .header("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .POST(HttpRequest.BodyPublishers.ofString(body))
  .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
const fetch = require("node-fetch");

const body = new URLSearchParams({
  entityId: "8ac7a4c793bdf2a00193bff58b4202ff",
  paymentBrand: "VISA",
  "card.holder": "300.100.100",
  amount: "42.05",
  paymentType: "DB",
  currency: "USD",
  "customParameters[3DS2_enrolled]": "true",
  "customParameters[3DS2_flow]": "frictionless",
  shopperResultUrl: "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  testMode: "EXTERNAL",
  "card.number": "4242428524383950",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet"
});

const response = await fetch("https://sandbox-card.peachpayments.com/v1/payments", {
  method: "POST",
  headers: { Authorization: "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=" },
  body
});
const data = await response.text();
$url = "https://sandbox-card.peachpayments.com/v1/payments";
$data = http_build_query([
  "entityId" => "8ac7a4c793bdf2a00193bff58b4202ff",
  "paymentBrand" => "VISA",
  "card.holder" => "300.100.100",
  "amount" => "42.05",
  "paymentType" => "DB",
  "currency" => "USD",
  "customParameters[3DS2_enrolled]" => "true",
  "customParameters[3DS2_flow]" => "frictionless",
  "shopperResultUrl" => "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  "testMode" => "EXTERNAL",
  "card.number" => "4242428524383950",
  "card.expiryMonth" => "12",
  "card.expiryYear" => "2027",
  "card.cvv" => "123",
  "customer.email" => "[email protected]",
  "customer.givenName" => "Smith",
  "customer.ip" => "192.168.0.0",
  "customer.surname" => "John",
  "customer.language" => "DE",
  "billing.city" => "MyCity",
  "billing.country" => "DE",
  "billing.postcode" => "712121",
  "billing.state" => "DE",
  "billing.street1" => "MyStreet"
]);

$options = [
  "http" => [
    "method" => "POST",
    "header" => "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=\r\n" .
                "Content-Type: application/x-www-form-urlencoded\r\n",
    "content" => $data
  ]
];

$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
import requests

payload = {
  "entityId": "8ac7a4c793bdf2a00193bff58b4202ff",
  "paymentBrand": "VISA",
  "card.holder": "300.100.100",
  "amount": "42.05",
  "paymentType": "DB",
  "currency": "USD",
  "customParameters[3DS2_enrolled]": "true",
  "customParameters[3DS2_flow]": "frictionless",
  "shopperResultUrl": "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  "testMode": "EXTERNAL",
  "card.number": "4242428524383950",
  "card.expiryMonth": "12",
  "card.expiryYear": "2027",
  "card.cvv": "123",
  "customer.email": "[email protected]",
  "customer.givenName": "Smith",
  "customer.ip": "192.168.0.0",
  "customer.surname": "John",
  "customer.language": "DE",
  "billing.city": "MyCity",
  "billing.country": "DE",
  "billing.postcode": "712121",
  "billing.state": "DE",
  "billing.street1": "MyStreet"
}

response = requests.post(
  "https://sandbox-card.peachpayments.com/v1/payments",
  headers={"Authorization": "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="},
  data=payload
)
require "net/http"

uri = URI("https://sandbox-card.peachpayments.com/v1/payments")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="
request.set_form_data(
  "entityId" => "8ac7a4c793bdf2a00193bff58b4202ff",
  "paymentBrand" => "VISA",
  "card.holder" => "300.100.100",
  "amount" => "42.05",
  "paymentType" => "DB",
  "currency" => "USD",
  "customParameters[3DS2_enrolled]" => "true",
  "customParameters[3DS2_flow]" => "frictionless",
  "shopperResultUrl" => "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
  "testMode" => "EXTERNAL",
  "card.number" => "4242428524383950",
  "card.expiryMonth" => "12",
  "card.expiryYear" => "2027",
  "card.cvv" => "123",
  "customer.email" => "[email protected]",
  "customer.givenName" => "Smith",
  "customer.ip" => "192.168.0.0",
  "customer.surname" => "John",
  "customer.language" => "DE",
  "billing.city" => "MyCity",
  "billing.country" => "DE",
  "billing.postcode" => "712121",
  "billing.state" => "DE",
  "billing.street1" => "MyStreet"
)
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
import scalaj.http._

val response = Http("https://sandbox-card.peachpayments.com/v1/payments")
  .postForm(Seq(
    "entityId" -> "8ac7a4c793bdf2a00193bff58b4202ff",
    "paymentBrand" -> "VISA",
    "card.holder" -> "300.100.100",
    "amount" -> "42.05",
    "paymentType" -> "DB",
    "currency" -> "USD",
    "customParameters[3DS2_enrolled]" -> "true",
    "customParameters[3DS2_flow]" -> "frictionless",
    "shopperResultUrl" -> "https://developer.peachpayments.com/docs/oppwa-integrations-sdr",
    "testMode" -> "EXTERNAL",
    "card.number" -> "4242428524383950",
    "card.expiryMonth" -> "12",
    "card.expiryYear" -> "2027",
    "card.cvv" -> "123",
    "customer.email" -> "[email protected]",
    "customer.givenName" -> "Smith",
    "customer.ip" -> "192.168.0.0",
    "customer.surname" -> "John",
    "customer.language" -> "DE",
    "billing.city" -> "MyCity",
    "billing.country" -> "DE",
    "billing.postcode" -> "712121",
    "billing.state" -> "DE",
    "billing.street1" -> "MyStreet"
  ))
  .header("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
  .asString
Imports System.Net
Imports System.Text

Dim url = "https://sandbox-card.peachpayments.com/v1/payments"
Dim data = "entityId=8ac7a4c793bdf2a00193bff58b4202ff&paymentBrand=VISA&card.holder=300.100.100&amount=42.05&paymentType=DB&currency=USD&customParameters[3DS2_enrolled]=true&customParameters[3DS2_flow]=frictionless&shopperResultUrl=https://developer.peachpayments.com/docs/oppwa-integrations-sdr&testMode=EXTERNAL&card.number=4242428524383950&card.expiryMonth=12&card.expiryYear=2027&card.cvv=123&[email protected]&customer.givenName=Smith&customer.ip=192.168.0.0&customer.surname=John&customer.language=DE&billing.city=MyCity&billing.country=DE&billing.postcode=712121&billing.state=DE&billing.street1=MyStreet"
Dim request = CType(WebRequest.Create(url), HttpWebRequest)
request.Method = "POST"
request.Headers.Add("Authorization", "Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=")
request.ContentType = "application/x-www-form-urlencoded"
Dim bytes = Encoding.UTF8.GetBytes(data)
request.ContentLength = bytes.Length
Using stream = request.GetRequestStream()
  stream.Write(bytes, 0, bytes.Length)
End Using
Dim response = CType(request.GetResponse(), HttpWebResponse)
{
  "id":"8ac7a49f9d2a5a3b019d2a9bfc0510d1",
  "paymentType":"DB",
  "paymentBrand":"VISA",
  "result":{
    "code":"000.200.000",
    "description":"transaction pending"
  },
  "card":{
    "bin":"424242",
    "last4Digits":"7741",
    "holder":"300.100.100",
    "expiryMonth":"12",
    "expiryYear":"2027"
  },
  "customer":{
    "givenName":"Smith",
    "surname":"John",
    "email":"[email protected]",
    "ip":"192.168.0.0",
    "language":"DE"
  },
  "billing":{
    "street1":"MyStreet",
    "city":"MyCity",
    "state":"DE",
    "postcode":"712121",
    "country":"DE"
  },
  "customParameters":{
    "3DS2_enrolled":"true",
    "3DS2_flow":"frictionless",
    "PAYMENT_INHOUSE_FACADE":"true"
  },
  "redirect":{
    "url":"https://test.oppwa.com/connectors/demo/submit?action=ACI3DS2AccessControlServer&ndcid=8ac7a4c793bdf2a00193bff58b4202ff_fdce053afde24a1d89bd3999907ebb93&acsRequest=CHALLENGE&acsData=eyJUSFJFRURTU0VSVkVSX1VSTCI6Imh0dHBzOi8vdGVzdC5vcHB3YS5jb20vY29ubmVjdG9ycy9hcl9zaW11bGF0b3IvM2RzMjtqc2Vzc2lvbmlkPTJBMTcyQUU0OUM4MjlBREYxMjRENEMwMDE3Qjk3QkFCLnVhdDAxLXZtLWNvbjA0P2FzeW5jc291cmNlPUFDSV8zRFNfMiZ0eXBlPXJlc3VsdHMmbmRjaWQ9OGFjN2E0Yzc5M2JkZjJhMDAxOTNiZmY1OGI0MjAyZmZfZmRjZTA1M2FmZGUyNGExZDg5YmQzOTk5OTA3ZWJiOTMiLCJEU19UUkFOU19JRCI6ImM0ODQzZTg2LTE1ZWYtNDBmMC1hYWEzLTdhYTQ1NGM4ZDBlOCIsIkRBVEUiOiIyNi4wMy4yMDI2IiwiZGVsYXkiOiJOT05FIiwiVEhSRUVEU1NFUlZFUl9UUkFOU19JRCI6IjA0OWVhNDhiLTU3NWYtNDM2OC1hNzc1LTljYWQ3NzI4OTFkNiIsIkFNT1VOVCI6IjQyLjA1IFVTRCIsIk5PVElGSUNBVElPTl9VUkwiOiJodHRwczovL3Rlc3Qub3Bwd2EuY29tL2Nvbm5lY3RvcnMvYXJfc2ltdWxhdG9yLzNkczI7anNlc3Npb25pZD0yQTE3MkFFNDlDODI5QURGMTI0RDRDMDAxN0I5N0JBQi51YXQwMS12bS1jb24wND9hc3luY3NvdXJjZT1BQ0lfM0RTXzImdHlwZT1ub3RpZmljYXRpb24mbmRjaWQ9OGFjN2E0Yzc5M2JkZjJhMDAxOTNiZmY1OGI0MjAyZmZfZmRjZTA1M2FmZGUyNGExZDg5YmQzOTk5OTA3ZWJiOTMiLCJWRVJTSU9OIjoiMi4yLjAiLCJBQ1NfVFJBTlNfSUQiOiI1NjBkMjljYS1iNGQ2LTRhNDMtOTEwMy1lZmM5MWUyODQ4N2IiLCJERVZJQ0VfQ0hBTk5FTCI6IjAyIiwiU0VSVklDRV9UWVBFIjoiVmVyaWZpZWRCeVZJU0EiLCJDQVJEX05VTUJFUiI6IioqKioqKioqKioqKjc3NDEifQ",
    "parameters":[
      {
        "name":"threeDSSessionData",
        "value":""
      },
      {
        "name":"creq",
        "value":"eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiIwNDllYTQ4Yi01NzVmLTQzNjgtYTc3NS05Y2FkNzcyODkxZDYiLCJhY3NUcmFuc0lEIjoiNTYwZDI5Y2EtYjRkNi00YTQzLTkxMDMtZWZjOTFlMjg0ODdiIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjA1In0"
      }
    ]
  },
  "buildNumber":"9092e7a6af8301accda2f9a3a38f743f907dadd5@2026-03-23 16:50:06 +0000",
  "timestamp":"2026-03-26 14:45:58+0000",
  "ndc":"8ac7a4c793bdf2a00193bff58b4202ff_fdce053afde24a1d89bd3999907ebb93",
  "processingDetails":{
    "transactions":[
      {
        "reason":"smartRetry",
        "transactionId":"8ac7a49f9d2a5a3b019d2a9bfb3810ba",
        "clearingInstituteName":"SixCard test",
        "merchantAccountId":"8ac7a4c793bdf2a00193bff590d00305",
        "paymentType":"DB",
        "result":{
          "code":"800.100.152",
          "description":"transaction declined by authorization system"
        }
      },
      {
        "reason":"SCARetry",
        "transactionId":"8ac7a49f9d2a5a3b019d2a9bfbbc10c8",
        "clearingInstituteName":"DUMMY_CI",
        "merchantAccountId":"8ac7a4c793bdf2a00193bff58d1a0304",
        "paymentType":"DB",
        "result":{
          "code":"300.100.100",
          "description":"Transaction declined (additional customer authentication required)"
        }
      }
    ]
  }
}

2. Redirect to SCA

To redirect the account holder for Strong Customer Authentication (SCA), initiate a server-to-server request. The shopper authenticates to proceed with the payment completion. Follow these steps to facilitate the redirection:

  • Interpret the JSON redirect: Extract the redirect information from the response of the initial authorisation payment.
  • Use redirect response parameters: Use these parameters with an HTML form to perform the shopper's redirect.

Redirect response parameters

ParameterDescription
urlThe HTTPS URL for redirection, used as the form's action attribute.
methodThe form submission method, defaults to HTTPS POST.
parametersAppended to the URL for HTTPS GET, or included in the body for HTTPS POST. For HTTPS POST, each parameter is a hidden input field in the HTML form.
<form action="{url}" method="{method}">
<input type="hidden" name="{name1}" value="{value1}">
<input type="hidden" name="{name2}" value="{value2}">
...
</form>

3. Get the payment status

When the payment request is processed, the customer is redirected to the shopperResultUrl along with a GET parameter resourcePath.

resourcePath=/v1/payments/{id}

Handling soft declines after smart retry

In simulation setups, a soft decline status (for example, 300.100.100) might appear even after a successful 3-D Secure (3DS) authentication and Smart Retry - this is not an issue. The simulation tests the Strong Customer Authentication (SCA) process, and the soft decline status helps verify that the retry mechanisms operate as intended. In production, a successful SCA typically leads to a completed transaction.

Sample request:

https://sandbox-card.peachpayments.com/v1/payments/8ac7a49f9d2a5a3b019d2a9bfc0510d1

curl -G https://sandbox-card.peachpayments.com/v1/payments/{id} \
 -d "entityId=8ac7a4c793bdf2a00193bff58b4202ff" \
 -H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ="
public Dictionary<string, dynamic> Request() {
    Dictionary<string, dynamic> responseData;
    string data = "entityId=8ac7a4c793bdf2a00193bff58b4202ff";
    string url = "https://sandbox-card.peachpayments.com/v1/payments/{id}?" + data;
    
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
    request.Method = "GET";
    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=8ac7a4c793bdf2a00193bff58b4202ff"
    def url = ("https://sandbox-card.peachpayments.com/v1/payments/{id}?" + data).toURL()
    def connection = url.openConnection()
    connection.setRequestMethod("GET")
    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/payments/{id}?entityId=8ac7a4c793bdf2a00193bff58b4202ff");

    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    conn.setRequestMethod("GET");
    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/payments/{id}';
    path += '?entityId=8ac7a4c793bdf2a00193bff58b4202ff';
    
    const options = {
        port: 443,
        host: 'sandbox-card.peachpayments.com',
        path: path,
        method: 'GET',
        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/payments/{id}";
    $url .= "?entityId=8ac7a4c793bdf2a00193bff58b4202ff";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Authorization:Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
    ));
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    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/{id}"
    url += '?entityId=8ac7a4c793bdf2a00193bff58b4202ff'
    
    try:
        opener = build_opener(HTTPHandler)
        request = Request(url, data=b'')
        request.add_header('Authorization', 
            'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ=')
        request.get_method = lambda: 'GET'
        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=8ac7a4c793bdf2a00193bff58b4202ff"
    uri = URI.parse('https://sandbox-card.peachpayments.com/v1/payments/{id}' + path)
    
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    
    req = Net::HTTP::Get.new(uri)
    req['Authorization'] = 'Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8SFV3I3JGQTQ9bWpxaWYrPz9OWVQ='
    
    res = http.request(req)
    return JSON.parse(res.body)
end

puts request()
def initialPayment: String = {
    val url = "https://sandbox-card.peachpayments.com/v1/payments/{id}"
    val fullUrl = url + "?entityId=8ac7a4c793bdf2a00193bff58b4202ff"
    val conn = new URL(fullUrl).openConnection()

    conn match {
        case secureConn: HttpsURLConnection => secureConn.setRequestMethod("GET")
        case _ => throw new ClassCastException
    }

    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/payments/{id}" +
        "?entityId=8ac7a4c793bdf2a00193bff58b4202ff"

    Dim req As WebRequest = WebRequest.Create(url)
    req.Method = "GET"
    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":"8ac7a49f9d2a5a3b019d2a9bfc0510d1",
  "paymentType":"DB",
  "paymentBrand":"VISA",
  "amount":"42.05",
  "currency":"USD",
  "descriptor":"4672.5743.4148 SmartRetry_Channel",
  "result":{
    "code":"300.100.100",
    "description":"Transaction declined (additional customer authentication required)"
  },
  "resultDetails":{
    "ExtendedDescription":"Transaction successfully processed.",
    "usedChallengeIndicator":"04",
    "AcquirerResponse":"ACK"
  },
  "card":{
    "bin":"424242",
    "binCountry":"GB",
    "last4Digits":"7741",
    "holder":"300.100.100",
    "expiryMonth":"12",
    "expiryYear":"2027"
  },
  "customer":{
    "givenName":"Smith",
    "surname":"John",
    "email":"[email protected]",
    "ip":"192.168.0.0",
    "language":"DE"
  },
  "billing":{
    "street1":"MyStreet",
    "city":"MyCity",
    "state":"DE",
    "postcode":"712121",
    "country":"DE"
  },
  "threeDSecure":{
    "eci":"05",
    "version":"2.2.0",
    "dsTransactionId":"c4843e86-15ef-40f0-aaa3-7aa454c8d0e8",
    "challengeMandatedIndicator":"N",
    "transactionStatusReason":"",
    "acsTransactionId":"560d29ca-b4d6-4a43-9103-efc91e28487b",
    "cardHolderInfo":"",
    "authType":"01",
    "flow":"challenge",
    "authenticationStatus":"Y",
    "acsReferenceNumber":"b04ea28d11294692a29f63d2f5c84bfc",
    "dsReferenceNumber":"13db2d60d08c4f6b83de194ca5245e57",
    "purchaseDate":"20260326144558"
  },
  "customParameters":{
    "challengeIndicator":"04",
    "CTPE_DESCRIPTOR_TEMPLATE":"",
    "3DS2_flow":"frictionless",
    "PAYMENT_INHOUSE_FACADE":"true",
    "3DS2_enrolled":"true"
  },
  "buildNumber":"9092e7a6af8301accda2f9a3a38f743f907dadd5@2026-03-23 16:50:06 +0000",
  "timestamp":"2026-03-26 14:46:44+0000",
  "ndc":"8ac7a4c793bdf2a00193bff58b4202ff_2ee55b3252ba4a56b12d21d491b69f18",
  "processingDetails":{
    "transactions":[
      {
        "reason":"smartRetry",
        "transactionId":"8ac7a49f9d2a5a3b019d2a9bfb3810ba",
        "clearingInstituteName":"SixCard test",
        "merchantAccountId":"8ac7a4c793bdf2a00193bff590d00305",
        "paymentType":"DB",
        "result":{
          "code":"800.100.152",
          "description":"transaction declined by authorization system"
        }
      },
      {
        "reason":"SCARetry",
        "transactionId":"8ac7a49f9d2a5a3b019d2a9bfbbc10c8",
        "clearingInstituteName":"DUMMY_CI",
        "merchantAccountId":"8ac7a4c793bdf2a00193bff58d1a0304",
        "paymentType":"DB",
        "result":{
          "code":"300.100.100",
          "description":"Transaction declined (additional customer authentication required)"
        }
      }
    ]
  }
}