Mark an order as paid thru REST API

Highlighted
Tourist
12 0 2

Hi,

 

I would like to mark an order as PAID through REST API - is it possible or it is prohibited by Shopify?

I have found a few topics about this but they seem a bit old and do not work.

 

So what did I try:

  1. mark order as paid -> this does not work you can do this only when order is created
  2. I have found an approach to create and order with some transaction and then close this transaction - this I cannot do the order is created by Shopify checkout process
  3. I did try to create and transaction but the response seems like some Identity request
  4. I have created a private app did custom request with the private app credentials - same as point 3.

any tip what I'm doing wrong? I did invest quite a lot of time into it and do not want to switch to WooComerce.. :( (which seems the only solution for now)

 

Thx,

R.

1 Like
Highlighted
Shopify Partner
199 13 36

Hi Roman,

 

Are you using a custom payment method? Pretty sure you don't need a custom app or a REST call for this. Try the following in SETTINGS > PAYMENT PROVIDERS: 

 

automatic_billing_shopify.PNG

 

Regards,


Sam

Shopify Themes and Custom Apps | hello@achieveapplabs.com
0 Likes
Highlighted
Shopify Partner
199 13 36

Also Roman,

 

Wondering if creating a custom payment method and then setting the financial_status = "paid" would do the trick?

 

-Sam

Shopify Themes and Custom Apps | hello@achieveapplabs.com
0 Likes
Highlighted
Tourist
12 0 2

Hi,

 

we do have the manual payment method because the payment is provided to our bank account - then we use an Integromat to catch a new payment and we would like to mark the given order as paid.

 

So the automated payment method is mentioned for credit card payment or I can use it also for payment to the bank account?

 

Thx,

R

0 Likes
Highlighted
Tourist
12 0 2

Nope, as my point 1. this you can do just for the new order, not for the existing one

0 Likes
Highlighted
Tourist
3 0 1

This is exactly my problem at the moment.

I havent found a way to mark an order with a manual payment method as paid through the api.

0 Likes
Highlighted
Shopify Partner
199 13 36

Has anyone tried to first create the order then POST a transaction?

 

POST /admin/api/2020-01/orders/#{order_id}/transactions.json
{
  "transaction": {
    "kind": "capture",
    "authorization": "authorization-key"
  }
}
Shopify Themes and Custom Apps | hello@achieveapplabs.com
0 Likes
Highlighted
Tourist
12 0 2

Hi,

 

well yes, but I do have 2 issues - where to take authorization-key if I omit it either get invalid request error or link to "login" page as a response.

 

like described here: https://community.shopify.com/c/Shopify-APIs-SDKs/Marking-order-transaction-as-paid-with-REST-Admin-...

 

it seems that go for the shopify was a big mistake :( and due to their intelligent monetizing scenario, they do block this option by purpose - with no alternative how to handle payments to bank account automatically - they live in a world where credit cards are used only I guess (but maybe I'm wrong - or I hope I'm wrong).

 

R.

0 Likes
Highlighted
Tourist
3 0 1

I tried two different payloads for the transaction

{'amount': '123.21',
'currency': 'EUR',
'gateway': u'Vorkasse',
'kind': 'capture',
'parent_id': '123456789',
'status': 'success'}

{'amount': '123.21',
'currency': 'EUR',
'gateway': u'Vorkasse',
'kind': 'sale',
'status': 'success'}

 

Both result in 

Parent transaction specified cannot be marked as paid

I already mailed the support regarding this and will keep you updated

 

0 Likes
Highlighted
Tourist
3 0 1

@achieveapplabs

It seems like your solution works I was only sending to much information.

@Roman81 are you sending the json directly to the shopify API or are you using some API wrapper like https://github.com/Shopify/shopify_python_api ?

1 Like