Skip to content

Cancellation and Refund API

Updated: Dec 4, 2025

Use the cancellation and refund API to initiate cancellations or refunds on a given order.

Cancel Order

You can only cancel an order or items (unshipped) fully or partially.

Orders can be canceled after they are moved out of the FB_PROCESSING state, with an exception of orders in the FB_PROCESSING state for more than 24 hours. An order can be in the FB_PROCESSING state for that long due to: 1) the inability to complete the buyer risk check or 2) a sanction on the buyer's account.

curl -X POST \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/cancellations

Request

AttributeDescription
cancel_reason Type: cancel_reasonOptional Why the seller is canceling the order; for example, out of stock.
restock_items Type: booleanOptional By default, the value is false. A seller can set this value to true to be added back to the inventory.
items Type: array of itemsOptional Array of items being canceled.
idempotency_key Type: stringRequired Unique key per request.

cancel_reason object

AttributeDescription
reason_code Type: reason_codeOptional Reason for the cancellation.
reason_description Type: stringOptional Reason for the cancellation, this message may be presented to the user.

items

AttributeDescription
retailer_id Type: stringRequired if item_id is not provided. ID representing the product in the seller's catalog. You must provide retailer_id or item_id, but not both. If item_id is provided, retailer_id must not be provided.
item_id Type: stringRequired if retailer_id is not provided. A Meta-generated ID representing the line item on the order. This value is readable as the id field of the item response. You must provide retailer_id or item_id, but not both. If retailer_id is provided, item_id must not be provided.
quantity Type: numberRequired Number of items canceled.

reason_code enum

ValueDescription
CUSTOMER_REQUESTEDCancellation requested by the buyer.
OUT_OF_STOCKProduct is out of stock at fulfillment.
INVALID_ADDRESSUnable to ship to address provided by the buyer.
SUSPICIOUS_ORDEROrder is suspicious/possible fraud.
CANCEL_REASON_OTHEROther cancellation reason.

Sample Request (Full Order)

{  
  "cancel_reason": {  
    "reason_code": "CUSTOMER_REQUESTED",  
    "reason_description": "Buyer did not need it anymore"  
  },  
  "restock_items": true,  
  "idempotency_key": "cb090e84-e75a-9a34-45d3-5153bec88b65"  
  
}

Sample Request (Partial Order)

{  
  "cancel_reason": {  
    "reason_code": "OUT_OF_STOCK",  
    "reason_description": "Ran out of item"  
  },  
  "restock_items": false,  
  "items": [  
    {  
      "retailer_id": "FB_product_1234",  
      "quantity": 1  
    }  
  ],  
  "idempotency_key": "cb090e84-e75a-9a34-45d3-5153bec88b65"  
}

Sample Response

If successful:

{
  "success": true
}

Otherwise, a relevant error message is returned.

Refund Order

You can only refund an order or items (shipped), fully or partially (by quantity or price).

curl -X POST \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/refunds

Request

AttributeDescription
items Type: array of refund_itemOptional For partial refund, specify the item-level breakdown. Not required for a full refund.
reason_code Type: refund_reason_codeRequired Reason for the refund.
reason_text Type: stringOptional Reason for the refund. This message is presented to the user.
idempotency_key Type: stringRequired Unique key per request.
shipping Type: shipping_refund objectOptional Amount to be refunded for shipping.
deductions Type: array of deductions objectOptional Amount to be deducted off of the refund. Commonly used for a return label fee for order returns.
return_id Type: stringOptional ID representing the return to which the refund is associated. See Returns API

deductions object

AttributeDescription
deduction_type Type: stringRequired Currently RETURN_SHIPPING is the only allowed type.
deduction_amount Type: currency_amountRequired Amount to be deducted for shipping. See currency_amount.

shipping_refund object

AttributeDescription
shipping_refund Type: currency_amountRequired Amount to be refunded for shipping. See currency_amount.

refund_item object

AttributeDescription
retailer_id Type: stringRequired if item_id is not provided. ID representing the product in the seller's catalog. You must provide retailer_id or item_id, but not both. If item_id is provided, retailer_id must not be provided.
item_id Type: stringRequired if retailer_id is not provided. A Meta-generated ID representing the line item on the order. This value is readable as the id field of the item response. You must provide retailer_id or item_id, but not both. If retailer_id is provided, item_id must not be provided.
item_refund_amount Type: currency_amountRequired if item_refund_quantity is not provided. Amount to refund, before any tax. Can be any value up to the full value of the item. See currency_amount.
item_refund_quantity Type: numberRequired if item_refund_amount is not provided. Number of items to be refunded fully.

currency_amount object

AttributeDescription
amount Type: stringRequired Amount in decimal format. Example: 5.5
currency Type: stringRequired Three digit ISO-4217-3 code for the purchase. Format the currency as a number, followed by the 3-digit ISO currency code (ISO 4217 standards)⁠, with a space between cost and currency. Example: 30 USD

refund_reason_code enum

ValueDescription
BUYERS_REMORSERefunded by buyers remorse.
DAMAGED_GOODSRefunded as goods were delivered damaged.
NOT_AS_DESCRIBEDProduct not as described.
QUALITY_ISSUEProduct had quality issues.
REFUND_REASON_OTHEROther refund reason.
WRONG_ITEMWrong product delivered.
FACEBOOK_INITIATEDRefund issued by the Facebook support team, usually in response of a dispute with the buyer.

Sample Request (Full Order)

{  
    "reason_code": "WRONG_ITEM",  
    "idempotency_key": "cb090e84-e75a-9a34-45d3-5153bec88b65"  
}

Sample Request (Partial Order)

{  
  "items": [  
    {  
      "retailer_id": "1234",  
      "item_refund_quantity": 1  
    },  
    {  
      "retailer_id": "38383838",  
      "item_refund_amount": {  
        "amount": "2.5",  
        "currency": "USD"  
      }  
    }  
  ],  
  "shipping": {  
    "shipping_refund": {  
      "amount": "2.4",  
      "currency": "USD"  
    }  
  },  
  "deductions": [  
    {  
      "deduction_type": "RETURN_SHIPPING",  
      "deduction_amount": {  
        "amount": "5.5",  
        "currency": "USD"  
      }  
    }  
  ],  
  "reason_code": "WRONG_ITEM",  
  "idempotency_key": "cb090e84-e75a-9a34-45d3-5153bec88b65"  
}

Response

If successful:

{  
  "success": true  
}

Otherwise, a relevant error message is returned.

If you received an error that this order couldn't be refunded until the customer's payment method had been charged, validate if the payment was captured.

List Cancellations

curl -X GET -G \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/cancellations

Response

If successful:

{  
  "data": [  
    {  
      "id": "412737486183265",  
      "items": {  
        "data": [  
          {  
            "id": "32121321312",  
            "product_id": "2082596341811586",  
            "retailer_id": "FB_product_1234",  
            "quantity": 1  
          }  
        ]  
      },  
      "cancel_reason": {  
        "reason_code": "CUSTOMER_REQUESTED",  
        "reason_description": "Buyer did not need it anymore"  
      }  
    }  
  ]  
}

List Refunds

curl -X GET -G \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/refunds

Response

Attribute and Type
data Type: array of refund_item_object

refund_item_object

AttributeDescriptionDefault Display
id Type: stringRefund unique ID.Yes
items Type: itemsArray of refunded items.Yes
refund_amount Type: refund_amountTotal refund amount. See refund_subtotal object.Yes
refund_reason Type: numberReason for the refund. See refund_reason_code enum.Yes

items object

Attribute and Type
data Type: array of item

item object

AttributeDescription
id Type: stringUnique ID for order item.
product_id Type: stringUnique product ID.
retailer_id Type: stringUnique product ID set by seller.
refund_subtotal Type: objectSubtotal of refund.
quantity Type: numberOptional Item refund quantity, only present when refunding an order with item_refund_quantity.

refund_subtotal object

AttributeDescriptionDefault Display
amount Type: stringAmount in decimal format. Example: 1.64Yes
currency Type: stringThree digit ISO-4217-3 code for the purchase. Format the currency as a number, followed by the 3-digit ISO currency code (ISO 4217 standards)⁠, with a space between cost and currency. Example: 30 USDYes

refund_amount object

AttributeDescriptionDefault Display
amount Type: stringAmount in decimal format. Example: 1.64Yes
currency Type: stringThree digit ISO-4217-3 code for the purchase. Format the currency as a number, followed by the 3-digit ISO currency code (ISO 4217 standards)⁠, with a space between cost and currency. Example: 30 USDYes
tax Type: stringAmount in decimal format with negative sign. Example: -0.14No
shipping Type: stringAmount in decimal format with negative sign. Example: -0.14No
subtotal Type: stringAmount in decimal format. Example: 0.50No
total Type: stringAmount in decimal format. Example: 1.64No

Sample Request with All Fields

curl GET \
  -d 'fields=id,items{product_id,retailer_id,refund_subtotal,quantity},refund_reason,refund_amount{subtotal,tax,total,amount,currency}' \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/refunds

Sample Response

If successful:

{  
  "data": [  
    {  
      "id": "498980194169539",  
      "items": {  
        "data": [  
          {  
            "id": "486602442073981",  
            "product_id": "2452389501475182",  
            "retailer_id": "FB_shirt_1234",  
             "refund_subtotal": {  
                "amount": "1.00",  
                "currency": "USD"  
              },  
              "quantity": 1  
          }  
        ]  
      },  
      "refund_reason": {  
        "reason_code": "BUYERS_REMORSE"  
      },  
      "refund_amount": {  
        "subtotal": "1.00",  
        "shipping": "10.00",  
        "tax": "-1.02",  
        "total": "12.02",  
        "amount": "12.02",  
        "currency": "USD"  
      },  
    }  
  ],  
  "paging": {  
    "cursors": {  
      "before": "QVFIUkdCNjRRQ2tpZAloxbFlZAMnZABN3pYcnB5TzZALYlAzTVo2eF8wM3BraFRRRWNLZAnJwczAtanA0VUE4WnB4dVZAQYUE3OTRZASTBMZAjBWYWxOZAGJJdm9vODRn",  
      "after": "QVFIUkdCNjRRQ2tpZAloxbFlZAMnZABN3pYcnB5TzZALYlAzTVo2eF8wM3BraFRRRWNLZAnJwczAtanA0VUE4WnB4dVZAQYUE3OTRZASTBMZAjBWYWxOZAGJJdm9vODRn"  
    }  
  }  
}

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About