Solved

Is possible undo a mark as paid a order api post ?

michaelvips
Shopify Partner
21 0 6

I made a mistake.

 

I sent through make.com an API request to mark an order as paid, it worked, however I did it 2 times for the same order. Now in the order I receive this Balance (you must be a customer).

 

michaelvips_0-1688395476780.png

 

Is like the customer pay 2 times

 

michaelvips_1-1688395507477.png

 

 

Accepted Solution (1)

SBD_
Shopify Staff
1829 269 406

This is an accepted solution.

Hey @michaelvips 

 

You should be able to void one of the transactions.

 

curl -d '{"transaction":{"source":"external","kind":"void","parent_id":{PARENT_ID_HERE}, "amount":"{AMOUNT_HERE}"}}' \
-X POST "https://{SHOP_HERE}.myshopify.com/admin/api/2023-04/orders/{ORDER_ID_HERE}/transactions.json" \
-H "X-Shopify-Access-Token: {ACCESS_TOKEN_HERE}" \
-H "Content-Type: application/json"

 

Scott | Developer Advocate @ Shopify 

View solution in original post

Reply 1 (1)

SBD_
Shopify Staff
1829 269 406

This is an accepted solution.

Hey @michaelvips 

 

You should be able to void one of the transactions.

 

curl -d '{"transaction":{"source":"external","kind":"void","parent_id":{PARENT_ID_HERE}, "amount":"{AMOUNT_HERE}"}}' \
-X POST "https://{SHOP_HERE}.myshopify.com/admin/api/2023-04/orders/{ORDER_ID_HERE}/transactions.json" \
-H "X-Shopify-Access-Token: {ACCESS_TOKEN_HERE}" \
-H "Content-Type: application/json"

 

Scott | Developer Advocate @ Shopify