Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Can render pay-now button to a pending order page?

Can render pay-now button to a pending order page?

RhinoLu
Shopify Partner
5 0 1

I know customer can pay a pending order by a checkout link in the invoice email.

But if customer never receive that invoice email, can I just put a pay-now button on the Order page?

Is there any liquid snippet to render that button?

 

Thank you.

Replies 3 (3)

Weaverse
Shopify Partner
81 26 37

Yes, you can add a pay-now button on the order page for customers who haven't received the invoice email. To render the button, you can use the following Liquid code snippet:

{% if order.financial_status == 'pending' %}
  <a href="/checkout/{{order.token}}" class="btn">Pay Now</a>
{% endif %}
Helping merchants build super unique, high-performance storefronts using Weaverse + Hydrogen.
Looking for Development & Agency partners.
If you find the answer helpful, give it a thumbs up!
Our App: Theme Customizer for Shopify Hydrogen
Join our Weaverse + Hydrogen community: Weaverse Community
RhinoLu
Shopify Partner
5 0 1

https://shopify.dev/docs/api/liquid/objects/order

token does not exist in order.

ammarriaz930
Shopify Partner
1 0 0

Paste this code in the order file to redirect to the checkout page.
{% if order.financial_status == 'pending' %}
<a href="{{ order.order_status_url }}" class="btn">Pay Now</a>
{% endif %}

Ammar Riaz