POST
/
links
/
{link_id}
/
cancel
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": {
    "title": "link_meta",
    "type": "object",
    "description": "Payment link meta information object.",
    "example": {
      "key_1": "value_1",
      "key_2": "value_2"
    },
    "additionalProperties": {
      "type": "string",
      "oneOf": []
    }
  },
  "link_url": "https://payments-test.cashfree.com/links/o1tf1nvcvjhg",
  "link_expiry_time": "2021-10-14T15:04:05+05:30",
  "link_notes": {
    "title": "link_notes",
    "type": "object",
    "description": "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"
    },
    "additionalProperties": {
      "type": "string",
      "oneOf": []
    }
  },
  "link_auto_reminders": true,
  "link_notify": {
    "title": "link_notify",
    "type": "object",
    "description": "Payment link Notify Object for SMS and Email",
    "example": {
      "send_sms": false,
      "send_email": true
    },
    "properties": {
      "send_sms": {
        "oneOf": [
          {
            "type": "boolean",
            "description": "If \"true\", Cashfree will send sms on customer_phone"
          }
        ]
      },
      "send_email": {
        "oneOf": [
          {
            "type": "boolean",
            "description": "If \"true\", Cashfree will send email on customer_email"
          }
        ]
      }
    }
  }
}

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 in the Merchant Dashboard.

Headers

x-api-version
string
default:2022-09-01
required

API version to be used. Format is in YYYY-MM-DD

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

Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.

Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders

Path Parameters

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

Response

200
application/json

OK

Payment link success creation response object