---
updatedAt: 2026-04-06T12:57:35.000Z
agentTools:
  projectIndex: https://boomfi.readme.io/llms.txt
---

# Create Payment Link

The **Create Payment Link** endpoint enables you to generate a new payment link for a specific product or service within the BoomFi platform. This link can be customized with various parameters, such as the amount, currency, and description, facilitating payments for a wide range of offerings. Use this endpoint to quickly create payment links you can share with customers to collect payments seamlessly.

> 📘 Note
> 
> When creating a payment link, you can implicitly create a plan by providing details such as `amount` and `currency`.

> 🚧  Account-specific Paylinks 
>
> Create an account-specific paylink by adding either `account_ref` or `account_ids`. Its important to note that you cannot add both.


<HTMLBlock>{`
<style>
  :root {
    --callout-border: 0;
    --callout-border-radius: 4px;
    --text-color: #000000;

    /* Info Callout Colors */
    --info-light-bg: #DAF8FF;
    --info-light-border: #7CCEDF;
    --info-light-header: #57B3C7;
    --info-light-text: #283652;
    --info-light-link: #57B3C7;
    --info-dark-bg: #DAF8FF;
    --info-dark-border: #7CCEDF;
    --info-dark-header: #57B3C7;
    --info-dark-text: #97B5BC;
    --info-dark-link: #57B3C7;

    /* Okay Callout Colors */
    --okay-light-bg: #DFFFE8;
    --okay-light-border: #116E5F;
    --okay-light-header: #116E5F;
    --okay-light-text: #116E5F;
    --okay-light-link: #61AEA0;
    --okay-dark-bg: #DFFFE8;
    --okay-dark-header: #5BB2A4;
    --okay-dark-text: #7B9792;
    --okay-dark-link: #61AEA0;

    /* Default Callout Colors */
    --default-light-bg: #e8e8e8;
    --default-light-border: #ACACAC;
    --default-light-text: #8A8A8A;
    --default-dark-bg: #e8e8e8;
    --default-dark-text: #FFFFFF;

    /* Warn Callout Colors */
    --warn-light-bg: #fff9c2;
    --warn-light-border: #FFB293;
    --warn-light-header: #FF966B;
    --warn-light-text: #80776C;
    --warn-light-link: #FF966B;
    --warn-dark-bg: #fff9c2;
    --warn-dark-header: #FF966B;
    --warn-dark-text: #989693;
    --warn-dark-link: #FF966B;

    /* Error Callout Colors */
    --error-light-bg: #ffdada;
    --error-light-border: #FA94A6;
    --error-light-header: #FF728B;
    --error-light-text: #B56978;
    --error-light-link: #FF728B;
    --error-dark-bg: #ffdada;
    --error-dark-header: #FF728B;
    --error-dark-text: #C6A5AB;
    --error-dark-link: #FF728B;
  }

  .field-description blockquote,
  .markdown-body blockquote {
    border-left: 0;
  }

  .callout {
    border-radius: var(--callout-border-radius);
    border: var(--callout-border);
  }

  .callout .callout-heading p,
  .callout p,
  .callout ul {
    color: var(--text-color) !important;
  }

  @media (prefers-color-scheme: dark) {

    [data-color-mode="system"] .callout .callout-heading p,
    [data-color-mode="system"] .callout p,
    [data-color-mode="system"] .callout ul {
      color: var(--text-color) !important;
    }
  }

  [data-color-mode="dark"] .callout .callout-heading p,
  [data-color-mode="dark"] .callout p,
  [data-color-mode="dark"] .callout ul {
    color: var(--text-color) !important;
  }

  /* INFO CALLOUT */
  .callout.callout_info {
    background: var(--info-light-bg);
  }

  .callout.callout_info a {
    color: var(--info-light-link);
  }

  @media (prefers-color-scheme: dark) {
    [data-color-mode="system"] .callout.callout_info {
      background-color: var(--info-dark-bg) !important;
    }

    [data-color-mode="system"] .callout.callout_info a {
      color: var(--info-dark-link) !important;
    }
  }

  [data-color-mode="dark"] .callout.callout_info {
    background-color: var(--info-dark-bg) !important;
  }

  [data-color-mode="dark"] .callout.callout_info a {
    color: var(--info-dark-link) !important;
  }

  /* INFO CALLOUT */

  /* OKAY CALLOUT */
  .callout.callout_okay {
    background: var(--okay-light-bg);
  }

  .callout.callout_okay a {
    color: var(--okay-light-link);
  }

  @media (prefers-color-scheme: dark) {
    [data-color-mode="system"] .callout.callout_okay {
      background-color: var(--okay-dark-bg) !important;
    }

    [data-color-mode="system"] .callout.callout_okay a {
      color: var(--okay-dark-link) !important;
    }
  }

  [data-color-mode="dark"] .callout.callout_okay {
    background-color: var(--okay-dark-bg) !important;
  }

  [data-color-mode="dark"] .callout.callout_okay a {
    color: var(--okay-dark-link) !important;
  }

  /* OKAY CALLOUT */

  /* DEFAULT CALLOUT */
  .callout.callout_default {
    background: var(--default-light-bg);
  }

  .callout.callout_default a {
    color: var(--text-color) !important;
  }

  @media (prefers-color-scheme: dark) {
    [data-color-mode="system"] .callout.callout_default {
      background-color: var(--default-dark-bg) !important;
    }

    [data-color-mode="system"] .callout.callout_default a {
      color: var(--text-color) !important;
    }

  }

  [data-color-mode="dark"] .callout.callout_default {
    background-color: var(--default-dark-bg) !important;
  }

  [data-color-mode="dark"] .callout.callout_default a {
    color: var(--text-color) !important;
  }

  /* DEFAULT CALLOUT */

  /* WARN CALLOUT */
  .callout.callout_warn {
    background: var(--warn-light-bg);
  }

  .callout.callout_warn a {
    color: var(--warn-light-link);
  }

  @media (prefers-color-scheme: dark) {
    [data-color-mode="system"] .callout.callout_warn {
      background-color: var(--warn-dark-bg) !important;
    }

    [data-color-mode="system"] .callout.callout_warn a {
      color: var(--warn-dark-link);
    }
  }

  [data-color-mode="dark"] .callout.callout_warn {
    background-color: var(--warn-dark-bg) !important;
  }

  [data-color-mode="dark"] .callout.callout_warn a {
    color: var(--warn-dark-link);
  }

  /* WARN CALLOUT */

  /* ERROR CALLOUT */
  .callout.callout_error {
    background: var(--error-light-bg);
  }

  .callout.callout_error a {
    color: var(--error-light-link);
  }

  @media (prefers-color-scheme: dark) {
    [data-color-mode="system"] .callout.callout_error {
      background-color: var(--error-dark-bg) !important;
    }

    [data-color-mode="system"] .callout.callout_error a {
      color: var(--error-dark-link);
    }
  }

  [data-color-mode="dark"] .callout.callout_error {
    background-color: var(--error-dark-bg) !important;
  }

  [data-color-mode="dark"] .callout.callout_error a {
    color: var(--error-dark-link);
  }

  /* ERROR CALLOUT */

  img {
    border-radius: 14px !important;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.15);
  }

  .Sidebar-listWrapper6Q9_yUrG906C.rm-Sidebar-section:nth-child(3),
  .rm-Sidebar-section:nth-child(3), .rm-Sidebar-section:nth-child(4) {
    display: none;
  }

  .Select option {
    color: var(--color-input-text);
  }
</style>
`}</HTMLBlock>

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "The BoomFi Merchants API provides a set of endpoints for merchants to manage their accounts, transactions, and more.",
    "title": "BoomFi Merchants API",
    "contact": {
      "name": "API Support",
      "email": "support@boomfi.xyz"
    },
    "version": "1.0"
  },
  "paths": {
    "/v1/paylinks": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "The **Create Payment Link** endpoint enables you to generate a new payment link for a specific product or service within the BoomFi platform. This link can be customized with various parameters, such as the amount, currency, and description, facilitating payments for a wide range of offerings. Use this endpoint to quickly create payment links you can share with customers to collect payments seamlessly.\n\n> 📘 Note\n> \n> When creating a payment link, you can implicitly create a plan by providing details such as `amount` and `currency`.\n\n> 🚧  Account-specific Paylinks \n>\n> Create an account-specific paylink by adding either `account_ref` or `account_ids`. Its important to note that you cannot add both.\n",
        "tags": [
          "Paylinks"
        ],
        "summary": "Create Payment Link",
        "operationId": "create-payment-link",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/paylinks.CreatePaymentLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal.Response-paylinks_PaymentLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal.ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal.ErrorResponse500"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "//mapi.boomfi.xyz"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header"
      }
    },
    "schemas": {
      "internal.ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/internal.ErrorStruct"
          }
        }
      },
      "internal.ErrorResponse500": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/internal.ErrorStruct500"
          }
        }
      },
      "internal.ErrorStruct": {
        "type": "object",
        "properties": {
          "code": {
            "description": "The error code returned by the server.\nExample: 400",
            "type": "integer",
            "example": 400
          },
          "errors": {
            "description": "A list of detailed error objects.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal.SingleError"
            }
          },
          "message": {
            "description": "A descriptive message explaining the error.\nExample: Insufficient quantity",
            "type": "string",
            "example": "Insufficient quantity"
          }
        }
      },
      "internal.ErrorStruct500": {
        "type": "object",
        "properties": {
          "code": {
            "description": "The error code returned by the server.\nExample: 500",
            "type": "integer",
            "example": 500
          },
          "errors": {
            "description": "A list of detailed error objects.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/internal.SingleError500"
            }
          },
          "message": {
            "description": "A descriptive message explaining the error.\nExample: Internal server error",
            "type": "string",
            "example": "Internal server error"
          }
        }
      },
      "internal.Response-paylinks_PaymentLinkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/paylinks.PaymentLinkResponse"
          },
          "error": {
            "type": "boolean"
          }
        }
      },
      "internal.SingleError": {
        "type": "object",
        "properties": {
          "domain": {
            "description": "The domain associated with the error.\nExample: orders",
            "type": "string",
            "example": "orders"
          },
          "reason": {
            "description": "The reason for the error.\nExample: InsufficientQuantity",
            "type": "string",
            "example": "InsufficientQuantity"
          }
        }
      },
      "internal.SingleError500": {
        "type": "object",
        "properties": {
          "domain": {
            "description": "The domain associated with the error.\nExample: orders",
            "type": "string",
            "example": "orders"
          },
          "reason": {
            "description": "The reason for the error.\nExample: Internal",
            "type": "string",
            "example": "Internal"
          }
        }
      },
      "models.RecurringInterval": {
        "type": "string",
        "description": "The recurring interval for the payment link:\n- **Week**\n- **Month**\n- **Year**\n",
        "enum": [
          "Week",
          "Month",
          "Year"
        ],
        "x-enum-varnames": [
          "RecurringIntervalWeek",
          "RecurringIntervalMonth",
          "RecurringIntervalYear"
        ]
      },
      "paylinks.CreatePaymentLinkRequest": {
        "required": [
          "name",
          "amount",
          "currency"
        ],
        "type": "object",
        "properties": {
          "account_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "description": "A list of account IDs to associate with the payment link. Use this to attach specific accounts to the payment link, making it account-specific.\n<small>⚠️ Either `account_ids` or `account_ref` should be used, not both. ⚠️</small>\n"
          },
          "account_ref": {
            "type": "string",
            "description": "An account reference to associate with the payment link. Use this to attach accounts with the specified account reference to the payment link, making it account-specific. \n<small>⚠️ Either `account_ids` or `account_ref` should be used, not both. ⚠️</small>\n"
          },
          "name": {
            "type": "string",
            "description": "The name of the payment link.",
            "example": "New Paylink"
          },
          "amount": {
            "type": "string",
            "description": "The amount associated with the payment link.",
            "example": "1000"
          },
          "currency": {
            "type": "string",
            "description": "The currency of the payment link.",
            "example": "USD"
          },
          "reference": {
            "type": "string",
            "description": "The reference for the payment link."
          },
          "description": {
            "type": "string",
            "description": "A description of the payment link."
          },
          "interval": {
            "$ref": "#/components/schemas/models.RecurringInterval"
          },
          "intervalCount": {
            "type": "integer",
            "description": "The number of intervals for the recurring payment link.",
            "example": 1
          },
          "trial_period": {
            "type": "string",
            "description": "The trial period for the payment link in a valid duration format. For example, for 1 day use 24h.",
            "example": "24h"
          },
          "image_url": {
            "type": "string",
            "description": "An image URL to be used as the cover image for the payment link at the checkout."
          },
          "available_quantity": {
            "type": "number",
            "description": "Limits the number of times the payment link can be used. When set to a positive non-zero value, the payment link becomes limited-usage.\n\nFor example, set `available_quantity` to `1` to create a one-time use payment link.\n\n- A successful or failed payment decreases the counter by one.\n- A canceled payment reverts the counter (quantity is restored).\n- When the counter reaches zero, the payment link becomes invalid and no further checkouts are accepted.\n"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Sets an expiration date and time for the payment link. Any checkout attempt after this timestamp will fail, as the payment link is no longer valid.\n",
            "example": "2026-12-31T23:59:59Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/paylinks.CreatePaymentLinkRequestMetadata"
          }
        }
      },
      "paylinks.CreatePaymentLinkRequestMetadata": {
        "type": "object",
        "properties": {
          "payment_method_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "MerchantContract",
                "ProxyWallet",
                "Card"
              ]
            },
            "description": "Specifies the payment methods available at checkout. By default, the system applies payment methods based on the merchant’s settlement account settings. If `Card` is included, the card payment option appears only if the merchant has a Card settlement account configured.\n\nAccepts an array with any or all of these values: \n- **MerchantContract**\n- **ProxyWallet**\n- **Card** \n"
          },
          "after_completion": {
            "type": "object",
            "description": "Defines post-checkout behavior. The configuration allows either a custom success message or a redirect to a specified URL upon payment completion.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "hosted",
                  "redirect"
                ],
                "description": "Sets the post-checkout behavior:\n- **hosted**: Displays a success message, customizable with `custom_message`. \n- **redirect**: Sends the user to a specified URL via `redirect_url`.\n"
              },
              "custom_message": {
                "type": "string",
                "description": "A custom success message shown after payment completion if `type` is set to `hosted`. If not provided, a default success message will be displayed."
              },
              "redirect_url": {
                "type": "string",
                "format": "uri",
                "description": "URL to which the user is redirected after successful payment if `type` is set to `redirect`. A valid URL is required for this type."
              }
            }
          },
          "omit_possible_duplicate_acknowledgement": {
            "type": "boolean",
            "description": "Determines if users should be notified when attempting multiple one-time payments. \n- **true**: A prompt will notify users of prior payments to the link, but they can proceed with an additional payment.\n- **false**: No prompt will be shown for repeated payments.\n"
          }
        }
      },
      "paylinks.PaymentLinkResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the paylink",
            "example": "2Z4zsnmp37AF3WKM6N2j4wmeakr"
          },
          "plan_id": {
            "type": "string",
            "description": "The ID of the associated plan",
            "example": "2Z4zspFMhs2pMYjcR3l6JpJaWdA"
          },
          "invoice_id": {
            "type": "string",
            "description": "The ID of the associated invoice",
            "example": ""
          },
          "source": {
            "type": "string",
            "description": "The source of the paylink",
            "example": "BoomFi"
          },
          "customer_ident_collection": {
            "type": "boolean",
            "description": "Indicates if customer identification collection is enabled",
            "example": false
          },
          "shipping_address_collection": {
            "type": "boolean",
            "description": "Indicates if shipping address collection is enabled",
            "example": false
          },
          "tax_ident_collection": {
            "type": "boolean",
            "description": "Indicates if tax identification collection is enabled",
            "example": false
          },
          "enabled": {
            "type": "boolean",
            "description": "Indicates if the paylink is enabled",
            "example": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the paylink was deleted",
            "example": "2023-12-04T13:25:48.499Z"
          },
          "created_by": {
            "type": "string",
            "description": "The ID of the user who created the paylink",
            "example": "2TzGhPCAfFWLPBjtc6h52Aao2S6"
          },
          "updated_by": {
            "type": "string",
            "description": "The ID of the user who last updated the paylink",
            "example": ""
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the paylink was created",
            "example": "2023-12-04T13:25:48.496Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the paylink was last updated",
            "example": "2023-12-04T13:25:48.499Z"
          },
          "available_quantity": {
            "type": "number",
            "description": "The remaining number of times this payment link can be used. `null` indicates unlimited usage.\n\n- Decremented on each successful or failed payment.\n- Restored when a payment is canceled.\n- When the value reaches zero, the payment link becomes invalid.\n"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The expiration date and time of the payment link. Any checkout attempt after this timestamp will fail.",
            "example": "2026-12-31T23:59:59Z"
          },
          "metadata": {
            "type": "object",
            "description": "Additional metadata associated with the paylink",
            "example": {}
          },
          "properties": {
            "type": "object",
            "description": "Additional properties associated with the paylink",
            "properties": {
              "short_code": {
                "type": "string",
                "description": "The short code associated with the paylink",
                "example": "AANj9Dm7Zl"
              }
            }
          },
          "plan": {
            "type": "object",
            "description": "The details of the associated plan",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier for the plan",
                "example": "2Z4zspFMhs2pMYjcR3l6JpJaWdA"
              },
              "org_id": {
                "type": "string",
                "description": "The organization ID associated with the plan",
                "example": "2Tpmnmh6GHJXumKN1oBy2u56Ima"
              },
              "source": {
                "type": "string",
                "description": "The source of the plan",
                "example": "Lago"
              },
              "name": {
                "type": "string",
                "description": "The name of the plan",
                "example": "test paylink 12 04"
              },
              "type": {
                "type": "string",
                "description": "The type of the plan",
                "example": "OneTime"
              },
              "billing_scheme": {
                "type": "string",
                "description": "The billing scheme of the plan",
                "example": "FlatFee"
              },
              "price": {
                "type": "string",
                "description": "The price of the plan",
                "example": "1"
              },
              "currency": {
                "type": "string",
                "description": "The currency of the plan",
                "example": "USD"
              },
              "available_quantity": {
                "type": "integer",
                "description": "The available quantity of the plan",
                "example": 0
              },
              "trial_period": {
                "type": "string",
                "description": "The trial period of the plan",
                "example": ""
              },
              "recurring_interval": {
                "type": "string",
                "description": "The recurring interval of the plan",
                "example": "Unknown"
              },
              "recurring_interval_count": {
                "type": "integer",
                "description": "The recurring interval count of the plan",
                "example": 1
              },
              "recurring_usage_type": {
                "type": "string",
                "description": "The recurring usage type of the plan",
                "example": "Unknown"
              },
              "reference": {
                "type": "string",
                "description": "The reference of the plan",
                "example": ""
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if the plan is enabled",
                "example": true
              },
              "v1": {
                "type": "string",
                "description": "Additional information about the plan",
                "example": "eyJwbGFucyI6IHsiaWQiOiAiYWE1ZmI5MjQtMmMzZi00NzcwLTkyZDEtMjFjYmY3ODc3ODc2IiwgIm5hbWUiOiAidGVzdCBwYXlsaW5rIDEyIDA0IiwgInN0YXR1cyI6ICJhY3RpdmUiLCAiaW50ZXJ2YWwiOiBudWxsLCAicmVmZXJlbmNlIjogIiIsICJhbW91bnRfd2VpIjogIjEwMCIsICJjcmVhdGVkX2F0IjogIjIwMjMtMTI..."
              },
              "created_by": {
                "type": "string",
                "description": "The ID of the user who created the plan",
                "example": "2TzGhPCAfFWLPBjtc6h52Aao2S6"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "The timestamp when the plan was created",
                "example": "2023-12-04T13:25:47.656Z"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "The timestamp when the plan was last updated",
                "example": "2023-12-04T13:25:48.491Z"
              },
              "deleted_at": {
                "type": "string",
                "format": "date-time",
                "description": "The timestamp when the plan was deleted",
                "example": null
              },
              "metadata": {
                "type": "object",
                "description": "Additional metadata associated with the plan",
                "example": {}
              }
            }
          }
        }
      }
    }
  }
}
```