pushinbr / pam-native-payments
PCI-conscious Stripe PaymentSheet payments for PAM Native.
Package info
github.com/push-in/pam-native-payments
Type:pam-native-plugin
pkg:composer/pushinbr/pam-native-payments
Requires
- php: ^8.5
- pushinbr/pam-native: ^0.8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-09 18:27:08 UTC
README
Native checkout surfaces with PCI-conscious application boundaries.
Present Stripe PaymentSheet and receive typed outcomes without handling raw card data in PHP.
Install · Quick example · Platforms · Production · Docs · Issues
Install
Inside a PAM Native project, add only this capability:
pam composer require pushinbr/pam-native-payments pam doctor --fix
New to PAM? Create a project with pam init my-app --template native (see the PAM Native overview), then come back here. Composer owns the manifest and the lockfile; pam composer runs it on PAM's verified PHP runtime.
Quick example
<?php declare(strict_types=1); use Pam\Native\Payments\PaymentResult; use Pam\Native\Payments\PaymentSheet; // Your server creates the PaymentIntent; the app receives only the // publishable key and the short-lived client secret. $sheet = PaymentSheet::make($publishableKey, $paymentIntentClientSecret, 'Acme') ->returnUrl('acme://stripe-redirect') ->onResult(function (PaymentResult $result, string $message): void { // PaymentResult::Completed, Cancelled or Failed: update the screen });
Stripe PaymentSheet with native payment methods, wallets and SCA/3DS flows. PaymentSheet::make() accepts only a pk_ publishable key and a PaymentIntent or SetupIntent client secret; Stripe secret keys are rejected by the PHP API. Always fulfill orders from verified server-side Stripe webhooks, never from the client completion callback.
Platform support
| Platform | Support | Notes |
|---|---|---|
| Android | API 26+ | Stripe Android SDK 23.13.1 |
| iOS | 15.0+ | Stripe iOS SDK 26.0.0 (StripePaymentSheet) |
| PAM Native | 0.8.0 to < 2.0.0 | From pam-native.plugin.json; PHP 8.5+ |
Requirements
The plugin declares no Android permissions and no iOS usage descriptions. You need a Stripe account, a server that creates PaymentIntents (or SetupIntents) and verifies webhooks, and the platform merchant configuration for wallets.
Platform SDKs, credentials, entitlements, physical hardware and store configuration remain application responsibilities.
What you can build
- One-time commerce checkout
- Saved payment-method flows
- Marketplace and service payments
| Native path | Stripe Android SDK · Stripe iOS SDK |
| Application model | Composer package + generated native integration |
| Design rule | Independent module; no feed, vertical or application template bundled |
API guide
| API | Responsibility |
|---|---|
PaymentSheet |
Configure and render Stripe's native PaymentSheet. |
PaymentResult |
Handle completed, cancelled and failed outcomes as typed values. |
All coded states, kinds and variants are sequential integer-backed enums. Use enum cases in application code; do not depend on raw wire numbers.
Production rules
- Create PaymentIntents and ephemeral secrets only on your server.
- Fulfill orders only after verified server-side webhooks.
- Use restricted publishable keys and never embed Stripe secret keys.
- Run
pam doctor,pam testand a signed release build on every supported platform. - Exercise denial, cancellation, backgrounding, process restart and offline behavior before release.
Security vulnerabilities should be reported through the repository security policy or GitHub private vulnerability reporting, not a public issue.
Troubleshooting
- The sheet does not open: verify the publishable key, client secret and active presentation context.
- Wallets are missing: complete the platform merchant configuration.
- Client reports success but entitlement is absent: inspect the verified webhook flow.
- Native integration is stale: run
pam doctor --fix, rebuild the native host and inspect the first reported diagnostic.
Docs
Part of the PAM ecosystem
PAM runs PHP natively on servers, desktops and phones. This repository is one piece of it.
| PAM | PAM Desktop | PAM Native | Ecosystem |
|---|---|---|---|
| the runtime and CLI | native desktop apps in PHP | native Android and iOS apps in PHP | every official package and plugin |
Docs: push-in.github.io/pam-docs · Issues
Apache License 2.0 · Made in Brazil by Pushin