payments
object
%Stripe
/phlo/resources/payments/Stripe.phlo
static
Stripe :: boot ($secret, $version = '2025-09-30.clover'):void
line 10
Initialiseert de Stripe API met de opgegeven geheime sleutel en stelt optioneel de API-versie in.
$secret = trim((string)$secret)
if (!$secret) error('Stripe secret key not configured', 500)
\Stripe\Stripe::setApiKey($secret)
$version && \Stripe\Stripe::setApiVersion($version)static
Stripe :: price ($lookupKey)
line 17
Haalt het prijsobject van Stripe op op basis van de opgegeven lookup-sleutel, en retourneert de eerste actieve prijs die is gevonden of null als er geen bestaat.
$prices = \Stripe\Price::all(['lookup_keys' => [$lookupKey], 'limit' => 1, 'active' => true])
return $prices->data[0] ?? nullstatic
Stripe :: customer ($id)
line 22
Haalt een Stripe-klant op aan de hand van hun ID, en retourneert null als de klant is verwijderd of als er een fout optreedt tijdens de API-aanroep.
try {
$c = \Stripe\Customer::retrieve((string)$id)
return ($c->deleted ?? false) ? null : $c
}
catch (\Stripe\Exception\ApiErrorException $e){
return null
}static
Stripe :: createCustomer (array $data)
line 32
Maakt een nieuwe klant aan in Stripe met de opgegeven gegevens.
\Stripe\Customer::create($data)static
Stripe :: checkout (array $params)
line 34
Maakt een nieuwe checkout-sessie in Stripe, waarmee betalingen kunnen worden verwerkt en klantinteracties tijdens het afrekenproces kunnen worden beheerd.
\Stripe\Checkout\Session::create($params)static
Stripe :: portal ($customerId, $returnUrl)
line 36
Maakt een nieuwe sessie voor het Stripe Billing Portal, zodat een klant zijn factureringsgegevens en abonnementen kan beheren.
\Stripe\BillingPortal\Session::create(['customer' => (string)$customerId, 'return_url' => (string)$returnUrl])static
Stripe :: verifyWebhook ($payload, $sigHeader, $secret)
line 38
Verifieert een Stripe-webhook door een evenement te construeren met de opgegeven payload, handtekeningheader en geheim. Het genereert een fout als het geheim niet is geconfigureerd.
$secret = trim((string)$secret)
if (!$secret) error('Stripe webhook secret not configured', 500)
return \Stripe\Webhook::constructEvent((string)$payload, (string)$sigHeader, $secret)static
Stripe :: subscriptions ($customerId, $status = 'all', $limit = 10)
line 44
Haal een lijst van abonnementen op voor een specifieke klant van Stripe, gefilterd op status en beperkt tot een bepaald aantal resultaten.
\Stripe\Subscription::all(['customer' => (string)$customerId, 'status' => $status, 'limit' => $limit])static
Stripe :: subscription ($id)
line 46
Haal een abonnementsobject op van Stripe met behulp van de opgegeven abonnements-ID.
\Stripe\Subscription::retrieve((string)$id)static
Stripe :: product ($id)
line 48
Haalt een Stripe-product op aan de hand van zijn ID.
\Stripe\Product::retrieve((string)$id)object
%SumUp
/phlo/resources/payments/SumUp.phlo
const
SumUp :: section
line 12
'SumUp'const
SumUp :: api
line 13
'https://api.sumup.com'method
%SumUp -> headers:array
line 15
[static::bearer($this->config['api_key'] ?? void)]static
SumUp :: fields:array
line 17
arr(
section: 'SumUp',
config: arr(
merchant_code: 'Merchant code (profile > merchant profile)',
reader_id: 'Default paired reader id (optional; every call accepts an explicit one)',
),
secret: arr(api_key: 'API key (developer.sumup.com > API keys)'),
)method
%SumUp -> merchant:string
line 26
'v0.1/merchants/'.($this->config['merchant_code'] ?? void)method
%SumUp -> readers:obj
line 31
The merchant's paired readers.
if ($m = $this->missing('merchant_code', 'api_key')) return $m
return $this->get($this->merchant.'/readers')method
%SumUp -> reader (?string $readerId = null):string
line 36
(string)($readerId ?? $this->config['reader_id'] ?? void)method
%SumUp -> createReaderCheckout (int $amountMinor, string $currency = 'EUR', ?string $readerId = null, ?string $description = null, ?string $returnUrl = null):obj
line 41
Start a card-present checkout on a reader. The amount is in minor units (cents).
if ($m = $this->missing('merchant_code', 'api_key')) return $m
$reader = $this->reader($readerId)
if ($reader === void) return static::fail('SumUp reader id not configured')
$body = ['total_amount' => ['value' => $amountMinor, 'currency' => $currency, 'minor_unit' => 2]]
if ($description !== null) $body['description'] = $description
if ($returnUrl !== null) $body['return_url'] = $returnUrl
return $this->post($this->merchant.'/readers/'.$reader.'/checkout', $body)method
%SumUp -> terminateReaderCheckout (?string $readerId = null):obj
line 54
Stops the active checkout on a reader.
if ($m = $this->missing('merchant_code', 'api_key')) return $m
$reader = $this->reader($readerId)
if ($reader === void) return static::fail('SumUp reader id not configured')
return $this->post($this->merchant.'/readers/'.$reader.'/terminate')method
%SumUp -> transaction (string $clientTransactionId):obj
line 64
Looks up a transaction by the client transaction id a checkout returned.
if ($m = $this->missing('merchant_code', 'api_key')) return $m
return $this->get('v0.1/me/transactions', ['client_transaction_id' => $clientTransactionId])method
%SumUp -> transactions (array $query = []):obj
line 69
if ($m = $this->missing('merchant_code', 'api_key')) return $m
return $this->get('v0.1/me/transactions/history', $query)Laatst bijgewerkt op 07-08-2026