Payments - External 3DS Authentication
curl --request POST \
--url https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"client_secret": "<string>",
"sdk_information": {
"sdk_app_id": "<string>",
"sdk_enc_data": "<string>",
"sdk_ephem_pub_key": {},
"sdk_trans_id": "<string>",
"sdk_reference_number": "<string>",
"sdk_max_timeout": 1
}
}
'import requests
url = "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication"
payload = {
"client_secret": "<string>",
"sdk_information": {
"sdk_app_id": "<string>",
"sdk_enc_data": "<string>",
"sdk_ephem_pub_key": {},
"sdk_trans_id": "<string>",
"sdk_reference_number": "<string>",
"sdk_max_timeout": 1
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_secret: '<string>',
sdk_information: {
sdk_app_id: '<string>',
sdk_enc_data: '<string>',
sdk_ephem_pub_key: {},
sdk_trans_id: '<string>',
sdk_reference_number: '<string>',
sdk_max_timeout: 1
}
})
};
fetch('https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_secret' => '<string>',
'sdk_information' => [
'sdk_app_id' => '<string>',
'sdk_enc_data' => '<string>',
'sdk_ephem_pub_key' => [
],
'sdk_trans_id' => '<string>',
'sdk_reference_number' => '<string>',
'sdk_max_timeout' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication"
payload := strings.NewReader("{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"trans_status": "Y",
"three_ds_requestor_url": "<string>",
"acs_url": "<string>",
"challenge_request": "<string>",
"acs_reference_number": "<string>",
"acs_trans_id": "<string>",
"three_dsserver_trans_id": "<string>",
"acs_signed_content": "<string>",
"three_ds_requestor_app_url": "<string>"
}Payments
Payments - External 3DS Authentication
External 3DS Authentication is performed and returns the AuthenticationResponse
POST
/
payments
/
{payment_id}
/
3ds
/
authentication
Payments - External 3DS Authentication
curl --request POST \
--url https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"client_secret": "<string>",
"sdk_information": {
"sdk_app_id": "<string>",
"sdk_enc_data": "<string>",
"sdk_ephem_pub_key": {},
"sdk_trans_id": "<string>",
"sdk_reference_number": "<string>",
"sdk_max_timeout": 1
}
}
'import requests
url = "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication"
payload = {
"client_secret": "<string>",
"sdk_information": {
"sdk_app_id": "<string>",
"sdk_enc_data": "<string>",
"sdk_ephem_pub_key": {},
"sdk_trans_id": "<string>",
"sdk_reference_number": "<string>",
"sdk_max_timeout": 1
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_secret: '<string>',
sdk_information: {
sdk_app_id: '<string>',
sdk_enc_data: '<string>',
sdk_ephem_pub_key: {},
sdk_trans_id: '<string>',
sdk_reference_number: '<string>',
sdk_max_timeout: 1
}
})
};
fetch('https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_secret' => '<string>',
'sdk_information' => [
'sdk_app_id' => '<string>',
'sdk_enc_data' => '<string>',
'sdk_ephem_pub_key' => [
],
'sdk_trans_id' => '<string>',
'sdk_reference_number' => '<string>',
'sdk_max_timeout' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication"
payload := strings.NewReader("{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/payments/{payment_id}/3ds/authentication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_secret\": \"<string>\",\n \"sdk_information\": {\n \"sdk_app_id\": \"<string>\",\n \"sdk_enc_data\": \"<string>\",\n \"sdk_ephem_pub_key\": {},\n \"sdk_trans_id\": \"<string>\",\n \"sdk_reference_number\": \"<string>\",\n \"sdk_max_timeout\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"trans_status": "Y",
"three_ds_requestor_url": "<string>",
"acs_url": "<string>",
"challenge_request": "<string>",
"acs_reference_number": "<string>",
"acs_trans_id": "<string>",
"three_dsserver_trans_id": "<string>",
"acs_signed_content": "<string>",
"three_ds_requestor_app_url": "<string>"
}Authorizations
Body
application/json
Response
Authentication created