Update financial status in shopify

Update order with an authorization transaction.

curl –location –request PUT ‘https://2e997fc7333f89646ddf76a558f86aae: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@test-graph-tech-trade.myshopify.com/admin/api/2022-07/orders/4487046627525.json’ \
–header ‘Accept: application/json’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘ {“order”:{“transactions”: [
            {
                “amount”: “16.45”,
                “kind”: “authorization”,
                “status”: “success”
            }
        ]}}’

Get list of transaction for that order for getting transaction details (We need transaction ID)

curl –location –request GET ‘https://2e997fc7333f89646ddf76a558f86aae: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@test-graph-tech-trade.myshopify.com/admin/api/2022-07/orders/4487046627525/transactions.json’

Create a new transaction and in body field just use transaction ID as parent ID (We referring transaction ID as Parent ID)

curl –location –request POST ‘https://2e997fc7333f89646ddf76a558f86aae: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@test-graph-tech-trade.myshopify.com/admin/api/2022-07/orders/4487046627525/transactions.json’ \
–header ‘Accept: application/json’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{“transaction”:{“currency”:”USD”,”amount”:”16.45″,”kind”:”capture”,”parent_id”:5583007482053}}’

If the new transaction is created then the financial status will change to “Paid”.

Leave a comment

Your email address will not be published. Required fields are marked *