curl --request POST \
--url https://core.quidkey.com/api/v1/embedded/payment-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351960123456",
"country": "GB"
},
"order": {
"order_id": "ORD-123456",
"amount": 9300,
"currency": "GBP",
"payment_reference": "Barcelona Tryp",
"locale": "en-GB",
"test_transaction": true,
"rewards": {
"extra_rewards": 150,
"total_rewards": 300,
"description": "Loyalty bonus + base rewards"
}
},
"device_type": "ios",
"billing_address": {
"address_line1": "12 West Common Drive",
"address_line2": "Flat 1",
"apartment": "Apt 5B",
"city": "London",
"state_province": "Greater London",
"country": "GB",
"postal_code": "SE1 1AA",
"company_name": "Acme Ltd"
},
"simulation": {
"straddle": {
"customer_outcome": "standard",
"paykey_outcome": "standard",
"charge_outcome": "standard",
"balance_check": "required"
},
"flinks": {
"outcome": "happy",
"mfa": "skip"
}
},
"redirect_urls": {
"success_url": "https://tryp.com/checkout/success",
"failure_url": "https://tryp.com/checkout/error"
},
"webhook_endpoints": [
"wizzair-prod"
]
}
'import requests
url = "https://core.quidkey.com/api/v1/embedded/payment-requests"
payload = {
"merchant_id": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351960123456",
"country": "GB"
},
"order": {
"order_id": "ORD-123456",
"amount": 9300,
"currency": "GBP",
"payment_reference": "Barcelona Tryp",
"locale": "en-GB",
"test_transaction": True,
"rewards": {
"extra_rewards": 150,
"total_rewards": 300,
"description": "Loyalty bonus + base rewards"
}
},
"device_type": "ios",
"billing_address": {
"address_line1": "12 West Common Drive",
"address_line2": "Flat 1",
"apartment": "Apt 5B",
"city": "London",
"state_province": "Greater London",
"country": "GB",
"postal_code": "SE1 1AA",
"company_name": "Acme Ltd"
},
"simulation": {
"straddle": {
"customer_outcome": "standard",
"paykey_outcome": "standard",
"charge_outcome": "standard",
"balance_check": "required"
},
"flinks": {
"outcome": "happy",
"mfa": "skip"
}
},
"redirect_urls": {
"success_url": "https://tryp.com/checkout/success",
"failure_url": "https://tryp.com/checkout/error"
},
"webhook_endpoints": ["wizzair-prod"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: '550e8400-e29b-41d4-a716-446655440000',
customer: {
name: 'John Doe',
email: 'john@example.com',
phone: '+351960123456',
country: 'GB'
},
order: {
order_id: 'ORD-123456',
amount: 9300,
currency: 'GBP',
payment_reference: 'Barcelona Tryp',
locale: 'en-GB',
test_transaction: true,
rewards: {
extra_rewards: 150,
total_rewards: 300,
description: 'Loyalty bonus + base rewards'
}
},
device_type: 'ios',
billing_address: {
address_line1: '12 West Common Drive',
address_line2: 'Flat 1',
apartment: 'Apt 5B',
city: 'London',
state_province: 'Greater London',
country: 'GB',
postal_code: 'SE1 1AA',
company_name: 'Acme Ltd'
},
simulation: {
straddle: {
customer_outcome: 'standard',
paykey_outcome: 'standard',
charge_outcome: 'standard',
balance_check: 'required'
},
flinks: {outcome: 'happy', mfa: 'skip'}
},
redirect_urls: {
success_url: 'https://tryp.com/checkout/success',
failure_url: 'https://tryp.com/checkout/error'
},
webhook_endpoints: ['wizzair-prod']
})
};
fetch('https://core.quidkey.com/api/v1/embedded/payment-requests', 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://core.quidkey.com/api/v1/embedded/payment-requests",
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([
'merchant_id' => '550e8400-e29b-41d4-a716-446655440000',
'customer' => [
'name' => 'John Doe',
'email' => 'john@example.com',
'phone' => '+351960123456',
'country' => 'GB'
],
'order' => [
'order_id' => 'ORD-123456',
'amount' => 9300,
'currency' => 'GBP',
'payment_reference' => 'Barcelona Tryp',
'locale' => 'en-GB',
'test_transaction' => true,
'rewards' => [
'extra_rewards' => 150,
'total_rewards' => 300,
'description' => 'Loyalty bonus + base rewards'
]
],
'device_type' => 'ios',
'billing_address' => [
'address_line1' => '12 West Common Drive',
'address_line2' => 'Flat 1',
'apartment' => 'Apt 5B',
'city' => 'London',
'state_province' => 'Greater London',
'country' => 'GB',
'postal_code' => 'SE1 1AA',
'company_name' => 'Acme Ltd'
],
'simulation' => [
'straddle' => [
'customer_outcome' => 'standard',
'paykey_outcome' => 'standard',
'charge_outcome' => 'standard',
'balance_check' => 'required'
],
'flinks' => [
'outcome' => 'happy',
'mfa' => 'skip'
]
],
'redirect_urls' => [
'success_url' => 'https://tryp.com/checkout/success',
'failure_url' => 'https://tryp.com/checkout/error'
],
'webhook_endpoints' => [
'wizzair-prod'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://core.quidkey.com/api/v1/embedded/payment-requests"
payload := strings.NewReader("{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://core.quidkey.com/api/v1/embedded/payment-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.quidkey.com/api/v1/embedded/payment-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"payment_token": "ptok_efghijklm...",
"expires_in": 900
}
}{
"success": false,
"error": {
"message": "Invalid input provided"
}
}{
"success": false,
"error": {
"message": "Invalid input provided"
}
}Create a payment request and return a payment_token for iframe flow
Create a payment request and return a payment_token for iframe flow
curl --request POST \
--url https://core.quidkey.com/api/v1/embedded/payment-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351960123456",
"country": "GB"
},
"order": {
"order_id": "ORD-123456",
"amount": 9300,
"currency": "GBP",
"payment_reference": "Barcelona Tryp",
"locale": "en-GB",
"test_transaction": true,
"rewards": {
"extra_rewards": 150,
"total_rewards": 300,
"description": "Loyalty bonus + base rewards"
}
},
"device_type": "ios",
"billing_address": {
"address_line1": "12 West Common Drive",
"address_line2": "Flat 1",
"apartment": "Apt 5B",
"city": "London",
"state_province": "Greater London",
"country": "GB",
"postal_code": "SE1 1AA",
"company_name": "Acme Ltd"
},
"simulation": {
"straddle": {
"customer_outcome": "standard",
"paykey_outcome": "standard",
"charge_outcome": "standard",
"balance_check": "required"
},
"flinks": {
"outcome": "happy",
"mfa": "skip"
}
},
"redirect_urls": {
"success_url": "https://tryp.com/checkout/success",
"failure_url": "https://tryp.com/checkout/error"
},
"webhook_endpoints": [
"wizzair-prod"
]
}
'import requests
url = "https://core.quidkey.com/api/v1/embedded/payment-requests"
payload = {
"merchant_id": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351960123456",
"country": "GB"
},
"order": {
"order_id": "ORD-123456",
"amount": 9300,
"currency": "GBP",
"payment_reference": "Barcelona Tryp",
"locale": "en-GB",
"test_transaction": True,
"rewards": {
"extra_rewards": 150,
"total_rewards": 300,
"description": "Loyalty bonus + base rewards"
}
},
"device_type": "ios",
"billing_address": {
"address_line1": "12 West Common Drive",
"address_line2": "Flat 1",
"apartment": "Apt 5B",
"city": "London",
"state_province": "Greater London",
"country": "GB",
"postal_code": "SE1 1AA",
"company_name": "Acme Ltd"
},
"simulation": {
"straddle": {
"customer_outcome": "standard",
"paykey_outcome": "standard",
"charge_outcome": "standard",
"balance_check": "required"
},
"flinks": {
"outcome": "happy",
"mfa": "skip"
}
},
"redirect_urls": {
"success_url": "https://tryp.com/checkout/success",
"failure_url": "https://tryp.com/checkout/error"
},
"webhook_endpoints": ["wizzair-prod"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: '550e8400-e29b-41d4-a716-446655440000',
customer: {
name: 'John Doe',
email: 'john@example.com',
phone: '+351960123456',
country: 'GB'
},
order: {
order_id: 'ORD-123456',
amount: 9300,
currency: 'GBP',
payment_reference: 'Barcelona Tryp',
locale: 'en-GB',
test_transaction: true,
rewards: {
extra_rewards: 150,
total_rewards: 300,
description: 'Loyalty bonus + base rewards'
}
},
device_type: 'ios',
billing_address: {
address_line1: '12 West Common Drive',
address_line2: 'Flat 1',
apartment: 'Apt 5B',
city: 'London',
state_province: 'Greater London',
country: 'GB',
postal_code: 'SE1 1AA',
company_name: 'Acme Ltd'
},
simulation: {
straddle: {
customer_outcome: 'standard',
paykey_outcome: 'standard',
charge_outcome: 'standard',
balance_check: 'required'
},
flinks: {outcome: 'happy', mfa: 'skip'}
},
redirect_urls: {
success_url: 'https://tryp.com/checkout/success',
failure_url: 'https://tryp.com/checkout/error'
},
webhook_endpoints: ['wizzair-prod']
})
};
fetch('https://core.quidkey.com/api/v1/embedded/payment-requests', 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://core.quidkey.com/api/v1/embedded/payment-requests",
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([
'merchant_id' => '550e8400-e29b-41d4-a716-446655440000',
'customer' => [
'name' => 'John Doe',
'email' => 'john@example.com',
'phone' => '+351960123456',
'country' => 'GB'
],
'order' => [
'order_id' => 'ORD-123456',
'amount' => 9300,
'currency' => 'GBP',
'payment_reference' => 'Barcelona Tryp',
'locale' => 'en-GB',
'test_transaction' => true,
'rewards' => [
'extra_rewards' => 150,
'total_rewards' => 300,
'description' => 'Loyalty bonus + base rewards'
]
],
'device_type' => 'ios',
'billing_address' => [
'address_line1' => '12 West Common Drive',
'address_line2' => 'Flat 1',
'apartment' => 'Apt 5B',
'city' => 'London',
'state_province' => 'Greater London',
'country' => 'GB',
'postal_code' => 'SE1 1AA',
'company_name' => 'Acme Ltd'
],
'simulation' => [
'straddle' => [
'customer_outcome' => 'standard',
'paykey_outcome' => 'standard',
'charge_outcome' => 'standard',
'balance_check' => 'required'
],
'flinks' => [
'outcome' => 'happy',
'mfa' => 'skip'
]
],
'redirect_urls' => [
'success_url' => 'https://tryp.com/checkout/success',
'failure_url' => 'https://tryp.com/checkout/error'
],
'webhook_endpoints' => [
'wizzair-prod'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://core.quidkey.com/api/v1/embedded/payment-requests"
payload := strings.NewReader("{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://core.quidkey.com/api/v1/embedded/payment-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.quidkey.com/api/v1/embedded/payment-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"customer\": {\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+351960123456\",\n \"country\": \"GB\"\n },\n \"order\": {\n \"order_id\": \"ORD-123456\",\n \"amount\": 9300,\n \"currency\": \"GBP\",\n \"payment_reference\": \"Barcelona Tryp\",\n \"locale\": \"en-GB\",\n \"test_transaction\": true,\n \"rewards\": {\n \"extra_rewards\": 150,\n \"total_rewards\": 300,\n \"description\": \"Loyalty bonus + base rewards\"\n }\n },\n \"device_type\": \"ios\",\n \"billing_address\": {\n \"address_line1\": \"12 West Common Drive\",\n \"address_line2\": \"Flat 1\",\n \"apartment\": \"Apt 5B\",\n \"city\": \"London\",\n \"state_province\": \"Greater London\",\n \"country\": \"GB\",\n \"postal_code\": \"SE1 1AA\",\n \"company_name\": \"Acme Ltd\"\n },\n \"simulation\": {\n \"straddle\": {\n \"customer_outcome\": \"standard\",\n \"paykey_outcome\": \"standard\",\n \"charge_outcome\": \"standard\",\n \"balance_check\": \"required\"\n },\n \"flinks\": {\n \"outcome\": \"happy\",\n \"mfa\": \"skip\"\n }\n },\n \"redirect_urls\": {\n \"success_url\": \"https://tryp.com/checkout/success\",\n \"failure_url\": \"https://tryp.com/checkout/error\"\n },\n \"webhook_endpoints\": [\n \"wizzair-prod\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"payment_token": "ptok_efghijklm...",
"expires_in": 900
}
}{
"success": false,
"error": {
"message": "Invalid input provided"
}
}{
"success": false,
"error": {
"message": "Invalid input provided"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body
Customer information for payment flows
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Merchant ID. Defaults to the logged-in merchant if not provided. Required for admin tokens.
"550e8400-e29b-41d4-a716-446655440000"
Platform/device type for the payment request
web, ios, android "ios"
A physical address
Show child attributes
Show child attributes
Sandbox simulation config. Honoured only when the upstream provider is a fake/sandbox backend; live providers ignore it.
Show child attributes
Show child attributes
Optional. Up to 10 registered webhook endpoints to fan this payment's webhooks out to, each signed with its own secret. An endpoint can be test-only, live-only, or both. Omit to use the no-reference precedence: the legacy default URL, then the merchant's default endpoint, then the single active endpoint.
10Name or id of a registered webhook endpoint to route this payment's webhooks to.