WooCommerce: Order Payment URL doesn't work

Using Metorik Engage, you can send emails when an order fails, prompting, customers to complete their order with a one-click order payment URL that takes them straight to checkout.

Metorik has an {order_payment_url} variable, which will generate this payment URL automatically. When used, it looks something like this:

https://my-store-name.com/store/checkout/order-pay/3456/?pay_for_order=true&key=sal1a124mxas521m1o

We also show the URL within Metorik itself on individual order pages (on the right hand side), like so:

Now sometimes these links that you send out may not work for your site due to your sites URL Structure.   

So for example your checkout page maybe called something else (e.g  /special-checkout ). Or perhaps you've translated the URLs into your store's language so the default English ones we use don't work.

This may result in the customer not being taken to the correct page to pay for their particular order and thus they may get redirected back to the store or a 404 error page.

We're aware of this issue and planning to add settings for customising the URL used right within Metorik soon.

But what can I do to solve it right now?

It is possible to get around this by building the  Order Payment URL yourself using specific Engage variables.

So using a structure like this should work:

[URL-link-to-the-checkout-page-of-your-site]/order-pay/{order_id}/?pay_for_order=true&key={order_key}

You can build the first part of the link yourself specific to your site. 

[URL-link-to-the-checkout-page-of-your-site]

This would be something like

https://my-store-name.com/store/checkout

Then you can add the second part to the end of it

order-pay/{order_id}/?pay_for_order=true&key={order_key}

In the example screenshot that was used above

The example  {order_id} is: 527 and the example {order_key} is: wc_order_552cf76c49ea1.

These variables are unique to each order.

So if the  checkout page in our example site was called secure-checkout, then the correct link would be

https://recipehero.in/checkout/order-pay/527/?pay_for_order=true&key=wc_order_552cf76c49ea1

Note: the only difference is that the /checkout part changed to /secure-checkout

You can now see how to use your own  Order Payment URL to send to customers

[URL-link-to-the-checkout-page-of-your-site]/order-pay/{order_id}/?pay_for_order=true&key={order_key}

What if it still doesn't work?

If so, it's possible that you also have a custom URL for 'order-pay'. You can also just replace it with the URL you use (eg. pay-for-the-order).

So in our settings here, it's set to pay-now instead of order-pay:

So the above link would be this instead:

[URL-link-to-the-checkout-page-of-your-site]/pay-now/{order_id}/?pay_for_order=true&key={order_key}<br>

If this new link structure that you send still doesn't go to the correct place, please do not hesitate to contact us so we can investigate further and get you fixed up. 

Still need help? Contact Us Contact Us