Skip to main content
POST
/
links
/
{link_id}
/
cancel
Cancel Payment Link
curl --request POST \
  --url https://sandbox.cashfree.com/pg/links/{link_id}/cancel \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>'
{
  "cf_link_id": "1996567",
  "link_id": "my_link_id",
  "link_status": "ACTIVE",
  "link_currency": "INR",
  "link_amount": 100,
  "link_amount_paid": 0,
  "link_partial_payments": true,
  "link_minimum_partial_amount": 20,
  "link_purpose": "Payment for PlayStation 11",
  "link_created_at": "2021-09-30T17:05:01+05:30",
  "customer_details": {
    "customer_name": "John Doe",
    "customer_phone": "9999999999",
    "customer_email": "john@example.com"
  },
  "link_meta": {
    "notify_url": "https://ee08e626ecd88c61c85f5c69c0418cb5.m.pipedream.net",
    "upi_intent": false,
    "return_url": "https://www.cashfree.com/devstudio/thankyou"
  },
  "link_url": "https://payments-test.cashfree.com/links/o1tf1nvcvjhg",
  "link_expiry_time": "2021-10-14T15:04:05+05:30",
  "link_notes": {
    "key_1": "value_1",
    "key_2": "value_2"
  },
  "link_auto_reminders": true,
  "link_qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFAAQMAAAD3XjfpAAAABlBMVEX///8AAABVwtN+AAAC9ElEQVR4nOyaPY7jMAyFn6HCpY7go/hmkXIzH0VHUOlC8Fvw0c4kM4PFFltJJjDAQPnSEPx5JIPbbrvttv9rC82mPW7gvnDasT5ZkSZyS/ZR6xLMANaJFQLJuj5J5mkHHgaMDpJlNfeROzAZFE4/PgKZOwZfoWTggchsDrvBd7DNZeW/+LEHUDmzY7Wn1aNHORO335JrNPBVcVPYl+2Y6/pssSS9/F6aOwDdLq9smLkBsUCl9aeNB6riymMzNwujI9QlW11hw/Lmx47AJVNBY16Zi71Ydy1JFTXU4UEGlvWYSfsGgbghXOn2HkGdgcCymdJS9GCu66HXmVtqsQwOvoSo/tnswbovLZ6mFpnHBpccTLHaPGMq5QBWKznZOpN9PbUeQcCdUV1mmFfkHmqcI4nBweZt2Ifc031SbEifrbgnMClndg8aWknJ1l5cpLlgHRp0OaZ5xiY4qRQPI5Our3mmO7Cs3L37mhp1SaYBNtRP9wwJnsll84zWYTmwJO5qOCV1CdpoT9pQkkykWWuResdccY22A4NIZIGmF2i4qesRXLBbcpWvNtwTuDCc7SWf0tTay6LVZ3ovpKOClkYHbHrZsU575LOddfiBD2XfFdhMhJozgo31NsXBFem35BoSlPjY9LkJdswkWywJEmmfWdgPeMqt64akQtr0Gj8XgKOCvubxjehmfszXaD992wH0AyL5BGZ9xqIHkU+eihRX9xkX9C2fSzKVFJtXouSITitvS8AhwSzBLm2mM6RmGoDaJfMtHvsC1YavzbD344pXxR0eNG1m8jx5yVHFNT9GBU/uEnSzDMnNSq8KLaATG0L9OiyOCfoFUn5sM7fj2gy/ztLoEtS12f6yqshc8Qj13AKFd202KHheIF2bQWseFkxKrrp8/6VLV+Au8cFNqYJYkrXZZ4s/f98zJEiPFd3gU9PPdij1/rEO6whUzsxnmug24gez6DkzOPiquAg+ztEX57rK1+WX0twBeNttt932d/sTAAD//zUdVfZhwUvzAAAAAElFTkSuQmCC",
  "link_notify": {
    "send_sms": false,
    "send_email": true
  },
  "order_splits": [
    {
      "vendor_id": "Jane",
      "percentage": 10,
      "tags": {
        "address": "Hyderabad"
      }
    },
    {
      "vendor_id": "Barbie",
      "percentage": 50,
      "tags": {
        "address": "Bengaluru, India"
      }
    }
  ]
}
Run in Postman: You can also try this API in our Postman Collection.

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app id in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Headers

x-api-version
string
default:2025-01-01
required

API version to be used.

x-request-id
string

Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.

x-idempotency-key
string<UUID>

An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.

Path Parameters

The payment link ID for which you want to view the details.

Response

Success response for cancelling a payment link.

customer_details
customer_details · object

Payment link customer entity.

Example:
{
"customer_name": "John Doe",
"customer_phone": "9999999999",
"customer_email": "john@cashfree.com",
"customer_bank_account_number": 11111111111,
"customer_bank_ifsc": "SBIN0001882",
"customer_bank_code": 7001
}

Payment link meta information object.

Example:
{
"notify_url": "https://ee08e626ecd88c61c85f5c69c0418cb5.m.pipedream.net",
"upi_intent": "false",
"return_url": "https://www.cashfree.com/devstudio/thankyou"
}

Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs.

Example:
{ "key_1": "value_1", "key_2": "value_2" }

Payment link Notify Object for SMS and Email.

Example:
{ "send_sms": false, "send_email": true }

Base64 encoded string for payment link. You can scan with camera to open a link in the browser to complete the payment.

order_splits
VendorSplit · object[]