Phase 1 — Build the Commerce module
What this does: Generates the Client_SplitPayment PHP module that handles the checkout UI, store credit application, REST endpoints, and the I/O event subscription. This is the thin in-Commerce adapter — all operator workflow stays in App Builder.
Step 1.1 — Customize the prompt for your project
Open the Commerce module AI prompt page and note the following before you copy the prompt:
- Replace
Clientwith your real vendor name in the prompt - Replace
SplitPaymentif you want a different module name - If your theme is not Luma, the
LayoutProcessorPlugininjection path and RequireJS mappings may need adjusting - If your Cash on Delivery method uses a code other than
cashondelivery, updatepayment-method-helper.js
Step 1.2 — Run the prompt
Copy the full prompt from PROMPT START to End of prompt and paste it into Cursor (with Claude) or directly into Claude. Run it from the root of your Commerce project so the AI can create files under app/code/.
Step 1.3 — Enable and install the module
Run these commands from your Commerce project root:
Step 1.4 — Verify the module installed correctly
You should see five columns: split_store_credit_amount, split_cash_amount, split_cash_status, split_sc_invoice_id, and split_cash_invoice_id.
Then confirm in a browser that the split payment fields appear at checkout when a logged-in customer with store credit selects Cash as the payment method.
Phase 2 — Configure environment variables
What this does: Prepares the credential files used by the App Builder orchestrator, the simulation script, and (optionally) the Experience Cloud UI extension. The same four OAuth values from your Commerce integration are used in every .env file.
Refer to the environment variables reference for the complete list of variables per component.
Step 2.1 — Create the orchestrator .env
In your split-payment-orchestrator/ directory:
Fill in every value:
| Variable | Where to get it |
|---|---|
COMMERCE_BASE_URL | Your store URL — no trailing slash |
COMMERCE_CONSUMER_KEY | Commerce Admin > System > Integrations |
COMMERCE_CONSUMER_SECRET | Same — only shown at activation |
COMMERCE_ACCESS_TOKEN | Same |
COMMERCE_ACCESS_TOKEN_SECRET | Same |
PAYMENT_THRESHOLD | Must match split_payment/general/threshold in Commerce (default: 100) |
DEMO_UI_SECRET | Optional — if set, required as ?secret= in the dashboard URL |
Step 2.2 — Create the simulation script .env
Fill in COMMERCE_BASE_URL and the four OAuth values (same credentials as above).
Phase 3 — Build the App Builder orchestrator
What this does: Generates the split-payment-orchestrator App Builder project: the payment-orchestrator I/O Event consumer, the payment-accept and payment-decline web actions, and the demo-dashboard operator UI.
Step 3.1 — Run the orchestrator prompt
Open the App Builder orchestrator AI prompt page. Copy the full prompt and run it from the split-payment-orchestrator/ directory.
Step 3.2 — Install dependencies and deploy
After deployment, aio app deploy prints the action URLs. Note the demo-dashboard URL — you need it in Phase 4.
Step 3.3 — Confirm the event registration
In Adobe Developer Console, open your App Builder project workspace. Under Events, confirm that the Split payment — sales order place before registration exists and is bound to the payment-orchestrator action.
Phase 4 — Test the complete flow
Work through the verification steps in order. The testing and verification guide has the full curl commands, simulation script usage, and troubleshooting reference for each step below.
Step 4.1 — Verify REST endpoints are routable
Step 4.2 — Test the checkout UI
- Log in to the storefront as your test customer (the one with store credit)
- Add a product to cart with a total under $100 after shipping and tax
- At the payment step, select Cash
- Confirm the split payment fields appear: balance shown, cash pre-filled, store credit at $0
- Reduce the cash amount and confirm the store credit portion updates correctly
Step 4.3 — Test the threshold guard
Add products totaling more than $100, proceed to checkout, select Cash, and attempt to place the order. The error "Payment could not be processed. Please try again or contact support." must appear.
Step 4.4 — Place a test split payment order
Build a cart under $100, enter a cash/store credit split, and place the order. In Commerce Admin, confirm:
-
Order status is
pending_payment -
Two comments from App Builder are visible on the order:
"Cash payment of $X.XX pending. Awaiting admin confirmation.""Split payment orchestration completed. Order awaiting cash confirmation."
If no App Builder comments appear, check logs with aio app logs before continuing.
Step 4.5 — Test accept via simulation script
In Commerce Admin, confirm:
- Order status changed to
processing - History comment:
"Cash payment of $X.XX received." - Cash invoice visible on the Invoices tab
- Shipment visible on the Shipments tab (if applicable)
Step 4.6 — Test decline via simulation script
Place another test order, then:
Confirm order status is canceled and split_cash_status is declined.
Step 4.7 — Test the demo dashboard
Open the dashboard URL from Step 3.2. With a pending order in the system:
- Confirm the order appears in the pending list
- Click Accept and confirm the order moves to
processingin Commerce - Place a fresh order, return to the dashboard, and click Decline — confirm cancellation
Phase 5 (optional) — Add the Experience Cloud UI extension
This phase embeds the operator dashboard into the Commerce Admin shell instead of using the standalone demo-dashboard. Skip this phase if the standalone dashboard meets your needs.
Step 5.1 — Review the prerequisites
The Experience Cloud UI extension requires IMS credentials in addition to the OAuth integration values. Read the Experience Cloud UI extension AI prompt page before running the prompt, paying attention to the OAUTH_CLIENT_ID and related IMS variables.
Step 5.2 — Run the UI extension prompt
Copy the full prompt from PROMPT START to End of prompt and run it from the commerce-checkout-starter-kit/ directory.
Step 5.3 — Deploy
Quick troubleshooting reference
| Symptom | First thing to check |
|---|---|
| Split payment fields do not appear at checkout | RequireJS errors in the browser console; also run bin/magento cache:flush |
"Payment could not be processed" at place order | PlaceOrderPlugin or BalanceManagementInterface — add temporary debug logging in PlaceOrderPlugin |
| No App Builder comments on the order | Run aio app logs to see if the event fired and what the action returned |
403 from Commerce REST in App Builder | Fastly IP allowlisting — test with the simulation script first; if that works, the issue is egress IP blocking |
"The signature is invalid" from Commerce | Confirm COMMERCE_BASE_URL has no trailing slash; confirm the integration is activated |
| Orders do not appear in demo dashboard | Check that extension_attributes.split_cash_status appears in a direct GET /rest/V1/orders response |
For full troubleshooting details, see the testing and verification guide.
All resources in this series
Reference resources
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an eventAdobe Commerce Roadmap Webinar - Americas & EMEA
Preview the Adobe Commerce roadmap for agentic commerce and ask the team questions.
Adobe Commerce Roadmap Webinar - Americas & APAC
Preview the Adobe Commerce roadmap for agentic commerce and ask the team questions.