Validate before starting a payment
curl --request POST \
--url https://waffo.com/web/v1/session/validate \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "<string>",
"payMethodType": "<string>",
"validationUrl": "<string>",
"merchantDomain": "<string>"
}
'import requests
url = "https://waffo.com/web/v1/session/validate"
payload = {
"sessionId": "<string>",
"payMethodType": "<string>",
"validationUrl": "<string>",
"merchantDomain": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: '<string>',
payMethodType: '<string>',
validationUrl: '<string>',
merchantDomain: '<string>'
})
};
fetch('https://waffo.com/web/v1/session/validate', 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://waffo.com/web/v1/session/validate",
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([
'sessionId' => '<string>',
'payMethodType' => '<string>',
'validationUrl' => '<string>',
'merchantDomain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://waffo.com/web/v1/session/validate"
payload := strings.NewReader("{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://waffo.com/web/v1/session/validate")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waffo.com/web/v1/session/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "success",
"data": "<string>"
}Waffo Element
Validate before starting a payment
Completes the check a pay method requires before its payment sheet can open. Apple Pay is the only one today: acquiring verifies the merchant domain and forwards the validation to Payment, which holds the Apple certificate and exchanges it for a merchant session.
POST
/
web
/
v1
/
session
/
validate
Validate before starting a payment
curl --request POST \
--url https://waffo.com/web/v1/session/validate \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "<string>",
"payMethodType": "<string>",
"validationUrl": "<string>",
"merchantDomain": "<string>"
}
'import requests
url = "https://waffo.com/web/v1/session/validate"
payload = {
"sessionId": "<string>",
"payMethodType": "<string>",
"validationUrl": "<string>",
"merchantDomain": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: '<string>',
payMethodType: '<string>',
validationUrl: '<string>',
merchantDomain: '<string>'
})
};
fetch('https://waffo.com/web/v1/session/validate', 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://waffo.com/web/v1/session/validate",
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([
'sessionId' => '<string>',
'payMethodType' => '<string>',
'validationUrl' => '<string>',
'merchantDomain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://waffo.com/web/v1/session/validate"
payload := strings.NewReader("{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://waffo.com/web/v1/session/validate")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waffo.com/web/v1/session/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"<string>\",\n \"payMethodType\": \"<string>\",\n \"validationUrl\": \"<string>\",\n \"merchantDomain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "success",
"data": "<string>"
}Headers
Body
application/json
Payment session id returned by the session create api.
Minimum string length:
1Pay method type to validate. Only APPLEPAY needs pre-payment validation for now.
Minimum string length:
1Validation url handed out by Apple Pay on the shopper browser.
Minimum string length:
1Domain of the merchant page showing the Apple Pay button; it must be registered for this merchant.
Minimum string length:
1Was this page helpful?