---
agentTools:
  projectIndex: https://copperx.readme.io/llms.txt
---

# Get a payment link

Returns a payment link

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/payment-links/{linkId}": {
      "get": {
        "operationId": "PaymentLinkController_get",
        "summary": "Get a payment link",
        "description": "Returns a payment link",
        "parameters": [
          {
            "name": "linkId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLinkDto"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDto"
                }
              }
            }
          }
        },
        "tags": [
          "Payment Links"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Copperx API",
    "description": "Copperx APIs allows you to access to manage payments, transactions and more in a simple way. Our APIs are easy to use and provide an intuitive APIs for developers to create powerful applications.",
    "version": "v0.0.0",
    "contact": {
      "name": "Copperx",
      "url": "https://t.me/+bVxXaalfhF8wMDFl",
      "email": "support@copperx.io"
    }
  },
  "servers": [
    {
      "url": "https://api.copperx.dev",
      "description": "Test"
    },
    {
      "url": "https://api.copperx.io",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ErrorDto": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object"
          },
          "statusCode": {
            "type": "number"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "statusCode",
          "error"
        ]
      },
      "CryptoCurrency": {
        "type": "string",
        "enum": [
          "usdc",
          "usdt",
          "pyusd",
          "eurc",
          "brett",
          "dai",
          "btc",
          "eth",
          "matic",
          "bnb",
          "sol",
          "busd",
          "trx",
          "food",
          "bonk",
          "wif",
          "goat",
          "spx",
          "truf",
          "pengu"
        ]
      },
      "CustomFieldType": {
        "type": "string",
        "enum": [
          "text",
          "numeric",
          "dropdown"
        ]
      },
      "CustomFieldLabelType": {
        "type": "string",
        "enum": [
          "custom"
        ]
      },
      "CustomFieldLabelDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/CustomFieldLabelType"
          },
          "custom": {
            "type": "string"
          }
        },
        "required": [
          "custom"
        ]
      },
      "AfterCompletionLink": {
        "type": "string",
        "enum": [
          "redirect",
          "hosted_confirmation"
        ]
      },
      "SubmitType": {
        "type": "string",
        "enum": [
          "pay",
          "book",
          "donate"
        ]
      },
      "Interval": {
        "type": "string",
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ]
      },
      "PriceType": {
        "type": "string",
        "enum": [
          "one_time",
          "recurring",
          "streaming"
        ]
      },
      "LinkType": {
        "type": "string",
        "enum": [
          "one_time",
          "multiple"
        ]
      },
      "PaymentLinkCustomFieldsDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/CustomFieldType"
          },
          "label": {
            "$ref": "#/components/schemas/CustomFieldLabelDto"
          },
          "optional": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "key",
          "type",
          "label",
          "optional"
        ]
      },
      "PaymentLinkCustomFieldDto": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentLinkCustomFieldsDto"
            }
          }
        }
      },
      "PaymentLinkChainDto": {
        "type": "object",
        "properties": {
          "chainId": {
            "type": "number",
            "example": 1,
            "description": "Chain id"
          },
          "isPreferred": {
            "type": "boolean",
            "description": "Is this chain preferred. If yes then it will be selected by default on checkout page"
          }
        },
        "required": [
          "chainId",
          "isPreferred"
        ]
      },
      "PaymentLinkDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "description": "Organization's id"
          },
          "type": {
            "description": "Payment link type",
            "$ref": "#/components/schemas/LinkType"
          },
          "amount": {
            "format": "int64",
            "type": "integer",
            "example": "9223372036854775807",
            "description": "Amount to take from user in 8 decimal places. If not provided then user can enter any amount"
          },
          "currency": {
            "description": "Amount's . This field is deprecated and will be removed in future versions. Use currencies and preferredCurrency instead.",
            "deprecated": true,
            "$ref": "#/components/schemas/CryptoCurrency"
          },
          "currencies": {
            "type": "array",
            "description": "Currencies in which amount is to be taken",
            "items": {
              "$ref": "#/components/schemas/CryptoCurrency"
            }
          },
          "preferredCurrency": {
            "description": "Preferred currency. If provided then it will be selected by default on checkout page",
            "$ref": "#/components/schemas/CryptoCurrency"
          },
          "title": {
            "type": "string",
            "description": "Payment link title"
          },
          "description": {
            "type": "string",
            "description": "Payment link description"
          },
          "image": {
            "type": "string",
            "description": "Payment link product image"
          },
          "publicImage": {
            "type": "string",
            "description": "Payment link product image with absolute public url"
          },
          "tags": {
            "description": "Payment link tags",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the payment link is currently active"
          },
          "nameCollection": {
            "type": "boolean",
            "description": "If true then take name from user"
          },
          "emailCollection": {
            "type": "boolean",
            "description": "If true then take email from user"
          },
          "phoneNumberCollection": {
            "type": "boolean",
            "description": "If true then take phone number from user"
          },
          "shippingAddressCollection": {
            "type": "boolean",
            "description": "If true then take shipping address from user"
          },
          "billingAddressCollection": {
            "type": "boolean",
            "description": "If true then take billing address from user"
          },
          "customFields": {
            "$ref": "#/components/schemas/PaymentLinkCustomFieldDto"
          },
          "submitType": {
            "description": "Payment link submit type",
            "$ref": "#/components/schemas/SubmitType"
          },
          "afterCompletion": {
            "description": "After completion action to perform on checkout page",
            "$ref": "#/components/schemas/AfterCompletionLink"
          },
          "afterCompletionRedirectUrl": {
            "type": "string",
            "description": "After completion redirect url to redirect user to after payment"
          },
          "afterCompletionConfirmMsg": {
            "type": "string",
            "description": "After completion confirmation message to show to user after payment"
          },
          "suggestedCurrency": {
            "description": "Suggested currency to take payment in",
            "$ref": "#/components/schemas/CryptoCurrency"
          },
          "suggestedAmounts": {
            "description": "Suggested amounts to show on checkout page if amount is not provided",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "productId": {
            "type": "string",
            "description": "Product id to take payment for"
          },
          "allowedChains": {
            "description": "Allowed chains to take payment from",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentLinkChainDto"
            }
          },
          "interval": {
            "description": "The interval at which to bill for this price. Only required for subscriptions",
            "$ref": "#/components/schemas/Interval"
          },
          "intervalCount": {
            "type": "number",
            "example": 1,
            "description": "It is used to determine the frequency at which the subscription is billed. Only required for subscriptions"
          },
          "priceType": {
            "description": "The type of the price",
            "$ref": "#/components/schemas/PriceType"
          },
          "allowPromotionCodes": {
            "type": "boolean",
            "description": "Enables user redeemable promotion codes."
          }
        },
        "required": [
          "id",
          "organizationId",
          "type",
          "title",
          "tags",
          "nameCollection",
          "emailCollection",
          "phoneNumberCollection",
          "shippingAddressCollection",
          "billingAddressCollection",
          "submitType",
          "afterCompletion",
          "priceType"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 181,
      "2": 177,
      "3": 27,
      "4": 23,
      "5": 171,
      "6": 139,
      "7": 0,
      "8": 127,
      "9": 93,
      "10": 212,
      "11": 76
    }
  }
}
```