i am trying out the feature of sending order confirmation emails to customers after they place a purchase and when they have chosen manual payment, i believe the has_pending_payment value should be pending or true, but when i displayed it in an email it was false
it didnt make sense because i had set payment capture to manual, hence has_pending_payment should not be false until i marked the payment and paid right
and it is clearly unpaid yet as i can see in the order section, it still says payment pending

is anyone able to send order confirmation emails based on payment status?
Having the same question here. There is another thread from 2023 about the same topic but the replies are trash.
This is the documentation of the âhas_pending_paymentâ variable, which is specifically used for email notifications: Payment status properties
That also links to the page about Pending payments from additional providers.
At the bottom, there is the info that âIf an additional payment provider is using an older platform, then you arenât prevented from modifying orders that have the Payment pending status.â, so I am assuming that Shopify internally distinguishes between two different types of âpayment pendingâ and only the one where the payment gateway explicitly blocks the order (also in Shopify Admin) also sets the variable âhas_pending_paymentâ to true.
If the customer selects e.g. bank transfer as the payment method, this is not the case, which makes that notification variable pretty useless.
The other thread also mentions an alternative way by checking the liquid variable order.financial_status == âpendingâ and then overwriting the other one by assign has_pending_payment = true. Maybe this works, but I didnât try it yet.
(Maybe the buyer_action_required variable also has to be set to true so that the email template uses the desired text.)
Thank you for this!
A customer had the bank transfer option option enabled and wanted to send payment details in the order confirmation email.
Per your suggestion, I ended up checking if the financial_status == âpendingâ
At the top of the template:
{% if financial_status == âpendingâ %}
{% assign has_pending_payment = true %}
{% endif %}
The buyer_action_required variable still returned false, so we just put the payment details in the adjacent else block.
{% if buyer_action_required %}
Youâll receive an email confirmation after you complete the payment.
{% else %}
[Insert your payment details here]
Works like a charm.