POST
/
links
curl --request POST \
  --url https://sandbox.cashfree.com/pg/links \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "customer_details": {
    "customer_email": "john@cashfree.com",
    "customer_name": "John Doe",
    "customer_phone": "9999999999"
  },
  "link_amount": 100,
  "link_auto_reminders": true,
  "link_currency": "INR",
  "link_expiry_time": "2021-10-14T15:04:05+05:30",
  "link_id": "my_link_id",
  "link_meta": {
    "notify_url": "https://ee08e626ecd88c61c85f5c69c0418cb5.m.pipedream.net",
    "return_url": "https://www.cashfree.com/devstudio/thankyou",
    "upi_intent": false
  },
  "link_minimum_partial_amount": 20,
  "link_notes": {
    "key_1": "value_1",
    "key_2": "value_2"
  },
  "link_notify": {
    "send_email": true,
    "send_sms": false
  },
  "link_partial_payments": true,
  "link_purpose": "Payment for PlayStation 11",
  "order_splits": [
    {
      "vendor_id": "Jane",
      "amount": 1.45,
      "tags": {
        "address": "Hyderabad"
      }
    },
    {
      "vendor_id": "Barbie",
      "amount": 3.45,
      "tags": {
        "address": "Bengaluru, India"
      }
    }
  ]
}'
{
  "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"
      }
    }
  ]
}

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:2025-01-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

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.

Body

application/json

Request Body to Create Payment Links

Request paramenters for link creation

Response

200
application/json

OK

Payment link success creation response object