---
title: "Create a payment link"
method: POST
path: "/api/v1/payment-links"
tags: ["Payment Links"]
---

# Create a payment link

`POST /api/v1/payment-links`

Create a payment link to accept payments from customers. You can accept payments in a fixed or variable amount from your customers. Whether you are doing a freelancing, running a crowdfunding campaign, accept donations, or just looking for a simple way to build patrons via crypto, these payment links are the perfect solution.

## Request body

- CreatePaymentLinkDto
  - `type` 'one_time' | 'multiple', required
  - `amount` integer — Amount to take from user in 8 decimal places. If not provided then user can enter any amount
  - `currency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `currencies` CryptoCurrency[] — Currencies in which amount is to be taken
  - `preferredCurrency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `title` string, required — Payment link title
  - `description` string — Payment link description
  - `image` string — Payment link product image
  - `tags` string[], required — Payment link tags
  - `nameCollection` boolean, required — If true then take name from user
  - `emailCollection` boolean, required — If true then take email from user
  - `phoneNumberCollection` boolean, required — If true then take phone number from user
  - `shippingAddressCollection` boolean, required — If true then take shipping address from user
  - `billingAddressCollection` boolean, required — If true then take billing address from user
  - `customFields` PaymentLinkCustomFieldDto
    - `fields` PaymentLinkCustomFieldsDto[]
      - `key` string, required
      - `type` 'text' | 'numeric' | 'dropdown', required
      - `label` CustomFieldLabelDto, required
        - `type` 'custom'
        - `custom` string, required
      - `optional` boolean, required
  - `submitType` 'pay' | 'book' | 'donate', required
  - `afterCompletion` 'redirect' | 'hosted_confirmation', required
  - `afterCompletionRedirectUrl` string — After completion redirect url to redirect user to after payment
  - `afterCompletionConfirmMsg` string — After completion confirmation message to show to user after payment
  - `suggestedCurrency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `suggestedAmounts` string[] — Suggested amounts to show on checkout page if amount is not provided
  - `productId` string — Product id to take payment for
  - `allowPromotionCodes` boolean — Enables user redeemable promotion codes.
  - `allowedChains` PaymentLinkChainDto[] — Allowed chains to take payment from
    - `chainId` number, required — Chain id
    - `isPreferred` boolean, required — Is this chain preferred. If yes then it will be selected by default on checkout page

## Response `200`

- PaymentLinkDto
  - `id` string, required
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `organizationId` string, required — Organization's id
  - `type` 'one_time' | 'multiple', required
  - `amount` integer — Amount to take from user in 8 decimal places. If not provided then user can enter any amount
  - `currency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `currencies` CryptoCurrency[] — Currencies in which amount is to be taken
  - `preferredCurrency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `title` string, required — Payment link title
  - `description` string — Payment link description
  - `image` string — Payment link product image
  - `publicImage` string — Payment link product image with absolute public url
  - `tags` string[], required — Payment link tags
  - `isActive` boolean — Whether the payment link is currently active
  - `nameCollection` boolean, required — If true then take name from user
  - `emailCollection` boolean, required — If true then take email from user
  - `phoneNumberCollection` boolean, required — If true then take phone number from user
  - `shippingAddressCollection` boolean, required — If true then take shipping address from user
  - `billingAddressCollection` boolean, required — If true then take billing address from user
  - `customFields` PaymentLinkCustomFieldDto
    - `fields` PaymentLinkCustomFieldsDto[]
      - `key` string, required
      - `type` 'text' | 'numeric' | 'dropdown', required
      - `label` CustomFieldLabelDto, required
        - `type` 'custom'
        - `custom` string, required
      - `optional` boolean, required
  - `submitType` 'pay' | 'book' | 'donate', required
  - `afterCompletion` 'redirect' | 'hosted_confirmation', required
  - `afterCompletionRedirectUrl` string — After completion redirect url to redirect user to after payment
  - `afterCompletionConfirmMsg` string — After completion confirmation message to show to user after payment
  - `suggestedCurrency` 'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
  - `suggestedAmounts` string[] — Suggested amounts to show on checkout page if amount is not provided
  - `productId` string — Product id to take payment for
  - `allowedChains` PaymentLinkChainDto[] — Allowed chains to take payment from
    - `chainId` number, required — Chain id
    - `isPreferred` boolean, required — Is this chain preferred. If yes then it will be selected by default on checkout page
  - `interval` 'day' | 'week' | 'month' | 'year'
  - `intervalCount` number — It is used to determine the frequency at which the subscription is billed. Only required for subscriptions
  - `priceType` 'one_time' | 'recurring' | 'streaming', required
  - `allowPromotionCodes` boolean — Enables user redeemable promotion codes.

## Other responses

- `500`

---

[API](https://skmtc.net/copperx/apis/copperx-api-2.md) · [All operations](https://skmtc.net/copperx/apis/copperx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/copperx/copperx-api-2/revisions/c0bfbc37fb98/schema)
