Search by

omnitrade / stripe

GlitchArt

Omnitrade Stripe: cards and wallets through Checkout (the hosted page), refunds and webhook events, on omnipay/stripe.

1.x-dev 2026-10-02 01:15 UTC

This package is auto-updated.

Last update: 2026-10-02 01:58:24 UTC


README

Stripe for glitchr/omnitrade: cards and wallets through Checkout (Stripe's hosted page), what was paid, refunds, and the webhook's events - on omnipay/stripe, through the application's HTTP client.

omnitrade:
    gateways:
        card:
            factory: stripe
            options:
                api_key: '%env(STRIPE_API_KEY)%'               # sk_live_... / sk_test_...
                webhook_secret: '%env(STRIPE_WEBHOOK_SECRET)%' # whsec_..., for notify()
                adaptive_pricing: false                        # true: the buyer's own currency may be offered
                payment_methods: []                            # ['card', 'sepa_debit']: the methods to insist on

purchase() opens a Checkout session and answers PENDING with the page's URL (returnUrl required; Stripe appends ?session={CHECKOUT_SESSION_ID} to it); fetch() reads the session (paid, open, expired); refund() pays back on the session's charge, with an idempotency key; notify() checks Stripe-Signature and reads the checkout.session.* events. No authorizations.

Credentials: a secret key from the Stripe Dashboard (Developers → API keys), and a webhook endpoint for checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.expired, checkout.session.async_payment_failed (its signing secret is webhook_secret). Locally, stripe listen --forward-to <your webhook URL> prints one.

License: LGPL-3.0-or-later.