FunStripe is an F# library that provides a functional wrapper around the Stripe API for payment processing. This guide demonstrates the essential patterns for integrating Stripe payments in your application.
This repository uses the FunStripe.Core NuGet package, version 3.3.0, which targets Stripe API version 2026-10-28.endive. Since FunStripe 2.0 this is the only package: the code generators stay in the FunStripe repository, so FunStripe.Core is what FunStripeLite used to be (the library without the generators and their dependencies). This repository is not using the official Stripe.net .NET integration, as avoiding that is one of the key aims of the alternative, FunStripe.
Note: The F# code in
src/andwebhooks/calls FunStripe for real. With a Stripe test key configured,dotnet runcreates customers, setup intents and payment intents in your Stripe test account. Without one it skips those calls and still runs the webhook demo, which needs no Stripe account.
The sample is split by use case, so you can read only the one you need. Every use case has a module in src/ with the FunStripe calls and its webhook events, a runnable script in examples/, tests in tests/ and, where the customer takes part, a page in frontend/.
| Use case | What it does | Code | Run it | Frontend |
|---|---|---|---|---|
| Webshop checkout | Sell goods on Stripe's hosted payment page: cart, shipping, VAT, fulfilment, refunds | WebshopCheckout.fs |
WebshopCheckout.fsx |
Stripe's hosted page |
| Memberships | A monthly gym membership by direct debit: joining fee, freezes, notice, member portal, door access | Memberships.fs |
Memberships.fsx |
Stripe's hosted pages |
| Card payments | One-time card payments and saved cards | StripeService.fs, WebhookHandler.fs |
CardPayments.fsx |
index.html |
| Direct debit | Save a bank account with a mandate (SEPA, ACH, Bacs, BECS) and debit it off-session | DirectDebit.fs |
DirectDebit.fsx |
direct-debit.html |
| Open banking | Link a customer's bank accounts with Financial Connections and screen the transactions for gambling, a sign of a potentially vulnerable customer | FinancialConnections.fs |
FinancialConnections.fsx |
financial-connections.html |
| Card issuing | Issue your own virtual and physical cards, with your card design and real-time approval of purchases | Issuing.fs |
Issuing.fsx |
none (a back-office flow) |
| Disputes | Respond to chargebacks with evidence or accept them, and refund on early fraud warnings | DisputeHandling.fs |
Disputes.fsx |
none (a back-office flow) |
StripeService.fs also holds what the use cases share: configuration, idempotency keys and customers. Each use case has its own processEvent and webhook endpoint (DirectDebit.handleWebhookRequest, ...). Stripe lets you create several webhook endpoints, each subscribed to the events it handles, so adding a use case does not touch the endpoints you already run.
The scripts run against Stripe test mode with the test key in STRIPE_TEST_API_KEY (they refuse a live key) and need nothing but the .NET SDK:
dotnet fsi examples/DirectDebit.fsxEach script starts with a comment that says what it needs from your Stripe account and which arguments it takes. Where a step needs the customer in a browser (confirming a setup intent, logging in to a bank), the script prints a client secret: serve frontend/ (see Test the Frontend), open the use case's page and paste it there together with your publishable key.
The shop keeps the catalog and the cart; WebshopCheckout.createCheckoutSession prices the cart from the catalog (never from what the browser sends) and Stripe's page takes it from there: shipping address, shipping option, phone number for the carrier, promotion codes and the payment. Leaving the payment methods out lets Checkout offer what you turn on in the Dashboard (cards, wallets, MobilePay, Klarna, ...). With AutomaticTax Stripe Tax adds the VAT of the delivery country, with prices that include it.
Fulfil on checkout.session.completed when the session is paid, and on checkout.session.async_payment_succeeded for payment methods that confirm later. orderToFulfil returns the lines (with your SKUs) and the shipping address; the success page can call it too, so fulfil once per order ID. refundOrder refunds a whole order or part of it.
A membership is a subscription (Stripe Billing); direct debit is how it is paid. The monthly fee and the joining fee are prices found by lookup key (ensureCatalog). A member signs up online on a Checkout page in subscription mode, which collects the IBAN and the SEPA mandate, or at the front desk, where DirectDebit.setupSepaWithIban saves the bank account and startMembership starts the subscription with it.
Stripe invoices every month and retries a bounced debit on the schedule set under Settings > Billing; invoice.payment_failed says when it retries. accessOf turns the subscription status into what the door does: in while paid up, a grace period while a debit is retried, out when paused, unpaid or cancelled. A freeze uses Stripe's subscription pause (no invoices, the period stops) and ends with a new period from that day. cancelAtPeriodEnd handles notice, and memberPortalUrl lets members change their bank account or see their invoices themselves.
A bank debit is not instant. DirectDebit.chargeSavedAccount returns a payment intent in processing, and the money arrives days later with payment_intent.succeeded, or does not, with payment_intent.payment_failed. Fulfil orders on the event, and stop charging a payment method once mandate.updated reports its mandate inactive. The Payment Element shows the customer the mandate text each scheme requires; DirectDebit.setupSepaWithIban does the same setup in one server-side call, which the example uses to run without a browser. Turn on the schemes you need under Settings > Payment methods in the Dashboard.
Financial Connections links US bank accounts. The customer logs in to their bank in Stripe's dialog and agrees to share their transactions; your backend subscribes to them and screens them after each financial_connections.account.refreshed_transactions event. To take ACH payments from the account instead, use the direct debit flow with DirectDebit.UsBankAccount, whose setup intent runs the same dialog.
FinancialConnections.screenAccountForGambling finds payments to and from gambling operators and returns NoGamblingFound, BelowThresholds or NeedsReview with the reasons (share of spending, gambling days per month, optionally net loss). Stripe's transactions carry only the bank's description, no merchant category, so the match is by operator names and gambling words (gamblingTerms); extend the list for your market and set the thresholds from your own policy. The result is a signal for a person who handles vulnerable customers, not a decision about the customer.
The accounts are FunStripe's FinancialConnectionsAccount, with their balances (Map<string, int> by currency); 3.1 reads those and sends the accountHolder filter of FinancialConnectionsAccounts.List, which 3.0 did not.
Issuing needs a Stripe account approved for it, in a country where Stripe offers it, and an Issuing balance that funds the purchases: with an empty balance Stripe declines every purchase as insufficient_funds. How money gets there depends on the region (Issuing.regionOf reads it from the account's country): always over the local rail, not SWIFT. In the UK and the euro area you push it to the bank details Issuing.fundingInstructions gives (a sort code for Faster Payments; an IBAN for SEPA), and in test mode Issuing.TestMode.fundBalance adds money without a transfer; in the US Issuing.topUpIssuingBalance pulls it by ACH from your bank account (a top-up with destination_balance=issuing), and an ACH push (or a costlier wire) is set up in the Dashboard. The balance is the account's, shared by all its cards. In the UK and the EEA a cardholder needs a phone number for the one-time passwords of 3D Secure, or Stripe refuses to create their card. examples/Issuing.fsx picks the program from your account's country: the UK program (GBP) has been run against Stripe test mode; the euro area (EUR) and US (USD) ones follow Stripe's documentation but have not been run. A physical card is printed with a personalization design: a physical bundle (card stock and packaging, Issuing.activeBundles), your logo (Issuing.uploadCardLogo) and the text of the carrier letter. Stripe reviews each design and reports the outcome with issuing_personalization_design.activated or .rejected.
Purchases are approved in real time by Issuing.handleAuthorizationRequest, which answers Stripe's issuing_authorization.request in the HTTP response. It runs on an endpoint of its own, set in the Issuing settings of the Dashboard, and has 2 seconds to answer, in the API version of the request and as application/json: Stripe ignores any other content type (webhook_error) and applies the fallback decision, so send the headers handleAuthorizationRequest returns as they are. The approve and decline API endpoints that used to do this are deprecated. A request's pending_request.amount is what Stripe would hold more: the whole amount at first, and only the increase when a merchant raises an approved authorization (a tip, fuel), so approveUpTo checks the total. What an authorization holds is its holds less releases (Issuing.heldAmount), not its amount, which stays as authorized after a capture that leaves it open.
FunStripe.Core needs to be 3.1.1 or later for Issuing: older versions send the address lines of cardholders and cards as line_1 and line_2, which Stripe refuses. Its Files.Create uploads the card logo (since 3.1); its FundingInstructions model does not know the gb_bank_transfer type, so fundingInstructions reads the answer into the sample's own records.
Stripe takes a disputed amount and the dispute fee from your balance as soon as charge.dispute.created arrives. DisputeHandling.processEvent turns the dispute into a DisputeNotice (the payment intent to find your order by, the amount, the reason and the evidence deadline): hold the order, flag the customer and give someone the deadline. Before it passes, either submitEvidence (for a webshop: carrier, tracking number, delivery address; saveEvidence keeps a draft) or acceptDispute. charge.dispute.closed tells you whether you won.
An early fraud warning (radar.early_fraud_warning.created) means the card issuer has reported the payment as fraud and a dispute is likely to follow. Refunding it with refundEarlyFraudWarning costs the amount but no dispute fee. In test mode examples/Disputes.fsx pays with pm_card_createDispute, which is disputed at once, and decides the outcome with the evidence text winning_evidence or losing_evidence.
- .NET 10.0 or later
- Stripe account (test keys for development)
- FunStripe.Core NuGet package
Set your Stripe test secret key in the STRIPE_TEST_API_KEY environment variable (the same variable FunStripe itself reads), so the key never has to be written to a file:
export STRIPE_TEST_API_KEY=sk_test_your_key_hereOr configure the keys in src/appsettings.json:
{
"Stripe": {
"TestPublishableKey": "pk_test_your_key_here",
"TestSecretKey": "sk_test_your_key_here",
"LivePublishableKey": "pk_live_...",
"LiveSecretKey": "sk_live_...",
"WebhookEndpointSecret": "whsec_your_secret_here"
},
"Environment": "Test"
}The configuration is loaded via Microsoft.Extensions.Configuration in StripeService.fs:
let config = loadStripeConfig ()
// config.PublishableKey, config.SecretKey, config.WebhookEndpointSecret
let settings = createSettings config
// FunStripe's RestApi.StripeApiSettings, passed to every Stripe callThe test keys are used unless "Environment" is explicitly set to "Live" (or "Production") — a missing or misspelled value falls back to the test keys. In the test environment STRIPE_TEST_API_KEY wins over TestSecretKey.
Also update the frontend publishable key in frontend/stripe-integration.js:
const STRIPE_PUBLISHABLE_KEY = 'pk_test_your_actual_key_here';cd src
dotnet runWith a test key configured this demonstrates, against your Stripe test account:
- Customer creation
- Setup intents (for saving payment methods)
- Payment intents (for processing payments)
- Complete payment flows
It always demonstrates webhook handling: a sample payment_intent.succeeded delivery is signed locally and run through the webhook handler, followed by a tampered copy that the signature check rejects.
Serve the frontend/ directory over HTTP (Stripe.js does not work reliably from file:// URLs), e.g.:
cd frontend
python -m http.server 8080
# then open http://localhost:8080The page shows:
- Stripe Elements integration
- Card setup forms
- Payment processing flows
- Error handling examples
FunStripe types are organised into per-domain namespaces: response models live under Stripe.{Domain} and request options under StripeRequest.{Domain}. The general shape of a request is <module>.<Method> settings options, where settings carries your API key. Options records are built with the static New method (optional parameters are camelCase):
open FunStripe
open FunStripe.IsoTypes // IsoCurrencyCode
open Stripe.PaymentMethod // Customer, SetupIntent, PaymentIntent, ...
open StripeRequest.Customers // Customers
open StripeRequest.Setup // SetupIntents
open StripeRequest.Payment // PaymentIntents
let settings =
RestApi.StripeApiSettings.New(
apiKey = config.SecretKey,
stripeVersion = Config.DefaultStripeApiVersion
)stripeVersion sends the Stripe-Version header. Without it Stripe uses the default API version of your account, which can differ from the version the FunStripe models were generated from (Config.DefaultStripeApiVersion, here 2026-09-30.endive). Pinning it keeps the responses in line with the types.
let createCustomer (firstName: string) (lastName: string) (email: string) =
Customers.CreateOptions.New(
email = email,
name = $"{firstName} {lastName}",
description = "Sample customer"
)
|> Customers.Create settings
// Async<Result<Customer, StripeError.ErrorResponse>>let createSetupIntent (customerId: string) =
SetupIntents.CreateOptions.New(
customer = customerId,
allowedPaymentMethodTypes = [SetupIntents.Create'AllowedPaymentMethodTypes.Card],
usage = SetupIntents.Create'Usage.OffSession
)
|> SetupIntents.Create settings// Note: the amount is an int in the smallest currency unit (e.g. cents)
let createPaymentIntent (amount: int) (currency: IsoCurrencyCode) (customerId: string) =
PaymentIntents.CreateOptions.New(
amount = amount,
currency = currency,
customer = customerId,
allowedPaymentMethodTypes = [PaymentIntents.Create'AllowedPaymentMethodTypes.Card]
)
|> PaymentIntents.Create settings
// createPaymentIntent 2000 IsoCurrencyCode.USD "cus_..."Stripe removed the payment_method_types request parameter in the 2026-09-30.endive API, so FunStripe 3.0 no longer has paymentMethodTypes on these requests. Its replacement, allowedPaymentMethodTypes, is a typed list that filters the payment methods Stripe computes dynamically for the payment: a type you list is offered only if it is also eligible. Leave it out to offer everything enabled in your Dashboard.
See the frontend/ directory for complete examples. Key patterns:
// Initialize Stripe Elements
const stripe = Stripe('pk_test_...');
const elements = stripe.elements();
const cardElement = elements.create('card', { style: elementStyles });
cardElement.mount('#card-element');
// Confirm a payment
const { error, paymentIntent } = await stripe.confirmCardPayment(clientSecret, {
payment_method: {
card: cardElement,
billing_details: { name: 'Customer Name' }
}
});See the webhooks/ directory for complete examples. Verify the Stripe-Signature header against the raw request body first, then parse the payload into FunStripe's Event:
open FunStripe
open Stripe.Event
open Stripe.PaymentMethod
let handleWebhook (endpointSecret: string) (signatureHeader: string) (rawBody: string) =
async {
match WebhookSigning.verifyWithDefaultTolerance endpointSecret rawBody signatureHeader with
| Error reason -> return Error $"Invalid signature: {reason}"
| Ok () ->
let stripeEvent = Util.deserialise<Event> rawBody
match stripeEvent.Type with
| EventType.PaymentIntentSucceeded ->
let paymentIntent = stripeEvent.Data.Object |> Util.deserialiseRaw<PaymentIntent>
let! result = handlePaymentSuccess paymentIntent
return Ok result
| EventType.SetupIntentSucceeded ->
let setupIntent = stripeEvent.Data.Object |> Util.deserialiseRaw<SetupIntent>
let! result = handleSetupSuccess setupIntent
return Ok result
// ... handle other events
| _ -> return Ok (Ignored "Event type not handled")
}WebhookSigningchecks the HMAC-SHA256 in constant time, enforces the timestamp tolerance (5 minutes by default) and accepts any of thev1entries Stripe sends while an endpoint secret is being rolled. Pass it the body exactly as received; a re-serialised copy does not match the signature.Event.Data.Objectis aRawJsonvalue holding the event's object as Stripe sent it.Util.deserialiseRawturns it into the model that belongs to the event type.- Event types Stripe adds after this FunStripe version was generated deserialise to
EventType.UnknownEnumValue "the.event.type", so a match onEventTypeneeds a wildcard (or that case). - Stripe renders
data.objectwith the API version of the webhook endpoint. Create the endpoint with the version the FunStripe models target (Config.DefaultStripeApiVersion), otherwise an object may not deserialise. - Stripe also adds enum values without a new API version, and FunStripe fails on a value it does not know.
handleWebhookRequestWithanswers such a verified delivery 200 with an[ALERT]log line (Unreadable), since every retry would fail the same way; retrieve the event by its ID after upgrading FunStripe. - Expandable fields are typed.
paymentIntent.Customeris aPaymentIntentCustomer'AnyOf(a bare ID, or the full customer when expanded), and references such assetupIntent.PaymentMethodare aStripeId<Markers.PaymentMethod>; matchStripeId idto get the string. SeeEvents.fs.
FunStripe uses F# Result types for comprehensive error handling. The error type is StripeError.ErrorResponse, whose StripeError field holds Stripe's error object (with optional Message, Code, DeclineCode, etc.):
let handlePaymentResult result =
match result with
| Ok (paymentIntent: PaymentIntent) ->
// Success - process the payment intent
printfn $"Payment created: {paymentIntent.Id}"
| Error (e: StripeError.ErrorResponse) ->
// Handle the error appropriately
let message = e.StripeError.Message |> Option.defaultValue "Unknown error"
printfn $"Error: {message}"All Stripe operations are asynchronous and return Async<Result<'T, StripeError.ErrorResponse>>. FunStripe's asyncResult computation expression chains them and stops at the first error:
open FunStripe.AsyncResultCE
let processPayment () =
asyncResult {
let! customer = createCustomer "John" "Doe" "john@example.com"
let! paymentIntent = createPaymentIntent 2000 IsoCurrencyCode.USD customer.Id
return paymentIntent
}Pass an idempotency key with a mutating request so that a retry cannot run it twice. Stripe keeps the response to the first request with a key for 24 hours and answers a repeat with it:
let createCustomerOnce (idempotencyKey: string) (email: string) =
Customers.CreateOptions.New(email = email)
|> Customers.Create (settings.WithIdempotencyKey idempotencyKey)The sample passes a key with every create call. StripeService.fs has two small types for it, so that a key cannot be blank or be mixed up with the other strings a call takes:
// OperationId: one operation of your application. None when blank or too long.
match OperationId.tryCreate request.IdempotencyKey with
| None -> // reject the request
| Some operationId ->
// IdempotencyKey: one Stripe call of that operation
createCustomer settings (idempotencyKeyFor operationId "customer") firstName lastName email
// ...
createPaymentIntent settings (idempotencyKeyFor operationId "payment-intent") amount currency (Some customerId)- The operation ID must be the same for every retry and different for any other operation. Take it from something your application stores: an order ID, or the
Idempotency-Keyheader your own client sent. The endpoints inIntegrationExample.fsread it from the request (IdempotencyKey) and reject a request without one.Program.fsuses a fresh GUID only because every demo run is a new operation. - Stripe ties a key to the endpoint and parameters of its first use, hence one key per step of an operation.
- A retried
createPaymentEndpointrequest gets the same customer and payment intent back. A returning user is a different operation, though: to avoid a second Stripe customer for the same person, store the customer ID with your user and look it up before creating one.
FunStripe.Sample/
├── README.md # This file
├── src/
│ ├── StripeService.fs # Shared (configuration, idempotency, customers) and card payments
│ ├── DirectDebit.fs # Direct debit: bank account setup, mandates, off-session debits
│ ├── FinancialConnections.fs # Open banking: linked accounts, gambling screening of transactions
│ ├── Issuing.fs # Card issuing: cardholders, cards, card designs, authorizations
│ ├── DisputeHandling.fs # Disputes: evidence, outcomes, early fraud warnings
│ ├── WebshopCheckout.fs # Webshop: Checkout Sessions, fulfilment, refunds
│ ├── Memberships.fs # Memberships: subscriptions, freezes, access
│ ├── IntegrationExample.fs # Web API integration patterns
│ ├── Program.fs # Console demo of the card payments
│ ├── appsettings.json # Configuration (Stripe keys)
│ └── FunStripe.Sample.fsproj
├── examples/
│ ├── Common.fsx # Shared setup of the scripts
│ ├── CardPayments.fsx # One runnable script per use case
│ ├── DirectDebit.fsx
│ ├── FinancialConnections.fsx
│ ├── Issuing.fsx
│ ├── Disputes.fsx
│ ├── WebshopCheckout.fsx
│ └── Memberships.fsx
├── frontend/
│ ├── index.html # Card payments with Stripe Elements
│ ├── stripe-integration.js
│ ├── direct-debit.html # Direct debit setup with the Payment Element
│ ├── direct-debit.js
│ ├── financial-connections.html # Linking bank accounts
│ ├── financial-connections.js
│ ├── use-case-common.js # Shared by the two pages above
│ └── styles.css # Basic styling
├── webhooks/
│ ├── WebhookHandler.fs # Signature verification and event dispatch
│ ├── Events.fs # Business logic per card payment event
│ └── WebhookSamples.fs # Sample payloads and signatures for local runs
└── tests/
├── FakeStripeServer.fs # Local stand-in for api.stripe.com
├── fixtures/ # Stripe objects for the fake server and the webhook tests
├── EventsTests.fs # Event handler tests
├── WebhookHandlerTests.fs # Signature verification and processing tests
├── StripeServiceTests.fs # Service, request encoding and config tests
├── IntegrationExampleTests.fs # Endpoint tests
├── DirectDebitTests.fs # One test file per use case
├── FinancialConnectionsTests.fs
├── IssuingTests.fs
├── DisputeHandlingTests.fs
├── WebshopCheckoutTests.fs
├── MembershipsTests.fs
├── LiveTests.fs # Calls Stripe test mode (needs STRIPE_TEST_API_KEY)
└── tests.fsproj
- Never expose secret keys in frontend code -- only use publishable keys
- Use environment variables or a key vault for production keys
- Rotate keys regularly
- Use different keys for test and production
- Always verify webhook signatures (see
WebhookHandler.fs) - Keep the endpoint secret configured and private: the handler rejects every delivery while it is blank or still the
whsec_...placeholder, because anyone could sign a payload with a known secret - Use HTTPS endpoints only
- Implement idempotency to handle duplicate events
- Store and replay events if processing fails
- Never store card details yourself -- use Stripe Elements
- Implement proper error handling to avoid exposing sensitive information
- Log security events for auditing
-
Endpoints:
POST /api/customers-- Create customersPOST /api/payment-intents-- Create payment intentsPOST /api/setup-intents-- Create setup intentsPOST /webhooks/stripe-- Handle Stripe webhooks
-
Service Layer:
StripeService-- Wraps FunStripe operationsPaymentService-- Business logic for paymentsCustomerService-- Customer managementWebhookService-- Event processing
-
Database Integration:
- Store customer mappings (your user ID <-> Stripe customer ID)
- Track payment statuses and order history
- Log webhook events for idempotency
- Store payment method references
Define your own error types alongside Stripe's:
type PaymentError =
| StripeApiError of StripeError.ErrorResponse
| InsufficientFunds
| InvalidCustomer
| OrderNotFound- Successful payment:
4242424242424242 - Declined payment:
4000000000000002 - 3D Secure required:
4000002500003155 - Insufficient funds:
4000000000009995
- Happy path: Successful payment flows
- Error handling: Failed payments, network errors
- Edge cases: Large amounts, international cards
- Security: Invalid webhooks, tampered requests
The repository ships an xUnit test suite in tests/ covering signature verification, event handling, and the service/endpoint patterns:
cd tests
dotnet testThe tests need no Stripe account. StripeApiSettings takes a base URL, so the service code runs unchanged against a local fake server (FakeStripeServer.fs) that records the requests and answers with Stripe-shaped JSON. That exercises FunStripe's real request encoding and response deserialisation:
[<Fact>]
let ``createCustomer posts name and email and returns the customer`` () =
async {
use stripe = new FakeStripe(respondOk)
// `key` is a test helper: the idempotency key of a step of the operation "op-1"
match! createCustomer stripe.Settings (key "customer") "Alice" "Smith" "alice@example.com" with
| Ok customer -> Assert.Equal("cus_FakeCustomer", customer.Id)
| Error err -> Assert.Fail($"Expected Ok, got Error: {describeStripeError err}")
let request = Assert.Single stripe.Requests
Assert.Equal("/v1/customers", request.Path)
Assert.Equal("Alice Smith", request.Form.["name"])
} |> Async.StartImmediateAsTask :> TaskLiveTests.fs runs the same service functions against Stripe's test mode. It is skipped unless STRIPE_TEST_API_KEY is set.
- Replace test keys with live Stripe keys
- Set up webhook endpoints with HTTPS
- Configure proper error monitoring
- Set up payment reconciliation
- Test all payment flows thoroughly
- Configure fraud prevention rules
- Set up customer support processes
- Payment success/failure rates
- Webhook delivery status
- API response times
- Error rates and patterns
- Revenue and transaction volume
- Subscription billing:
Memberships.fs, a monthly plan with a joining fee, pauses and cancellation - Refunds:
WebshopCheckout.refundOrder(an order, in full or in part) andDisputeHandling.refundEarlyFraudWarning
- Reference
FunStripe.Coreinstead ofFunStripeLite(orFunStripe). - Replace
open FunStripe.StripeRequestandStripeModel.Xwith the per-domain namespaces:StripeRequest.{Domain}for requests,Stripe.{Domain}for models. - Replace
paymentMethodTypes = ["card"]withallowedPaymentMethodTypes = [...Create'AllowedPaymentMethodTypes.Card]on PaymentIntent, SetupIntent and Checkout Session requests. - Currencies are
IsoTypes.IsoCurrencyCodevalues instead of strings (parseCurrencyinStripeService.fsconverts user input). - Webhooks:
Event.Data.ObjectisRawJson(useUtil.deserialiseRaw),EventTypehas anUnknownEnumValuecase, andWebhookSigningreplaces hand-written signature checks. - Many ID fields are
StripeId<_>or...'AnyOfunions instead of strings.
See FunStripe's CHANGELOG and v1 to v2 migration guide for the full list.
For production applications, consider implementing:
- Advanced webhook handling (retries, idempotency)
- Multi-party payments and marketplace features (Stripe Connect)