Salesforce Order Management Administrator AP study materials
Salesforce Order Management Administrator AP study resources

Payment Capture Fails for Partial Shipments

Salesforce Order Management Administrator AP · Put your knowledge to work in context.

All case studies

Payment Capture Fails for Partial Shipments

A company uses Salesforce Order Management with an integration to a payment gateway. They support partial shipments, where an order with multiple line items is shipped in separate boxes. The payment capture process is set up to capture the full order amount when the first shipment is made. However, customers are complaining that they are charged the full amount even when only part of the order has shipped. The company wants to capture payment only for the items that have shipped. The payment gateway supports partial captures. The integration uses a custom Apex class that calls the payment gateway's API. The order management configuration has a single payment record per order.

1. What is the root cause of the incorrect payment capture behavior?

Read the worked answer

The root cause is that the payment capture process is configured to capture the full order amount upon the first shipment, rather than capturing based on the shipped items. The custom Apex class likely triggers a full capture when the first fulfillment order is marked as shipped. The order management configuration uses a single payment record per order, which does not support partial captures by default. The integration with the payment gateway is not set up to handle partial captures; it probably sends the full order amount in the capture request.

2. How would you modify the configuration and integration to support partial captures?

Read the worked answer

To support partial captures: 1) Modify the order management configuration to create multiple payment records or use a payment authorization that allows multiple captures. 2) Update the custom Apex class to calculate the amount to capture based on the shipped line items. When a fulfillment order is shipped, compute the total value of the shipped items (including tax and shipping proportional) and capture that amount. 3) Ensure the payment gateway integration supports partial captures by sending the correct amount and referencing the original authorization. 4) Use the standard 'Capture Payment' action in a flow that is triggered per fulfillment order, passing the shipped amount. 5) Test with partial shipments to verify that captures match shipped amounts.