Checkout ticket upselling
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"supplements": [
{
"supplement_id": "<string>",
"quantity": 2
}
],
"send_resources": false,
"metadata": {}
}
'import requests
url = "https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout"
payload = {
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"supplements": [
{
"supplement_id": "<string>",
"quantity": 2
}
],
"send_resources": False,
"metadata": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
redirect_url: 'https://app.yourwebpage.com/checkout/internal-id/success',
error_url: 'https://app.yourwebpage.com/checkout/internal-id/error',
supplements: [{supplement_id: '<string>', quantity: 2}],
send_resources: false,
metadata: {}
})
};
fetch('https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout', 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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout",
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([
'redirect_url' => 'https://app.yourwebpage.com/checkout/internal-id/success',
'error_url' => 'https://app.yourwebpage.com/checkout/internal-id/error',
'supplements' => [
[
'supplement_id' => '<string>',
'quantity' => 2
]
],
'send_resources' => false,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout"
payload := strings.NewReader("{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"payment_id": "<string>",
"payment_url": "<string>",
"total_amount": 123,
"supplements_price": 123,
"supplements_service_charge_total": 123,
"organization_fee": 123,
"fees": {
"fee_type": "fixed",
"fee_quantity": 123,
"organization_fee": 123,
"supplements_service_charge_total": 123
},
"supplements": [
{
"supplement_id": "<string>",
"label": "<string>",
"price": 123,
"purchase_quantity": 123,
"line_total": 123,
"service_charge_total": 123,
"line_total_with_fees": 123,
"service_charge_amount": 123,
"service_charge_type": "<string>"
}
]
},
"success": true
}Tickets
Checkout ticket upselling
Validates additional supplement quantities for an existing ticket, then creates the upselling payment via the ticketing API (POST /upselling/supplements). Returns payment_id and payment_url (same format as ticket checkout) plus supplement line totals and fees.
POST
/
tickets
/
{ticketId}
/
upselling
/
checkout
Checkout ticket upselling
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"supplements": [
{
"supplement_id": "<string>",
"quantity": 2
}
],
"send_resources": false,
"metadata": {}
}
'import requests
url = "https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout"
payload = {
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"supplements": [
{
"supplement_id": "<string>",
"quantity": 2
}
],
"send_resources": False,
"metadata": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
redirect_url: 'https://app.yourwebpage.com/checkout/internal-id/success',
error_url: 'https://app.yourwebpage.com/checkout/internal-id/error',
supplements: [{supplement_id: '<string>', quantity: 2}],
send_resources: false,
metadata: {}
})
};
fetch('https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout', 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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout",
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([
'redirect_url' => 'https://app.yourwebpage.com/checkout/internal-id/success',
'error_url' => 'https://app.yourwebpage.com/checkout/internal-id/error',
'supplements' => [
[
'supplement_id' => '<string>',
'quantity' => 2
]
],
'send_resources' => false,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout"
payload := strings.NewReader("{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://channels-service-alpha.fourvenues.com/tickets/{ticketId}/upselling/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://app.yourwebpage.com/checkout/internal-id/success\",\n \"error_url\": \"https://app.yourwebpage.com/checkout/internal-id/error\",\n \"supplements\": [\n {\n \"supplement_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"send_resources\": false,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"payment_id": "<string>",
"payment_url": "<string>",
"total_amount": 123,
"supplements_price": 123,
"supplements_service_charge_total": 123,
"organization_fee": 123,
"fees": {
"fee_type": "fixed",
"fee_quantity": 123,
"organization_fee": 123,
"supplements_service_charge_total": 123
},
"supplements": [
{
"supplement_id": "<string>",
"label": "<string>",
"price": 123,
"purchase_quantity": 123,
"line_total": 123,
"service_charge_total": 123,
"line_total_with_fees": 123,
"service_charge_amount": 123,
"service_charge_type": "<string>"
}
]
},
"success": true
}Authorizations
Path Parameters
Ticket id
Body
application/json
URL to redirect the user after the checkout.
Example:
"https://app.yourwebpage.com/checkout/internal-id/success"
URL to redirect the user if the checkout fails.
Example:
"https://app.yourwebpage.com/checkout/internal-id/error"
Show child attributes
Show child attributes
Forwarded to payment.success webhook payload as send_resources
Client metadata merged into cm_payment_info and forwarded on payment.success webhooks