v1

latestOpenAPI 3.0.02026-07-243678114.1 KB
Paylinks

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.

post/v1/paylinks

Request body

account_idsinteger[]

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. <small>⚠️ Either account_ids or account_ref should be used, not both. ⚠️</small>

account_refstring

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. <small>⚠️ Either account_ids or account_ref should be used, not both. ⚠️</small>

namestring required

The name of the payment link.

amountstring required

The amount associated with the payment link.

currencystring required

The currency of the payment link.

referencestring

The reference for the payment link.

descriptionstring

A description of the payment link.

interval'Week' | 'Month' | 'Year'

The recurring interval for the payment link:

  • Week
  • Month
  • Year
intervalCountinteger

The number of intervals for the recurring payment link.

trial_periodstring

The trial period for the payment link in a valid duration format. For example, for 1 day use 24h.

image_urlstring

An image URL to be used as the cover image for the payment link at the checkout.

available_quantitynumber

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.

For example, set available_quantity to 1 to create a one-time use payment link.

  • A successful or failed payment decreases the counter by one.
  • A canceled payment reverts the counter (quantity is restored).
  • When the counter reaches zero, the payment link becomes invalid and no further checkouts are accepted.
expires_atstring date-time

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.

Example request

{
  "name": "New Paylink",
  "amount": "1000",
  "currency": "USD",
  "intervalCount": 1,
  "trial_period": "24h",
  "expires_at": "2026-12-31T23:59:59Z"
}

Response

OK

errorboolean

Example response

{
  "data": {
    "id": "2Z4zsnmp37AF3WKM6N2j4wmeakr",
    "plan_id": "2Z4zspFMhs2pMYjcR3l6JpJaWdA",
    "source": "BoomFi",
    "enabled": true,
    "deleted_at": "2023-12-04T13:25:48.499Z",
    "created_by": "2TzGhPCAfFWLPBjtc6h52Aao2S6",
    "created_at": "2023-12-04T13:25:48.496Z",
    "updated_at": "2023-12-04T13:25:48.499Z",
    "expires_at": "2026-12-31T23:59:59Z",
    "metadata": {},
    "properties": {
      "short_code": "AANj9Dm7Zl"
    },
    "plan": {
      "id": "2Z4zspFMhs2pMYjcR3l6JpJaWdA",
      "org_id": "2Tpmnmh6GHJXumKN1oBy2u56Ima",
      "source": "Lago",
      "name": "test paylink 12 04",
      "type": "OneTime",
      "billing_scheme": "FlatFee",
      "price": "1",
      "currency": "USD",
      "recurring_interval": "Unknown",
      "recurring_interval_count": 1,
      "recurring_usage_type": "Unknown",
      "enabled": true,
      "v1": "eyJwbGFucyI6IHsiaWQiOiAiYWE1ZmI5MjQtMmMzZi00NzcwLTkyZDEtMjFjYmY3ODc3ODc2IiwgIm5hbWUiOiAidGVzdCBwYXlsaW5rIDEyIDA0IiwgInN0YXR1cyI6ICJhY3RpdmUiLCAiaW50ZXJ2YWwiOiBudWxsLCAicmVmZXJlbmNlIjogIiIsICJhbW91bnRfd2VpIjogIjEwMCIsICJjcmVhdGVkX2F0IjogIjIwMjMtMTI...",
      "created_by": "2TzGhPCAfFWLPBjtc6h52Aao2S6",
      "created_at": "2023-12-04T13:25:47.656Z",
      "updated_at": "2023-12-04T13:25:48.491Z",
      "metadata": {}
    }
  }
}