From salesforce-commerce
Implements Salesforce Commerce payments using Salesforce Payments (Stripe, Adyen), B2C JavaScript cartridges, B2B Apex adapters, PCI tokenization, 3DS/SCA, payment management. Use for payment processing.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin salesforce-commerceThis skill is limited to using the following tools:
**Fetch live docs before implementing payment processing features.**
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
Fetch live docs before implementing payment processing features.
Authorize (reserve funds)
-> Capture (collect on shipment)
-> Refund (return funds, full or partial)
-> Void (cancel before capture)
This authorize-capture-refund lifecycle applies to both B2C and B2B. Some flows combine authorize + capture into a single "sale" operation.
Multi-processor support: Salesforce Payments integrates with Stripe, Adyen, PayPal, and other processors. Configuration is unified within Salesforce Commerce setup.
| Feature | Detail |
|---|---|
| Payment methods | Cards, Apple Pay, Google Pay, ACH, SEPA, local methods |
| Saved methods | Tokenized cards for returning customers |
| Fraud detection | Via configured processor (Stripe Radar, Adyen risk) |
| 3DS / SCA | Built-in support through processor |
| Dispute management | Chargeback handling and evidence submission |
| Multi-currency | Configured per processor account |
Cartridge-based integration:
Payment Hook Points:
| Hook | Purpose |
|---|---|
| Authorize | Reserve funds on payment method |
| Capture | Capture authorized amount (full or partial) |
| Refund | Return funds to customer |
| Void | Cancel authorization before capture |
| Verify | Validate payment method ($0 auth) |
Server-side scripts (authorize.js, capture.js, refund.js, void.js) receive basket/order, payment instrument, and amount; return {authorized, error, errorMessage}.
Client-side integration:
Apex PaymentGatewayAdapter interface:
// Pattern: B2B PaymentGatewayAdapter skeleton
public class MyAdapter implements PaymentGatewayAdapter {
// Fetch live docs for PaymentGatewayAdapter interface
// Implement: authorize, capture, refund
}
B2B Payment Method Types:
| Method | Notes |
|---|---|
| Credit / debit card | Via PaymentGatewayAdapter |
| Purchase order (PO) | PO number required at checkout |
| Net terms | Net 30, Net 60 per account |
| ACH / bank transfer | For B2B bank payments |
| Invoice | Payment against generated invoice |
B2B-specific considerations:
Tokenization Principle:
SAQ-A Compliance:
| Requirement | Implementation |
|---|---|
| Card data never touches merchant servers | Use hosted payment fields (iframe) |
| Client-side tokenization only | Processor JS SDK tokenizes before form submit |
| Server receives tokens only | No raw card data in server logs or database |
| Processor handles PCI DSS Level 1 | Stripe Elements, Adyen Drop-in provide compliant fields |
3DS2 Authentication Flow:
Payment submitted
-> Processor risk assessment
-> Frictionless (low risk): instant approval
-> Challenge (high risk): redirect/iframe to bank
-> Customer authenticates (password, biometric, OTP)
-> Success: proceed with authorization
-> Failure: decline payment
SCA Requirements (European Transactions):
// Pattern: B2C payment authorization hook
// Fetch live docs for SFCC PaymentProcessor scripts
// function authorize(order, paymentInstrument, amount)
// -> call processor API -> return {authorized, error}
// Pattern: B2B gateway registration
// Fetch live docs for PaymentGateway setup
// Setup > Payment Gateways > register adapter class
// Store API keys in Named Credentials, not code
Fetch the Salesforce Payments configuration guide, PaymentGatewayAdapter Apex reference, and your processor's SDK docs for exact implementation details before coding.