Kontokonfiguration lesen
GET
/payment-methods.phpcurl "https://circus-pay.com/api/payment-methods.php" \
-H "Authorization: Bearer $CIRCUSPAY_SECRET_KEY"const response = await fetch("https://circus-pay.com/api/payment-methods.php", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CIRCUSPAY_SECRET_KEY}`
}
});
const result = await response.json();
if (!response.ok || !result.success) {
throw new Error(result.error || "API request failed");
}
console.log(result);<?php
$ch = curl_init("https://circus-pay.com/api/payment-methods.php");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 20,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("CIRCUSPAY_SECRET_KEY"),
"Content-Type: application/json",
],
]);
$raw = curl_exec($ch);
if ($raw === false) { throw new RuntimeException(curl_error($ch)); }
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
if ($status >= 400 || empty($result["success"])) {
throw new RuntimeException($result["error"] ?? "API request failed");
}import os, requests
response = requests.get(
"https://circus-pay.com/api/payment-methods.php",
headers={"Authorization": "Bearer " + os.environ["CIRCUSPAY_SECRET_KEY"]},
timeout=20,
)
response.raise_for_status()
result = response.json()
if not result.get("success"):
raise RuntimeError(result.get("error", "API request failed"))
print(result)Die Antwort enthält methods. Prüfen Sie je Eintrag insbesondere id, enabled, available, currencies und unavailableReason. Die endgültige Verfügbarkeit hängt auch vom gewählten Verarbeitungsablauf ab.
Checkout einschränken
{
"paymentMethods": ["card", "blik"]
}Beispiel nur mit BLIK
POST
/checkout/create.phpcurl "https://circus-pay.com/api/checkout/create.php" \
-H "Authorization: Bearer $CIRCUSPAY_SECRET_KEY" \
-H "Content-Type: application/json" \
--data '{
"amount": 15000,
"currency": "PLN",
"productName": "Commande BLIK",
"orderId": "BLIK-DEMO-001",
"paymentMethods": [
"blik"
]
}'const response = await fetch("https://circus-pay.com/api/checkout/create.php", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CIRCUSPAY_SECRET_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 15000,
"currency": "PLN",
"productName": "Commande BLIK",
"orderId": "BLIK-DEMO-001",
"paymentMethods": [
"blik"
]
})
});
const result = await response.json();
if (!response.ok || !result.success) {
throw new Error(result.error || "API request failed");
}
console.log(result);<?php
$ch = curl_init("https://circus-pay.com/api/checkout/create.php");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 20,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("CIRCUSPAY_SECRET_KEY"),
"Content-Type: application/json",
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => '{
"amount": 15000,
"currency": "PLN",
"productName": "Commande BLIK",
"orderId": "BLIK-DEMO-001",
"paymentMethods": [
"blik"
]
}',
]);
$raw = curl_exec($ch);
if ($raw === false) { throw new RuntimeException(curl_error($ch)); }
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
if ($status >= 400 || empty($result["success"])) {
throw new RuntimeException($result["error"] ?? "API request failed");
}import os, requests
response = requests.post(
"https://circus-pay.com/api/checkout/create.php",
headers={"Authorization": "Bearer " + os.environ["CIRCUSPAY_SECRET_KEY"]},
json={'amount': 15000, 'currency': 'PLN', 'productName': 'Commande BLIK', 'orderId': 'BLIK-DEMO-001', 'paymentMethods': ['blik']},
timeout=20,
)
response.raise_for_status()
result = response.json()
if not result.get("success"):
raise RuntimeError(result.get("error", "API request failed"))
print(result)Das Konto muss BLIK erlauben und der gewählte Ablauf PLN unterstützen. Für zusätzliche Kartenzahlungen verwenden Sie ["blik", "card"].
Katalogkennungen
| Parameter | Beschreibung |
|---|---|
card / applepay / googlepay | Karten und Wallets. Kompatibilität abhängig von Ihrer Konfiguration und dem Kundengerät. |
blik | PLN |
p24 | PLN, EUR |
ideal / bancontact / eps | EUR |
twint | CHF |
multibanco / mb_way / satispay | EUR |
klarna | Abhängig von Währungen und Kontoaktivierung. |
sepa | EUR · eingehende Überweisung; keine SEPA-Lastschrift. |
ach | USD · eingehende Überweisung. |
crypto | Verfügbarkeit, Vermögenswerte und Netzwerke abhängig vom Konto. |
Zahlungen mit Weiterleitung
Überlassen Sie dem Checkout die Weiterleitung zur Bank oder zum Anbieter sowie die Rückkehr. Ihr Shop erhält anschließend die Serverbestätigung. URL-Parameter oder Browserrückkehr sind kein Erfolgsnachweis.