Shopify Order Cancellation (Customer portal)
Step 1: Orders get created using webhook from endpoint webhook/orders.
Step 2: Fulfillment will be sent to Shopify once orders fulfilled in Eshopbox
Shopify fulfillment API:
https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/fulfillments.json
Sample Request body:
{
"fulfillment": {
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": "6481802264876",
"fulfillment_order_line_items": [
{
"id": "14463286444332",
"quantity": "1"
}
]
}
],
"tracking_info": {
"tracking_url": ""
},
"notify_customer": false
}
}
Sample Response body:
{
"fulfillment": {
"created_at": "2023-10-26T18:58:15+05:30",
"origin_address": null,
"tracking_company": null,
"line_items": [
{
"variant_title": null,
"total_discount": 0.00,
"fulfillment_status": "fulfilled",
"gift_card": false,
"requires_shipping": true,
"total_discount_set": {
"shop_money": {
"amount": 0.00,
"currency_code": "INR"
},
"presentment_money": {
"amount": 0.00,
"currency_code": "INR"
}
},
"title": "Computer",
"product_exists": true,
"variant_id": 45255590281516.0,
"tax_lines": [
{
"channel_liable": false,
"rate": 0.09,
"price": 180.00,
"title": "CGST",
"price_set": {
"shop_money": {
"amount": 180.00,
"currency_code": "INR"
},
"presentment_money": {
"amount": 180.00,
"currency_code": "INR"
}
}
},
{
"channel_liable": false,
"rate": 0.09,
"price": 180.00,
"title": "SGST",
"price_set": {
"shop_money": {
"amount": 180.00,
"currency_code": "INR"
},
"presentment_money": {
"amount": 180.00,
"currency_code": "INR"
}
}
}
],
"vendor": "shefali-coditas-staging",
"price": 2000.00,
"product_id": 8345274581292.0,
"id": 14326429024556.0,
"sku": "6113",
"grams": 0.0,
"quantity": 1.0,
"fulfillable_quantity": 0.0,
"fulfillment_service": "manual",
"taxable": true,
"variant_inventory_management": "shopify",
"discount_allocations": [],
"admin_graphql_api_id": "gid://shopify/LineItem/14326429024556",
"name": "Computer",
"price_set": {
"shop_money": {
"amount": 2000.00,
"currency_code": "INR"
},
"presentment_money": {
"amount": 2000.00,
"currency_code": "INR"
}
},
"properties": [],
"duties": []
}
],
"tracking_urls": [],
"location_id": 87087677740.0,
"updated_at": "2023-10-26T18:58:15+05:30",
"service": "manual",
"admin_graphql_api_id": "gid://shopify/Fulfillment/4899674718508",
"name": "#1211.1",
"tracking_number": null,
"receipt": {},
"id": 4899674718508.0,
"tracking_numbers": [],
"order_id": 5576623980844.0,
"tracking_url": null,
"status": "success",
"shipment_status": null
}
}
Step 3: Order cancelled in Eshopbox using customer portal
Step 4: Event recieved for eventSubType = cancelled then, cancel fullfillment on Shopify
Event recieved:
{
"actor": "shrikrishna.huilgol@coditas.com",
"account_slug": "ruturaj",
"response_data": {
"customerContactNumber": 919753399279,
"orderExternalCreatedAt": "2023-10-27 11:43:51",
"warehouseAddress": {
"addressLine1": "pune",
"addressLine2": "pune",
"state": "JHARKHAND",
"gstin": "27ABCFM8335M1ZT",
"city": "ranchi",
"postalCode": 834002
},
"vendorOrderNumber": "#1212",
"warehousePincode": 834002,
"riskScoreReasons": null,
"packageID": null,
"cp_id": 4,
"subTotal": 4360,
"customerOrderNumber": 5578021339436,
"isCOD": 0,
"isSpecialplace": 0,
"chargeableWeight": 873.6,
"isMetro": 0,
"channelSlug": "ruturaj88",
"thirdPartyShipping": false,
"id": 112029580.0,
"barcode": null,
"channelLabel": "Auperator Shopify",
"status_log_count": {
"cancelled": 1,
"created": 1
},
"weight": 20,
"external_wms_channel_id": 2644,
"customerName": "Anushi Dhaketa",
"labels": null,
"connectionId": 3944,
"status_log": {
"cancelled": "2023-10-27 11:47:40",
"created": "2023-10-27 11:44:06"
},
"region": "National",
"taxAmount": 0,
"externalWmsChannelName": "AUPERATOR_SHOPIFY_RUTURAJ_KARAD_2644",
"orderDate": "2023-10-27 11:43:21",
"order_id": 442114590.0,
"channel_id": 6316,
"items": [
{
"lineItemOrderStatus": null,
"productAdditionalInfo": {
"productDetails": {
"unitPrice": 1000,
"hsnCode": 6113,
"dimensionHeight": 14,
"dimensionLength": 12,
"dimensionUnit": "cm",
"weight": 10,
"mrp": 2000,
"dimensionWidth": 13,
"type": "BASE",
"imageUrl": "https://cdn.filestackcontent.com/ejifdC0UQbyFwnkQgMCg",
"accountSlug": "ruturaj",
"sku": "6113",
"esin": "137HU3FOD5Z",
"additionalNames": {
"others": ["6113"]
},
"status": "ACTIVE",
"weightUnit": "g"
}
},
"cashOnDeliveryCharges": 0,
"customerOrderItemID": null,
"orderItemID": "5578021339436-30326656",
"recallBlockedInventoryUsed": null,
"discount": 0,
"lineItemTotal": 2180,
"isVirtualKit": 0,
"productName": "Computer",
"itemID": "47305907700012",
"orderItemCreatedAt": "2023-10-27 11:43:49",
"isGift": 0,
"sku": "137HU3FOD5Z",
"inventoryItemCode": null,
"productImageUrl": "https://cdn.filestackcontent.com/ejifdC0UQbyFwnkQgMCg",
"quantity": 1,
"giftMessage": null,
"shippingCharges": 0,
"cancellationReason": "Delivery is delayed",
"giftLabelContent": null,
"cancellationAdditionalReason": null,
"customerPrice": 2180,
"invoiceTotal": 2180,
"order_item_id": 30326656.0,
"taxRate": 0,
"component": [],
"lineItemSequenceNumber": 14329465995564.0,
"onhold": 0,
"orderItemIDs": ["5578021339436-30326656"],
"asin": null,
"taxAmount": 0
}
],
"trackingID": null,
"status": "cancelled",
"dimension_height": 24,
"boxAdditionalRecommendation": [],
"trackingDomain": null,
"barcodeType": "item",
"shippingInfo": [],
"notifyCustomer": true,
"externalShipmentID": "5578021339436-6316-8380",
"expectedShipDate": "2023-10-29 11:43:21",
"created_at": "2023-10-27 11:44:06",
"channel_account_id": 0,
"paymentType": "manual",
"courierName": "Delhivery",
"integrationType": 7,
"updated_at": "2023-10-27 11:44:07",
"track_payload": [],
"locationId": 87087677740.0,
"invoiceNumber": null,
"isGift": 0,
"portal_id": 37,
"status_log_id": 254636231.0,
"email": "nomailprovided@gmail.com",
"status_updated_at": "2023-10-27 11:47:40",
"facilityType": "auperator",
"externalChannelID": "CH6316",
"dimension_width": 13,
"facilityLabel": "Karad(Karad)",
"dimension_length": 14,
"defaultWarehouseCode": "Ruturaj_Karad",
"boxType": "UNKNOWN",
"orderTotal": 4360,
"label_url": null,
"account_id": 1499,
"status_log_first_occurrence": {
"cancelled": "2023-10-27 11:47:40",
"created": "2023-10-27 11:44:06"
},
"shippingAddress": {
"city": "Bengaluru",
"countryCode": "IN",
"postalCode": 560098,
"addressLine1": "10, Bank colony",
"addressLine2": null,
"state": "Karnataka",
"countryName": "INDIA",
"contactPhone": 9753399279,
"customerName": "Anushi Dhaketa",
"email": "nomailprovided@gmail.com"
},
"isPriorityShipment": 0,
"billingAddress": {
"contactPhone": 919753399279,
"customerName": "Anushi Dhaketa",
"email": "nomailprovided@gmail.com"
},
"externalWarehouseID": "Ruturaj_Karad",
"invoice_url": null,
"remarks": "customer_cancel",
"warehouse_id": 893
},
"eventSubType": "cancelled",
"resource": "shipment",
"previous_data": [],
"custom": [],
"resource_type": "shipment.update",
"accountSlug": "ruturaj",
"eventType": "PUT",
"request_data": [],
"version": "v1"
}
Shopify cancel fulfillment API:
https://shefali-coditas-staging.myshopify.com/admin/api/2023-07/fulfillments/4901256692012/cancel.json
Step 5: In the above recieved event check if “source” key is present and its not equal “worskpace”
If true then:
Check if (“isCod” = 1)
if true then go to Step 8
else
go to Step 6
Step 6: Calculate the refund based on line items and quantity recieved from the event:
Shopify calculate refund API:
https://shefali-coditas-staging.myshopify.com/admin/api/2023-07/orders/5578068853036/refunds/calculate.json
Sample request body:
{
"refund": {
"shipping": {
"full_refund": true
},
"refund_line_items": [
{
"line_item_id": 14329534611756,
"quantity": 1,
"restock_type": "no_restock"
}
]
}
}
Response from Shopify:
{
"refund": {
"shipping": {
"amount": "0.00",
"maximum_refundable": "0.00",
"tax": "0.00"
},
"refund_line_items": [
{
"quantity": 1,
"line_item_id": 14329534611756,
"price": "2000.00",
"subtotal": "2000.00",
"total_tax": "360.00",
"discounted_total_price": "4000.00",
"total_cart_discount_amount": "0.00",
"restock_type": "no_restock",
"discounted_price": "2000.00"
}
],
"currency": "INR",
"total_duties_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "INR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "INR"
}
},
"transactions": [
{
"amount": "2360.00",
"maximum_refundable": "4720.00",
"kind": "suggested_refund",
"parent_id": 6743657087276,
"currency": "INR",
"order_id": 5578068853036,
"gateway": "manual"
}
],
"duties": []
},
"statusCode": 200
}
Step 7: Store the “trasactions” recieved in response in database :
To dot this:
Push the data to taskqueue including (name - "refund_update_transaction_details") Config(Concur- 1 or 2)
Data to be pushed: Shipment cancelled event recieved + Transactions recieved from Shopify
Sample data to be pushed:
{
"actor": "shrikrishna.huilgol@coditas.com",
"account_slug": "ruturaj",
"response_data": {
"customerContactNumber": 919753399279,
"orderExternalCreatedAt": "2023-10-27 11:43:51",
"warehouseAddress": {
"addressLine1": "pune",
"addressLine2": "pune",
"state": "JHARKHAND",
"gstin": "27ABCFM8335M1ZT",
"city": "ranchi",
"postalCode": 834002
},
"vendorOrderNumber": "#1212",
"warehousePincode": 834002,
"riskScoreReasons": null,
"packageID": null,
"cp_id": 4,
"subTotal": 4360,
"customerOrderNumber": 5578021339436,
"isCOD": 0,
"isSpecialplace": 0,
"chargeableWeight": 873.6,
"isMetro": 0,
"channelSlug": "ruturaj88",
"thirdPartyShipping": false,
"id": 112029580,
"barcode": null,
"channelLabel": "Auperator Shopify",
"status_log_count": {
"cancelled": 1,
"created": 1
},
"weight": 20,
"external_wms_channel_id": 2644,
"customerName": "Anushi Dhaketa",
"labels": null,
"connectionId": 3944,
"status_log": {
"cancelled": "2023-10-27 11:47:40",
"created": "2023-10-27 11:44:06"
},
"region": "National",
"taxAmount": 0,
"externalWmsChannelName": "AUPERATOR_SHOPIFY_RUTURAJ_KARAD_2644",
"orderDate": "2023-10-27 11:43:21",
"order_id": 442114590,
"channel_id": 6316,
"items": [
{
"lineItemOrderStatus": null,
"productAdditionalInfo": {
"productDetails": {
"unitPrice": 1000,
"hsnCode": 6113,
"dimensionHeight": 14,
"dimensionLength": 12,
"dimensionUnit": "cm",
"weight": 10,
"mrp": 2000,
"dimensionWidth": 13,
"type": "BASE",
"imageUrl": "https://cdn.filestackcontent.com/ejifdC0UQbyFwnkQgMCg",
"accountSlug": "ruturaj",
"sku": "6113",
"esin": "137HU3FOD5Z",
"additionalNames": {
"others": [
"6113"
]
},
"status": "ACTIVE",
"weightUnit": "g"
}
},
"cashOnDeliveryCharges": 0,
"customerOrderItemID": null,
"orderItemID": "5578021339436-30326656",
"recallBlockedInventoryUsed": null,
"discount": 0,
"lineItemTotal": 2180,
"isVirtualKit": 0,
"productName": "Computer",
"itemID": "47305907700012",
"orderItemCreatedAt": "2023-10-27 11:43:49",
"isGift": 0,
"sku": "137HU3FOD5Z",
"inventoryItemCode": null,
"productImageUrl": "https://cdn.filestackcontent.com/ejifdC0UQbyFwnkQgMCg",
"quantity": 1,
"giftMessage": null,
"shippingCharges": 0,
"cancellationReason": "Delivery is delayed",
"giftLabelContent": null,
"cancellationAdditionalReason": null,
"customerPrice": 2180,
"invoiceTotal": 2180,
"order_item_id": 30326656,
"taxRate": 0,
"component": [],
"lineItemSequenceNumber": 14329465995564,
"onhold": 0,
"orderItemIDs": [
"5578021339436-30326656"
],
"asin": null,
"taxAmount": 0
}
],
"trackingID": null,
"status": "cancelled",
"dimension_height": 24,
"boxAdditionalRecommendation": [],
"trackingDomain": null,
"barcodeType": "item",
"shippingInfo": [],
"notifyCustomer": true,
"externalShipmentID": "5578021339436-6316-8380",
"expectedShipDate": "2023-10-29 11:43:21",
"created_at": "2023-10-27 11:44:06",
"channel_account_id": 0,
"paymentType": "manual",
"courierName": "Delhivery",
"integrationType": 7,
"updated_at": "2023-10-27 11:44:07",
"track_payload": [],
"locationId": 87087677740,
"invoiceNumber": null,
"isGift": 0,
"portal_id": 37,
"status_log_id": 254636231,
"email": "nomailprovided@gmail.com",
"status_updated_at": "2023-10-27 11:47:40",
"facilityType": "auperator",
"externalChannelID": "CH6316",
"dimension_width": 13,
"facilityLabel": "Karad(Karad)",
"dimension_length": 14,
"defaultWarehouseCode": "Ruturaj_Karad",
"boxType": "UNKNOWN",
"orderTotal": 4360,
"label_url": null,
"account_id": 1499,
"status_log_first_occurrence": {
"cancelled": "2023-10-27 11:47:40",
"created": "2023-10-27 11:44:06"
},
"shippingAddress": {
"city": "Bengaluru",
"countryCode": "IN",
"postalCode": 560098,
"addressLine1": "10, Bank colony",
"addressLine2": null,
"state": "Karnataka",
"countryName": "INDIA",
"contactPhone": 9753399279,
"customerName": "Anushi Dhaketa",
"email": "nomailprovided@gmail.com"
},
"isPriorityShipment": 0,
"billingAddress": {
"contactPhone": 919753399279,
"customerName": "Anushi Dhaketa",
"email": "nomailprovided@gmail.com"
},
"externalWarehouseID": "Ruturaj_Karad",
"invoice_url": null,
"remarks": "customer_cancel",
"warehouse_id": 893
},
"eventSubType": "cancelled",
"resource": "shipment",
"previous_data": [],
"custom": [],
"resource_type": "shipment.update",
"accountSlug": "ruturaj",
"eventType": "PUT",
"request_data": [],
"version": "v1",
"transaction_details": [
{
"amount": "2360.00",
"maximum_refundable": "4720.00",
"kind": "suggested_refund",
"parent_id": 6743657087276,
"currency": "INR",
"order_id": 5578068853036,
"gateway": "manual"
}
]
}
In the taskqueue listener check if refund is created against order_item id.
If created:
then update the transaction_details in “refunds” table
else:
Push to poe taskqueue/pubsub to create refund with “transaction_details”
Step 8: Remove item/ Cancel order:
Check the items in order by Calling Shopify get order API
if total items count in order > 0:
then remove the particular item / decrease quantity using 3 step process:
1. Begin edit:
curl --location 'https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/graphql.json' \
--header 'X-Shopify-Access-Token: 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' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWt3TVdSbFpUY3dOUzB5TWpCaExUUmlZVGd0T0RobFlTMDFaVE14WmpSak1UZGhNVE1HT2daRlJnPT0iLCJleHAiOiIyMDI1LTEwLTExVDA5OjIyOjIzLjU5NloiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--2047b65ff2212d375cc16edbc47fc60fea5288db; _secure_admin_session_id=a670e7645b0e174a7efe243458ddfedd; _secure_admin_session_id_csrf=a670e7645b0e174a7efe243458ddfedd; _landing_page=%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa; _orig_referrer=https%3A%2F%2Fshefali-coditas-staging.myshopify.com%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa%2Fauthenticate%3Fkey%5Cu003d9211021237137bc3263c4d3929e65136; _shopify_y=65b0dd08-2247-4604-8f69-57be32c1c25f; _y=65b0dd08-2247-4604-8f69-57be32c1c25f' \
--data '{
"query": "mutation orderEditBegin($id: ID!) { orderEditBegin(id: $id) { calculatedOrder { id lineItems(first:10) { edges { node { id } } } } userErrors { field message } }}",
"variables": {
"id": "gid://shopify/Order/5578118299948"
}
}'
2. Edit items:
curl --location 'https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/graphql.json' \
--header 'X-Shopify-Access-Token: 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' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWt3TVdSbFpUY3dOUzB5TWpCaExUUmlZVGd0T0RobFlTMDFaVE14WmpSak1UZGhNVE1HT2daRlJnPT0iLCJleHAiOiIyMDI1LTEwLTExVDA5OjIyOjIzLjU5NloiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--2047b65ff2212d375cc16edbc47fc60fea5288db; _secure_admin_session_id=a670e7645b0e174a7efe243458ddfedd; _secure_admin_session_id_csrf=a670e7645b0e174a7efe243458ddfedd; _landing_page=%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa; _orig_referrer=https%3A%2F%2Fshefali-coditas-staging.myshopify.com%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa%2Fauthenticate%3Fkey%5Cu003d9211021237137bc3263c4d3929e65136; _shopify_y=65b0dd08-2247-4604-8f69-57be32c1c25f; _y=65b0dd08-2247-4604-8f69-57be32c1c25f' \
--data '{
"query": "mutation increaseLineItemQuantity { orderEditSetQuantity(id: \"gid://shopify/CalculatedOrder/63805194540\", lineItemId: \"gid://shopify/CalculatedLineItem/14329604112684\", quantity: 0) { calculatedOrder { id addedLineItems(first: 5) { edges { node { id quantity } } } } userErrors { field message } }}"
}'
3. Commit:
curl --location 'https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/graphql.json' \
--header 'X-Shopify-Access-Token: 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' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWt3TVdSbFpUY3dOUzB5TWpCaExUUmlZVGd0T0RobFlTMDFaVE14WmpSak1UZGhNVE1HT2daRlJnPT0iLCJleHAiOiIyMDI1LTEwLTExVDA5OjIyOjIzLjU5NloiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--2047b65ff2212d375cc16edbc47fc60fea5288db; _secure_admin_session_id=a670e7645b0e174a7efe243458ddfedd; _secure_admin_session_id_csrf=a670e7645b0e174a7efe243458ddfedd; _landing_page=%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa; _orig_referrer=https%3A%2F%2Fshefali-coditas-staging.myshopify.com%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa%2Fauthenticate%3Fkey%5Cu003d9211021237137bc3263c4d3929e65136; _shopify_y=65b0dd08-2247-4604-8f69-57be32c1c25f; _y=65b0dd08-2247-4604-8f69-57be32c1c25f' \
--data '{
"query": "mutation increaseLineItemQuantity { orderEditSetQuantity(id: \"gid://shopify/CalculatedOrder/63805194540\", lineItemId: \"gid://shopify/CalculatedLineItem/14329604112684\", quantity: 0) { calculatedOrder { id addedLineItems(first: 5) { edges { node { id quantity } } } } userErrors { field message } }}"
}'
if total items count in order = 0:
Call cancel order API of Shopify:
curl --location --request POST 'https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/orders/5561831588140/cancel.json' \
--header 'X-Shopify-Access-Token: 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' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWt3TVdSbFpUY3dOUzB5TWpCaExUUmlZVGd0T0RobFlTMDFaVE14WmpSak1UZGhNVE1HT2daRlJnPT0iLCJleHAiOiIyMDI1LTEwLTExVDA5OjIyOjIzLjU5NloiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--2047b65ff2212d375cc16edbc47fc60fea5288db; _secure_admin_session_id=a670e7645b0e174a7efe243458ddfedd; _secure_admin_session_id_csrf=a670e7645b0e174a7efe243458ddfedd; _landing_page=%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa; _orig_referrer=https%3A%2F%2Fshefali-coditas-staging.myshopify.com%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa%2Fauthenticate%3Fkey%5Cu003d9211021237137bc3263c4d3929e65136; _shopify_y=65b0dd08-2247-4604-8f69-57be32c1c25f; _y=65b0dd08-2247-4604-8f69-57be32c1c25f'
Step 9: Issue refund for prepaid orders for connections which has automation step is on:
Refund cron runs every 15 min:
While issuing refund use the trasactions stored in database from 7th step and issue refund.
Issue refund sample curl for Shopify:
curl --location 'https://shefali-coditas-staging.myshopify.com/admin/api/2023-10/orders/5578118299948/refunds.json' \
--header 'X-Shopify-Access-Token: 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' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWt3TVdSbFpUY3dOUzB5TWpCaExUUmlZVGd0T0RobFlTMDFaVE14WmpSak1UZGhNVE1HT2daRlJnPT0iLCJleHAiOiIyMDI1LTEwLTExVDA5OjIyOjIzLjU5NloiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--2047b65ff2212d375cc16edbc47fc60fea5288db; _secure_admin_session_id=a670e7645b0e174a7efe243458ddfedd; _secure_admin_session_id_csrf=a670e7645b0e174a7efe243458ddfedd; _landing_page=%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa; _orig_referrer=https%3A%2F%2Fshefali-coditas-staging.myshopify.com%2F76938805548%2Forders%2F0feab8ace304b9a0fd3c68c7fe1fe4aa%2Fauthenticate%3Fkey%5Cu003d9211021237137bc3263c4d3929e65136; _shopify_y=65b0dd08-2247-4604-8f69-57be32c1c25f; _y=65b0dd08-2247-4604-8f69-57be32c1c25f' \
--data '{
"refund": {
"currency": "INR",
"notify": true,
"note": "wrong size",
"shipping": {
"full_refund": true
},
"transactions": [
{
"order_id": 5578118299948,
"kind": "refund",
"gateway": "manual",
"parent_id": 6743706763564,
"amount": "2360.00",
"currency": "INR",
"maximum_refundable": "2360.00"
}
]
}
}'