Create payment session
curl --request POST \
--url https://tapcoupon.at/api/v1/payment-sessions \
--header 'Content-Type: application/json' \
--data '
{
"appName": "Your POS",
"callbackUrl": "yourpos://payment-complete",
"supportedCardTypes": [
"coupon",
"loyalty",
"status",
"points"
]
}
'import requests
url = "https://tapcoupon.at/api/v1/payment-sessions"
payload = {
"appName": "Your POS",
"callbackUrl": "yourpos://payment-complete",
"supportedCardTypes": ["coupon", "loyalty", "status", "points"]
}
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({
appName: 'Your POS',
callbackUrl: 'yourpos://payment-complete',
supportedCardTypes: ['coupon', 'loyalty', 'status', 'points']
})
};
fetch('https://tapcoupon.at/api/v1/payment-sessions', 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://tapcoupon.at/api/v1/payment-sessions",
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([
'appName' => 'Your POS',
'callbackUrl' => 'yourpos://payment-complete',
'supportedCardTypes' => [
'coupon',
'loyalty',
'status',
'points'
]
]),
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://tapcoupon.at/api/v1/payment-sessions"
payload := strings.NewReader("{\n \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\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://tapcoupon.at/api/v1/payment-sessions")
.header("Content-Type", "application/json")
.body("{\n \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tapcoupon.at/api/v1/payment-sessions")
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 \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "a3f9kqzm8bnwvrtd2xeljcuy4osp1gh7"
}{
"error": "<string>",
"errorCode": "<string>"
}{
"error": "<string>",
"errorCode": "<string>"
}Partner integration
Create payment session
Create a partner session with a 32-character token and a five-minute completion window.
POST
/
payment-sessions
Create payment session
curl --request POST \
--url https://tapcoupon.at/api/v1/payment-sessions \
--header 'Content-Type: application/json' \
--data '
{
"appName": "Your POS",
"callbackUrl": "yourpos://payment-complete",
"supportedCardTypes": [
"coupon",
"loyalty",
"status",
"points"
]
}
'import requests
url = "https://tapcoupon.at/api/v1/payment-sessions"
payload = {
"appName": "Your POS",
"callbackUrl": "yourpos://payment-complete",
"supportedCardTypes": ["coupon", "loyalty", "status", "points"]
}
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({
appName: 'Your POS',
callbackUrl: 'yourpos://payment-complete',
supportedCardTypes: ['coupon', 'loyalty', 'status', 'points']
})
};
fetch('https://tapcoupon.at/api/v1/payment-sessions', 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://tapcoupon.at/api/v1/payment-sessions",
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([
'appName' => 'Your POS',
'callbackUrl' => 'yourpos://payment-complete',
'supportedCardTypes' => [
'coupon',
'loyalty',
'status',
'points'
]
]),
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://tapcoupon.at/api/v1/payment-sessions"
payload := strings.NewReader("{\n \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\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://tapcoupon.at/api/v1/payment-sessions")
.header("Content-Type", "application/json")
.body("{\n \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tapcoupon.at/api/v1/payment-sessions")
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 \"appName\": \"Your POS\",\n \"callbackUrl\": \"yourpos://payment-complete\",\n \"supportedCardTypes\": [\n \"coupon\",\n \"loyalty\",\n \"status\",\n \"points\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "a3f9kqzm8bnwvrtd2xeljcuy4osp1gh7"
}{
"error": "<string>",
"errorCode": "<string>"
}{
"error": "<string>",
"errorCode": "<string>"
}POST /payment-sessions
Create a partner session with a 32-character token and a five-minute completion window.
This endpoint is public. You do not need an API key or employee token.
Supported types are coupon, loyalty, status, and points. These values differ from card response values such as couponCard.
Open tapcoupon://complete-session?token=YOUR_SESSION_TOKEN on the device running TapCoupon. The employee chooses the amount or points and completes the operation. The create request does not set an amount. Rate limit: 30 requests per minute per IP.
Example request
curl -X POST "https://tapcoupon.at/api/v1/payment-sessions" \
-H "Content-Type: application/json" \
-d '{
"appName": "Your POS",
"callbackUrl": "yourpos://payment-complete",
"supportedCardTypes": [
"coupon",
"loyalty",
"status",
"points"
]
}'
Example response
{
"token": "a3f9kqzm8bnwvrtd2xeljcuy4osp1gh7"
}
