Delayed PayPal Payment Capture
Introduction
Lemonway offers delayed capture with PayPal, giving merchants greater flexibility in managing orders. This feature enables payments to be debited at a later date, such as upon shipment, ensuring better alignment with business operations.
Key Benefits of Delayed Capture
Operation and Cash flow Improvements
- Merchants can defer payment until goods are ready to be shipped or services can be delivered.
Reduced Chargeback Risk
- If a merchant captures funds only when the product/service is delivered, it reduces the risk of chargebacks due to non-fulfillment.
Better Inventory & Order Management
- Ideal for goods or service availability might change.
- Merchants can authorize payment before securing inventory, ensuring they do not charge for items that go out of stock.
Increased Trust & Satisfaction
- Customers are charged only when the product is shipped rather than at the time of order.
Implementation Steps
Step 1: Initiate a PayPal Payment adding the captureMode value in the request
Endpoint: POST /moneyins/paypal/init
see: Paypal
Parameter:
captureMode
with values:Automatic
(or1
): Direct capture (default behaviour) funds are taken immediately from the buyer.Manual
(or2
): Delayed capture, where an authorization is created first, and the payment is captured later
Capture Payment in Manual Mode - Payload Example:
{
"redirections": {
"returnUrl": "string",
"errorUrl": "string",
"cancelUrl": "string"
},
"transaction": {
"reference": "string",
"accountId": "string",
"totalAmount": 1000,
"commissionAmount": 0,
"comment": "string",
"autoCommission": true,
"captureMode": 2
},
"amountBreakdown": {
"totalItems": 0,
"totalItemTaxes": 0,
"shipping": 0,
"handling": 0,
"insurance": 0,
"shippingDiscount": 0,
"discount": 0
},
"delivery": {
"receiver": {
"fullName": "string"
},
"address": {
"country": "string",
"city": "string",
"street": "string",
"postCode": "string",
"state": "string"
}
},
"items": [
{
"merchantAccountId": "string",
"description": "string",
"quantity": 0,
"unitAmount": 0,
"type": 1,
"taxAmount": 0
}
],
"riskData": {}
}
Response Example:
{
"id": 830236,
"redirectionUrl": "https://www.sandbox.paypal.com/checkoutnow?token=77D22413X7638172U",
"payPalOrderId": "77D22413X7638172U"
}
Step 2: Capture the Payment Authorization
Endpoint: PUT /moneyins/{transactionid}/validate
see: Validate Payment
Path Parameters:
transactionid
(required) – Transaction ID captured
Body Parameters:
totalAmount
(required) – Amount to capturecommissionAmount
(optional)comment
(optional, but recommend for record keeping)reference
(optional, but recommend for record keeping)
Payload Example:
{
"totalAmount": 1000,
"commissionAmount": 0,
"comment": "your comment",
"reference": "your reference"
}
Updated 1 day ago