POST /orders/{order-id}/cancel

Cancel order and create a refundable credit note for the order

Servers

Path parameters

Name Type Required Description
order-id String Yes

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
comment String No

Comment, if any, on the refund.

credit_note Object No

Parameters for credit_note

credit_note.total Integer No

Credit Note amount in cents.

Default value: 0

cancelled_at Integer No

The time at which the order was cancelled.

cancellation_reason String Yes

Cancellation reason. * shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. * alternative_found - Alternative found. * others - Other reason * product_unsatisfactory - Product unsatisfactory. * product_not_required - Product not required. * delivery_date_missed - Delivery date missed. * invoice_voided - The invoice for which the order was createed has been voided. * payment_declined - Payment declined. * product_not_available - Product not available. * subscription_cancelled - The subsctiption for which the order was created has been cancelled. * third_party_cancellation - Third party cancellation. * fraudulent_transaction - Fraudulent transaction. * order_resent - Order resent * invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state.

Possible values:

  • "invoice_voided"
  • "product_unsatisfactory"
  • "invoice_written_off"
  • "delivery_date_missed"
  • "subscription_cancelled"
  • "third_party_cancellation"
  • "others"
  • "product_not_available"
  • "product_not_required"
  • "fraudulent_transaction"
  • "shipping_cut_off_passed"
  • "order_resent"
  • "alternative_found"
  • "payment_declined"
customer_notes String No

The Customer Notes to be filled in the Credit Notes created to capture this refund detail.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.