A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Currently, i have a system where we can create a order via the draft order API, than completes the order (unpaid) in which the customer receives a invoice.
However, one of the biggest issues we're having is that the invoice sent to the customer does not contain a checkout link.
i've been at this for a phew days now and i can't seen to find a way to send the customer a checkout link after a order is created or a draft order is completed.
The only way around this is that when the draft order is created the API respons returns a object of type invoice_url.
I can send the customer the invoice_url directly after the draft order is created, however that is not ideal as we want the customer to receive the checkout link after the order is created (Draft order completed).
Is there any way around this that i'm misssing?
the issue is that if i use the send draft invoice API to send the customer a invoice, than when the draft order is completed the customer will receive another invoice (one without a checkout link) and im also unsure if the customer pays via the draft invoice, will the actual order be marked as paid/completed?
Kwang,
Have you customized the draft order invoice? It should contain the following liquid for the checkout url:
{{ checkout_payment_collection_url }}
This is assuming you are using the draft_orders/order_id/send_invoice.json enpoint for draft orders.
What invoice is sent when the draft order is completed? This is the receipt of the order, which indicates the order in Shopify is paid/completed.
im using the
Using the endpoint you shared above does not send an invoice. Please try using the send_invoice.json endpoint and share your results.
i tried that.
But once the draft order is published, it returns the error "Can't send payment link since order is already paid".
But when i completed the draft order, the payment_status is set to pending.
so i tried this.
I sent the checkout link as soon as the draft order is created before completing it.
Than i get this error.
What is the status you are using when creating a new draft order? The status should be set to 'open'