.png)

Stripe Payments Integration Guide
Integrate Stripe Payments with enterprise systems through its REST API, signed webhook events, Files API, and secure payment workflows.
Stripe Payments integration options at a glance
Stripe Payments primarily integrates through a versioned REST API over HTTPS using JSON, resource-oriented endpoints, cursor-based pagination, request expansions, and idempotency keys. Signed webhooks provide asynchronous notifications for selected payment, billing, customer, subscription, refund, and dispute events. Stripe also provides a Files API for supported document workflows and analytics or export products such as Stripe Sigma and Stripe Data Pipeline, rather than direct transactional database access. Martini can consume these endpoints, validate webhook signatures, store secrets securely, paginate and reconcile data, map Stripe objects, orchestrate business rules, and expose controlled APIs for internal applications.
| Integration point | Supported by Stripe Payments? | Common use cases | How Martini supports it |
|---|---|---|---|
| REST APIs | Yes | Stripe’s versioned HTTPS REST API supports PaymentIntents, Charges, Customers, PaymentMethods, Refunds, Subscriptions, Invoices, Disputes, and other payment resources. | Martini can consume Stripe REST endpoints from workflows, configure authentication, map JSON payloads, apply business rules, and expose a controlled API façade. |
| Webhooks and outbound events | Yes | Stripe sends signed, event-specific notifications such as payment_intent.succeeded, invoice.paid, charge.refunded, subscription changes, and dispute creation. | Martini can receive webhook requests through an API or webhook-consuming workflow, validate the Stripe-Signature header, deduplicate events, and orchestrate downstream processing. |
| Bulk, asynchronous, and batch processing | Limited | Stripe supports resource-specific asynchronous behavior and list-based synchronization, but does not provide one universal bulk API for every object. | Martini can paginate list endpoints, schedule reconciliation workflows, process asynchronous results, and checkpoint successful downstream writes. |
| File and attachment APIs | Yes | The Stripe Files API supports uploading and managing files for supported payment, identity, dispute, or account workflows. | Martini can call the Files API, route file metadata or references, and coordinate related object processing subject to Stripe’s file restrictions. |
| Database and analytics access | Limited | Stripe Sigma and Stripe Data Pipeline provide analytics or export capabilities, not general-purpose transactional database access. | Martini can consume supported export outputs or combine Stripe API data with SQL workflows, while treating analytics exports separately from transactional updates. |
| Authentication | Yes | Stripe supports secret, publishable, restricted, and test/live API keys; Stripe Connect also supports OAuth and connected-account access patterns. | Martini can store API keys and webhook signing secrets in protected environment configuration, apply the appropriate authorization headers, and separate test and live settings. |
| SDKs | Yes | Stripe provides official client libraries for several programming languages, although the primary integration surface remains the HTTPS API. | Martini can consume the HTTPS API directly and use custom JVM-compatible logic only where the standard workflow and API capabilities require extension. |
How Stripe Payments exposes data and business events
Stripe Payments REST APIs
Stripe’s primary integration surface is a versioned REST API over HTTPS with JSON payloads, resource-oriented URLs, HTTP status codes, cursor-based pagination, request expansions, and idempotency keys. It exposes payment, customer, billing, refund, dispute, file, and related resources.
Martini implementation pattern
Martini implementation pattern: a workflow authenticates with a protected Stripe key, calls the required endpoint, validates the response, maps the Stripe object into a canonical model, applies business rules, and writes to a target system. For creates and updates, the workflow uses stable idempotency keys and handles pagination or transient failures explicitly.
Implementation sequence
Stripe Payments Webhooks
Stripe supports signed webhook notifications for selected payment, billing, customer, subscription, refund, and dispute events. Coverage is event-specific, and integrations should subscribe only to events required by the business process.
Martini implementation pattern
Martini implementation pattern: expose a controlled API or webhook-consuming workflow, preserve the request body as needed for verification, validate the Stripe-Signature header with the endpoint signing secret, deduplicate using the Stripe event ID, and retrieve the referenced object when current state is required.
Implementation sequence
Stripe Payments Files API
Stripe’s Files API supports uploading and managing files for supported payment, identity, dispute, or account workflows. File handling is subject to the object-specific requirements and restrictions documented by Stripe.
Martini implementation pattern
Martini implementation pattern: a workflow receives or locates a permitted file, authenticates to Stripe, uploads or retrieves the file reference, maps metadata to the relevant business object, and records the result for audit and downstream processing.
Implementation sequence
Stripe Payments Scheduled Synchronization
Stripe list endpoints use cursor-based pagination, while Stripe Events and resource-specific timestamps can support incremental retrieval. Scheduled synchronization is useful for reconciliation and completeness checks alongside webhooks.
Martini implementation pattern
Martini implementation pattern: a scheduler-triggered workflow retrieves changed Customers, Subscriptions, Invoices, or payment objects page by page, maps and writes each result, and persists a checkpoint only after downstream processing succeeds.
Implementation sequence
Common Stripe Payments integration patterns
Pattern 1: Synchronize payment status to order systems
When to use this pattern
Use this pattern when an order or commerce system must reflect asynchronous payment success, failure, refund, or dispute outcomes. PaymentIntent status should be treated as a lifecycle state rather than a simple Boolean.
Integration direction
Example Mapping
| Stripe Payments Field | Canonical Field | Target Field |
|---|---|---|
| PaymentIntent.id | paymentId | externalPaymentId |
| PaymentIntent.status | paymentStatus | paymentStatus |
| PaymentIntent.amount | authorizedAmount | authorizedAmount |
| PaymentIntent.currency | currency | currency |
Martini implementation pattern
Martini receives the signed event, validates it, checks the event ID for prior processing, and retrieves the current PaymentIntent or related Charge when necessary. It maps the result to the order model, applies rules such as not marking an order paid until the required payment state is reached, and retries transient target failures without replaying business side effects.
Martini capabilities used
- workflows
- API consumption
- webhook consumption
- data mapping
- business rules
- error handling
Pattern 2: Orchestrate orders into PaymentIntents
When to use this pattern
Use this pattern when an internal order or commerce application needs a controlled payment initiation API without embedding Stripe credentials or payment orchestration logic in every calling system.
Integration direction
Example Mapping
| Stripe Payments Field | Canonical Field | Target Field |
|---|---|---|
| order.id | orderId | metadata.order_id |
| order.total | paymentAmount | PaymentIntent.amount |
| order.currency | currency | PaymentIntent.currency |
| customer.stripeId | customerId | PaymentIntent.customer |
Martini implementation pattern
A Martini API validates the order and customer request, creates or retrieves the Stripe Customer as needed, and creates a PaymentIntent using a stable idempotency key. The workflow returns an appropriate payment response, while later Stripe webhook events update the order for confirmation, failure, refund, or dispute. Validation failures and non-idempotent retries are routed separately.
Martini capabilities used
- API exposure
- workflows
- API consumption
- secrets management
- data mapping
- validation
- error handling
Pattern 3: Reconcile subscriptions and invoices
When to use this pattern
Use this pattern when finance, ERP, CRM, or subscription systems require both near-real-time billing events and scheduled completeness checks for Subscriptions, Invoices, and Customers.
Integration direction
Example Mapping
| Stripe Payments Field | Canonical Field | Target Field |
|---|---|---|
| Subscription.id | subscriptionId | externalSubscriptionId |
| Subscription.status | subscriptionStatus | status |
| Invoice.id | invoiceId | externalInvoiceId |
| Invoice.amount_paid | paidAmount | paidAmount |
Martini implementation pattern
Martini consumes invoice and subscription webhooks for timely updates, then runs scheduled paginated retrieval to reconcile missed or delayed events. It preserves Stripe identifiers, applies ownership rules, updates the target system, and stores checkpoints only after successful writes. Duplicate events and repeated pages are handled idempotently.
Martini capabilities used
- scheduler-triggered workflows
- webhook consumption
- API consumption
- pagination orchestration
- data mapping
- checkpointing
- error handling
Pattern 4: Process refunds and disputes
When to use this pattern
Use this pattern when finance, order, or support teams need consistent processing of refunds and disputes, including controlled initiation of authorized refund actions.
Integration direction
Example Mapping
| Stripe Payments Field | Canonical Field | Target Field |
|---|---|---|
| Refund.id | refundId | externalRefundId |
| Refund.amount | refundAmount | amount |
| Dispute.id | disputeId | externalDisputeId |
| Charge.payment_intent | paymentId | paymentReference |
Martini implementation pattern
Martini receives a refund or dispute event, validates its signature, retrieves the related Charge, PaymentIntent, Refund, or Dispute, and updates the target system. A protected Martini API can initiate an approved refund through Stripe. The workflow records correlation identifiers, applies authorization rules, and prevents duplicate financial actions.
Martini capabilities used
- API exposure
- webhook consumption
- API consumption
- business rules
- data mapping
- audit logging
- retry handling
Applications commonly integrated with Stripe Payments
Stripe Payments can be integrated with named enterprise applications when payment, billing, customer, subscription, support, or analytics data must move between systems. Martini provides an orchestration layer for authentication, transformation, business rules, event handling, and controlled access without exposing Stripe credentials to downstream applications.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| Salesforce | Synchronize Stripe Customers, payment status, subscriptions, refunds, and revenue-related events with account and opportunity data. | Stripe Payments → Martini → Salesforce | Receive Stripe webhook events or retrieve changed objects on a schedule, normalize them into the enterprise customer and payment model, and update Salesforce through its APIs. Expose a controlled Martini API for approved payment or billing actions. |
| Shopify | Reconcile commerce orders with payment outcomes, refunds, and payment-related customer activity. | Shopify → Martini → Stripe Payments | Accept an order or payment request from Shopify or an intermediary, validate the business transaction, create or retrieve Stripe Customers and PaymentIntents with stable idempotency keys, and return status updates through webhook-driven workflows. |
| NetSuite | Post payments, refunds, invoices, customers, and settlement-related information into finance and ERP processes. | Stripe Payments → Martini → NetSuite | Consume Stripe events and paginated resources, map Stripe identifiers and monetary values to NetSuite records, apply reconciliation rules, and retry transient API failures without duplicating financial postings. |
| ServiceNow | Provide support or operations teams with context for failed payments, disputes, refunds, and customer account issues. | Stripe Payments → Martini → ServiceNow | Route selected Stripe events through Martini, enrich them by retrieving the current PaymentIntent, Charge, Refund, or Dispute, and create or update ServiceNow records. Authorized actions can call a protected Martini API rather than exposing Stripe credentials. |
| Zuora | Coordinate subscription, invoice, collection, and payment data when Stripe processes payments for subscription billing. | Zuora → Martini → Stripe Payments | Define ownership for subscriptions and invoices, then use Martini to synchronize selected objects and events in one direction or both directions. Apply duplicate prevention and business rules so billing actions are not issued by both systems unintentionally. |
| Workday | Support finance reconciliation, payment reporting, and downstream settlement-related processes. | Stripe Payments → Martini → Workday | Retrieve or receive Stripe payment and billing data, transform it into the finance reporting model, enrich it with internal references, and deliver approved results to Workday through the enterprise integration layer. |
| Zendesk | Give support agents payment, refund, subscription, and dispute context while keeping Stripe credentials out of support tooling. | Stripe Payments → Martini → Zendesk | Use Stripe webhooks or scheduled retrieval to update Zendesk context, with Martini mapping Stripe identifiers to customer and ticket data. Authorized refund requests can invoke a validated Martini workflow. |
| Snowflake | Centralize Stripe payment, customer, billing, and event data for analytics, reconciliation, and reporting. | Stripe Payments → Martini → Snowflake | Use Stripe Data Pipeline where its export model is sufficient, or have Martini retrieve and transform selected Stripe resources before loading them into Snowflake. Persist checkpoints and object identifiers for repeatable incremental synchronization. |
How to build a Stripe Payments integration in Martini
Objective
Configure Stripe test and live environments separately and protect API keys and webhook signing secrets.
Instructions in Martini
- Store Stripe secrets in protected Martini environment configuration
- Use restricted or appropriately scoped keys where possible
- Configure separate test and live credentials
- Preserve the connected account identifier for Stripe Connect scenarios
Objective
Select the trigger that matches the business requirement: signed webhook events for near-real-time changes, an API request for controlled actions, or a schedule for reconciliation.
Instructions in Martini
- Use a webhook-consuming workflow for selected Stripe events
- Expose a Martini API for approved payment or refund operations
- Use a scheduler-triggered workflow for paginated synchronization
- Define which system owns each payment, subscription, or invoice action
Objective
Receive the event or call the relevant Stripe REST endpoint and obtain current state when the event payload alone is insufficient.
Instructions in Martini
- Validate the Stripe webhook signature before processing
- Retrieve the referenced PaymentIntent, Charge, Customer, Refund, or Dispute when required
- Handle cursor-based pagination for list endpoints
- Use resource-specific filters or checkpoints for incremental retrieval
Objective
Coordinate validation, enrichment, transformation, target writes, and response handling in a maintainable Martini workflow.
Instructions in Martini
- Validate required identifiers and monetary fields
- Enrich event data with current Stripe resources where necessary
- Apply lifecycle and ownership rules
- Separate transient failures from validation or authorization failures
Objective
Convert Stripe JSON objects into canonical and target-specific schemas while preserving Stripe identifiers and payment references.
Instructions in Martini
- Map PaymentIntent, Charge, Customer, Refund, Subscription, and Invoice fields explicitly
- Normalize currencies, amounts, timestamps, and status values
- Avoid storing raw card numbers or CVC values
- Preserve Stripe event and object IDs for traceability
Objective
Update the target application, database, or finance process only after validation and business rules succeed.
Instructions in Martini
- Write downstream changes idempotently
- Use stable idempotency keys for Stripe create operations
- Record processing status and correlation information
- Persist synchronization checkpoints only after successful target writes
Common Stripe Payments data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| PaymentIntents | Track the lifecycle of a payment, including confirmation, authorization, required customer actions, and capture. | Orders, commerce applications, ERP, finance platforms, and customer support systems | Martini receives or retrieves the PaymentIntent, evaluates lifecycle status, maps amounts and identifiers, applies idempotency and business rules, and updates downstream systems. |
| Charges | Represent funds charged to a payment method, including payment outcome, balance transaction, and refund-related information. | ERP, finance, reconciliation, reporting, and support platforms | Martini retrieves Charges when event processing requires current payment detail, maps monetary and Stripe identifiers, and prevents duplicate financial postings. |
| Customers | Store customer identity, contact details, payment-method associations, and billing information. | CRM, ERP, subscription platforms, and customer-support applications | Martini synchronizes Customers using webhook events or paginated retrieval, applies field validation and normalization, and preserves the Stripe Customer ID. |
| PaymentMethods | Represent cards, bank accounts, and other supported payment instruments associated with payment flows. | Payment orchestration, CRM, order systems, and internal payment services | Martini passes supported references and status data while avoiding storage of raw card numbers, CVC values, or other restricted payment credentials. |
| Refunds | Represent full or partial reversals of Charges or PaymentIntents. | ERP, finance, order management, customer support, and reconciliation systems | Martini consumes refund events or retrieves Refunds, links them to the original payment, applies authorization rules, and records processing status. |
| Subscriptions | Represent recurring billing arrangements and their lifecycle. | CRM, ERP, subscription billing, finance, and customer-support applications | Martini synchronizes subscription changes, maps status and customer relationships, combines them with Invoice events, and applies ownership and duplicate-processing rules. |
Authentication and security considerations
API keys and environments
Stripe uses HTTPS requests authenticated with secret, publishable, restricted, and test or live API keys. Server-side workflows should use protected secret or restricted keys and keep test and live configuration separate.
Webhook verification
Stripe signs webhook payloads with the Stripe-Signature header. Martini workflows should validate the signature with the endpoint signing secret before accepting an event for business processing.
Secrets and payment data
- Store API keys and webhook signing secrets in protected Martini environment configuration.
- Do not store raw card numbers, CVC values, or other restricted payment credentials.
- Preserve Stripe IDs and tokens needed for orchestration instead of sensitive payment instrument data.
- For Connect, apply the correct connected-account header and permission model.
Operational considerations for Stripe Payments integrations
Pagination and reconciliation
Stripe list endpoints use cursor-based pagination. Workflows should process pages explicitly, persist checkpoints after successful target writes, and use scheduled reconciliation to complement webhook delivery.
Idempotency and ordering
Stripe can retry webhook delivery, and events may arrive out of order. Deduplicate with the Stripe event ID, use stable idempotency keys for create operations, and retrieve current resource state when an event is not sufficient.
Versions and lifecycle states
Manage the Stripe API version used by each integration and test changes in test mode. Treat PaymentIntent status as a lifecycle rather than a Boolean, and distinguish authorization, capture, success, refund, and dispute outcomes.
Retries and monitoring
Handle rate limits, authentication failures, validation errors, and Stripe-specific errors separately. Use bounded retries for transient failures, record correlation information, and route persistent failures for review.
Why use Martini instead of scripts or point-to-point integrations?
Orchestrate beyond a script
Martini provides a maintainable workflow layer for Stripe API calls, signed webhook processing, scheduled reconciliation, target-system writes, and controlled API exposure.
Centralize transformation and rules
Mappings, payment lifecycle rules, idempotency checks, enrichment, and error paths can be managed consistently instead of being duplicated across point-to-point scripts.
Protect enterprise boundaries
Martini keeps Stripe credentials and webhook secrets in protected configuration while exposing only the APIs and data required by internal applications.
Support operational reliability
Reusable workflows can handle pagination, retries, duplicate events, checkpoints, monitoring, and deployment configuration as integration concerns rather than leaving them to individual scripts.
Frequently asked questions
Stripe Payments can be integrated through its versioned REST API, signed webhooks for selected asynchronous events, Files API, and scheduled or paginated retrieval. Enterprise workflows commonly synchronize PaymentIntents, Charges, Customers, Refunds, Subscriptions, Invoices, and Disputes with commerce, CRM, ERP, finance, support, and analytics systems.
Yes. Martini can consume Stripe’s REST API, receive and validate signed Stripe webhook events, call the Files API, run scheduled synchronization workflows, map Stripe JSON objects, and expose controlled APIs for internal applications. A native Martini Stripe connector is not documented in the supplied sources.
No. A dedicated Stripe Payments connector is not required. Martini can integrate using Stripe’s native REST API, signed webhook events, Files API, API-key or Connect authentication, and other confirmed HTTPS endpoints.
Lonti does not charge an additional per-connector or per-vendor fee to integrate Stripe Payments. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Stripe, cloud infrastructure, or other third-party systems depending on subscription, usage, and deployment model.
Stripe’s REST API is the primary method for synchronous operations and resource retrieval. Signed webhooks are appropriate for selected asynchronous payment, billing, subscription, refund, and dispute events. Cursor-based list endpoints support scheduled reconciliation, while the Files API supports specific file workflows. No official Stripe GraphQL or SOAP API was confirmed.
Yes. Martini can expose an API or webhook-consuming workflow for Stripe events. The workflow should validate the Stripe-Signature header, preserve the raw body as needed for verification, deduplicate using the Stripe event ID, and retrieve the referenced object when current state verification is necessary. Webhook coverage is event-specific rather than universal.
Near-real-time synchronization can use Stripe webhook events, while scheduled workflows can retrieve paginated resources for reconciliation. Martini can persist Stripe object IDs, event IDs, processing status, and checkpoints. Stable idempotency keys should be used for create operations, and duplicate or out-of-order events should not create duplicate business side effects.
Yes. Martini can expose a controlled REST API that validates requests, applies authorization and business rules, calls Stripe’s REST API, and returns an enterprise-specific response. This allows internal systems to initiate supported operations such as PaymentIntents or authorized refunds without exposing Stripe secret keys directly.
Related Martini documentation
Webhooks
Build reliable Stripe Payments integrations with Martini
Use Martini to connect Stripe Payments with enterprise applications through secure APIs, signed events, reusable workflows, data mapping, and operational controls.