Salesforce Decode
Salesforcedecode
Back to questions
IntegrationAdvancedstripepaymentsbilling

Design payment gateway integration with Stripe and Salesforce

Real World Scenario

B2B portal collects payment on Order via Stripe with receipt stored on Salesforce Payment record.

Expected Answer

• Stripe PaymentIntent created server-side Apex or middleware • Client receives client_secret for Stripe.js confirming payment • Webhook payment_intent.succeeded creates Payment__c idempotently • PCI: never store raw card data in Salesforce • Refund initiated from Case triggers Stripe refund API • Reconciliation nightly Stripe payouts vs Salesforce payments

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Stripe PaymentIntent created server-side Apex or middleware. Client receives client_secret for Stripe.js confirming payment. Pick based on your integration pattern and team capability. Payments integration is webhook-driven—design idempotent webhook handler before UI. Optimize for scale and operational observability.

Architect Perspective

Payments integration is webhook-driven—design idempotent webhook handler before UI.