• Resolved czhao1009

    (@czhao1009)


    Hello there,

    I’m not sure if this is supported but here’s the scenario:
    1. We create a manual order for customer and sets the total to be 50% as deposit.
    2. Customer opens payment link and pays for the deposit.
    3. When order is ready to ship, we change the order status to be “pending payment” again and sets the order total to be the remaining balance.
    4. Customer opens payment link and pays for the remaining balance.

    At step 4, however, I’m getting the following error when submitting payment:
    This PaymentIntent’s payment_method could not be updated because it has a status of succeeded. You may only update the payment_method of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.

    I suspect it’s because the payment has already been completed (at step 2 for the deposit). Is there any way around this so that customer can submit 2 payments on the same order?

    Thanks!
    Chen

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @czhao1009,

    Thanks for contacting us. You are correct, the 50% total that your customer pays results in the payment intent’s status changing to a status of succeeded. Once the intent has that status, only refunds can be applied.

    What you could do is split this process in to 2 orders, where the 2nd order is a copy of the 2nd order with the appropriate remaining price. Since you’re sending the link to your customer anyway I don’t think this will result in much added friction.

    Another option is for you to remove the the _payment_intent metadata data in the postmeta table. That way when the same order is processed a 2nd time, there will be no existing payment intent.

    You could also just authorize the order’s full amount and capture it at the time you would send out the 2nd order.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    @czhao1009,

    Another option for you is to use the plugin’s admin phone order functionality. That feature allows you to process order’s directly from the Admin Order page.

    You might find that more convenient that sending a second link to your customer.

    Admin Phone Order

    Thread Starter czhao1009

    (@czhao1009)

    Thank you @mrclayton !

    Both options you proposed seem like good choices. I’m leaning towards the “one order” method just because I don’t want customers to see 2 times the orders in their history and get confused/concerned ??

    Do you see any obvious drawbacks for removing the _payment_intent metadata after the first payment? I imagine that metadata will be set once again when second payment is completed, which is fine since I no longer need to process another payment on that order.

    Only thing I can think of is probably when it comes to refunding through WP. I will give it a try but I suspect it’s only going to refund one of the two payments… However, I should be able to refund both payments through Stripe, and then just change the order status in WP, correct?

    Thanks again for your help!
    Chen

    Thread Starter czhao1009

    (@czhao1009)

    @mrclayton

    I gave it a quick try by hooking into the woocommerce_payment_complete action and removing the _payment_intent: delete_post_meta( $order_id, '_payment_intent' );

    However the second payment isn’t happening, even though I’m no longer seeing that error and the payment success page shows afterwards ??

    Deposit payment successful:
    Order charge successful in Stripe. Charge: ch_1GWpmhIb1Mnwz4EwfryQRUZq. Payment Method: Visa ending in 4242

    Second payment has the same reference number for the Charge.

    In Stripe, there’s only one charge, the deposit one.

    On another note, I might change my mind about the “two-order” approach. Thinking more about it, it seems to have an easier implementation and more clear to have a 1-1 relationship between order and payment. I guess I might just have to think of some creative way to present the orders in user’s order history page.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @czhao1009,

    When you attempted to process the second payment did you make sure the order’s status was set to pending? Removing the _payment_intent should have done the trick.

    I think the best option is to have 2 orders that way you can track refunds and it makes your accounting cleaner.

    Kind Regards,

    Thread Starter czhao1009

    (@czhao1009)

    I’m going with the 2 orders approach so I don’t have to mess with the inner workings of payment.

    Thanks for the wonderful and helpful responses, as usual @mrclayton

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple payments on the same order’ is closed to new replies.