How can I close 'pending' transaction for order?

KellyHong
New Member
1 0 0

Hi, 

I'd like to know how to disable 'transaction' for 'pending' orders (financial_status == pending).

 

We found that if an order is in the 'financial_status == pending' state, the customer can deposit money even after canceling the order

because the ‘pending’ transaction is still alive.

 

Somebody tell me how to close the ‘pending’ transaction for order, please.

 

 

[Specific Situation]

I have an order, its financial-status is ‘pending’ because customer paid for it using ‘KOMOJU’ in japan store.

 

order’s admin_graphql_api_id : "gid://shopify/Order/3765182627898"

 

It has a transaction like below with ‘pending’ status.

 

// response of “GET https:// … /orders/3765182627898/transactions.json”

{

    "transactions": [

        {

            "id": 4733221437498,

            "order_id": 3765182627898,

            "kind": "sale",

            "gateway": "コンビニ決済_komoju",

            "status": "pending",

            "message": "Pending",

            "created_at": "2021-05-12T09:02:51+09:00",

            "test": false,

            "authorization": "20303566274618-ad636000808c8b61",

            "location_id": null,

            "user_id": null,

            "parent_id": null,

            "processed_at": "2021-05-12T09:02:51+09:00",

            "device_id": null,

            "error_code": null,

            "source_name": "web",

            "receipt": {

                "x_account_id": "6tbtbskevug77hucstgq27kz3",

                "x_amount": "6880",

                "x_currency": "JPY",

                "x_gateway_reference": "20303566274618-ad636000808c8b61",

                "x_reference": "20303566274618",

                "x_result": "pending",

                "x_signature": "dc4af10a9ba533bc1603789eb1b35040e4859d53cfe351cab3afb0dc9f2731bf",

                "x_test": "false",

                "x_timestamp": "2021-05-12T00:02:51Z"

            },

            "amount": "6880",

            "currency": "JPY",

            "admin_graphql_api_id": "gid://shopify/OrderTransaction/4733221437498"

        }

    ]

}

 

 

When I try calculate refund, I got the response like below.

This response didn’t include any transaction because the order has only transaction with ‘pending’ status.

Therefore, the 'pending' transaction still exists after refund and cancellation.

 

// response of “POST https:// … /orders/3765182627898/refunds/calculate.json”

{

    "refund": {

        "shipping": {

            "amount": "1000",

            "tax": "0",

            "maximum_refundable": "1000"

        },

        "duties": [],

        "refund_line_items": [

            {

                "quantity": 1,

                "line_item_id": 9904095461434,

                "location_id": null,

                "restock_type": "no_restock",

                "price": "5880",

                "subtotal": "5880",

                "total_tax": "0",

                "discounted_price": "5880",

                "discounted_total_price": "5880",

                "total_cart_discount_amount": "0"

            }

        ],

        "transactions": [],

        "currency": "JPY"

    }

}

 

In this case, even after canceling this order with the Shopify Admin API, the customer can still send money to the transaction despite the cancellation of the order.

 

This case was occured in February 24, 2021 in my customer’s store. (orderId : 3638101213242)

 

How can I close this 'pending' transaction to avoid customer's mistake sending money for cancelled order.

0 Likes