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
73 23 32

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