> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orafi.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Paylinks

> Create shareable payment links for one-off charges, invoices, and simple checkout flows.

## The paylink object

A paylink is a shareable payment URL that allows customers to pay without requiring a custom checkout integration. Ideal for invoices, social commerce, and quick payments.

<ResponseField name="id" type="string">
  Unique identifier for the paylink.
</ResponseField>

<ResponseField name="title" type="string">
  Short title displayed to customers on the payment page.
</ResponseField>

<ResponseField name="description" type="string">
  Detailed description explaining what the payment is for.
</ResponseField>

<ResponseField name="mode" type="string">
  Environment mode. Either `test` or `live`.
</ResponseField>

<ResponseField name="amount" type="number">
  Amount to be paid when the paylink is used.
</ResponseField>

<ResponseField name="imageBlobIds" type="string[]">
  Identifiers for images associated with the paylink, such as product or
  branding visuals.
</ResponseField>

<ResponseField name="images" type="PaylinkImage[]">
  Image metadata returned alongside the paylink in API responses.
</ResponseField>

<ResponseField name="profileId" type="string">
  Business profile that owns this paylink.
</ResponseField>

<ResponseExample>
  ```json The paylink object theme={null}
  {
    "id": "cmjwxuwpl0000v8fwozati4d1",
    "title": "Chidi and Co.",
    "description": "Battery and spare parts",
    "mode": "test",
    "amount": 4000,
    "imageBlobIds": ["AaV6MqcXjdhL64Crb_OqGu9qyHXAaYFxDvKzyvOpgnY"],
    "images": [],
    "profileId": "84a9f045-8a21-4ce4-a7a0-828265c0021b"
  }
  ```
</ResponseExample>

***

## Create a paylink

<div className="api-method-box">
  <span className="api-method post">POST</span> `/paylink/create`
</div>

Creates a new paylink. Send the request as `multipart/form-data` to include product images.

### Request body

<ParamField body="title" type="string" required>
  Short title displayed to customers.
</ParamField>

<ParamField body="description" type="string" required>
  Description of the product or service.
</ParamField>

<ParamField body="amount" type="number" required>
  Amount to charge.
</ParamField>

<ParamField body="images" type="file">
  Optional product image(s) to display on the payment page.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X POST https://api.orafi.app/paylink/create \
    -H "x-api-key: ora_test_your_api_key" \
    -F 'payload={
      "title": "Chidi and Co.",
      "description": "Battery and spare parts",
      "amount": 4000
    }' \
    -F 'images=@product.jpg'
  ```

  ```javascript Node.js theme={null}
  const formData = new FormData();
  formData.append("payload", JSON.stringify({
    title: "Chidi and Co.",
    description: "Battery and spare parts",
    amount: 4000
  }));
  formData.append("images", fileBlob, "product.jpg");

  const response = await fetch("https://api.orafi.app/paylink/create", {
  method: "POST",
  headers: { "x-api-key": "ora_test_your_api_key" },
  body: formData
  });

  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.orafi.app/paylink/create",
      headers={"x-api-key": "ora_test_your_api_key"},
      files={"images": open("product.jpg", "rb")},
      data={
          "payload": '{"title":"Chidi and Co.","description":"Battery and spare parts","amount":4000}'
      }
  )
  ```

  ```json 200 theme={null}
  {
    "success": true,
    "message": "Paylink successfully created",
    "data": {
      "id": "cmjwxuwpl0000v8fwozati4d1",
      "title": "Chidi and Co.",
      "description": "Battery and spare parts",
      "mode": "test",
      "amount": 4000,
      "imageBlobIds": ["AaV6MqcXjdhL64Crb_OqGu9qyHXAaYFxDvKzyvOpgnY"],
      "images": [],
      "profileId": "84a9f045-8a21-4ce4-a7a0-828265c0021b"
    }
  }
  ```
</ResponseExample>

***

## Retrieve a paylink

<div className="api-method-box">
  <span className="api-method get">GET</span> `/paylink/{id}`
</div>

Returns the details of an existing paylink.

### Path parameters

<ParamField path="id" type="string" required>
  The paylink ID to retrieve.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X GET https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1 \
    -H "x-api-key: ora_test_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1",
    { headers: { "x-api-key": "ora_test_your_api_key" } }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
  "https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1",
  headers={"x-api-key": "ora_test_your_api_key"}
  )

  ```

  ```json 200 theme={null}
  {
    "success": true,
    "message": "Paylink retrieved successfully",
    "data": {
      "id": "cmjwxuwpl0000v8fwozati4d1",
      "title": "Chidi and Co.",
      "description": "Battery and spare parts",
      "mode": "test",
      "amount": 4000,
      "imageBlobIds": [
        "AaV6MqcXjdhL64Crb_OqGu9qyHXAaYFxDvKzyvOpgnY"
      ]
    }
  }
  ```
</ResponseExample>

***

## List paylinks

<div className="api-method-box">
  <span className="api-method get">GET</span> `/paylink`
</div>

Returns all paylinks belonging to the authenticated business profile.

<ResponseExample>
  ```bash cURL theme={null}
  curl -X GET https://api.orafi.app/paylink \
    -H "x-api-key: ora_test_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.orafi.app/paylink", {
    headers: { "x-api-key": "ora_test_your_api_key" }
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
  "https://api.orafi.app/paylink",
  headers={"x-api-key": "ora_test_your_api_key"}
  )

  ```

  ```json 200 theme={null}
  {
    "success": true,
    "message": "Paylinks retrieved successfully",
    "data": [
      {
        "id": "cmjftyjne0002v8vsgi1j8k8f",
        "title": "Chidi and Co.",
        "description": "Battery and spare parts",
        "mode": "test",
        "amount": 4000,
        "imageBlobIds": ["AaV6MqcXjdhL64Crb_OqGu9qyHXAaYFxDvKzyvOpgnY"],
        "images": [],
        "profileId": "84a9f045-8a21-4ce4-a7a0-828265c0021b"
      },
      {
        "id": "cmjwxuwpl0000v8fwozati4d1",
        "title": "Chidi and Co.",
        "description": "Battery and spare parts",
        "mode": "test",
        "amount": 4000,
        "imageBlobIds": ["AaV6MqcXjdhL64Crb_OqGu9qyHXAaYFxDvKzyvOpgnY"],
        "images": [],
        "profileId": "84a9f045-8a21-4ce4-a7a0-828265c0021b"
      }
    ]
  }
  ```
</ResponseExample>

***

## Delete a paylink

<div className="api-method-box">
  <span className="api-method delete">DELETE</span> `/paylink/{id}`
</div>

Permanently deletes a paylink. This action cannot be undone.

### Path parameters

<ParamField path="id" type="string" required>
  The paylink ID to delete.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1 \
    -H "x-api-key: ora_test_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1",
    {
      method: "DELETE",
      headers: { "x-api-key": "ora_test_your_api_key" }
    }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
  "https://api.orafi.app/paylink/cmjwxuwpl0000v8fwozati4d1",
  headers={"x-api-key": "ora_test_your_api_key"}
  )

  ```

  ```json 200 theme={null}
  {
    "success": true,
    "message": "Paylink deleted successfully",
    "data": null
  }
  ```
</ResponseExample>
