# Get a payment link by ID (/en/api-reference/payment-links/getPaymentLink)

Retrieves a payment link with all related data including:
- Line items with prices and products
- Custom fields with dropdown options
- After-completion settings

## GET /payment-links/{id}

### Parameters

- `id` (string, in: path, required) — Payment link ID

### Responses

#### 200 — Payment link retrieved successfully

Content type: `application/json`

- `id` (string, required) — Unique identifier for this Payment Link. Always prefixed with `plink_`.
- `object` (enum("payment_link"), required) — String identifying the object type. Always `payment_link` for this resource.
- `merchantId` (string, required) — Merchant ID
- `active` (boolean, required) — Whether the payment link is active
- `expiresAt` (string) — Expiration timestamp (ISO 8601)
- `currency` (enum("EGP" | "USD" | "EUR" | "GBP" | "SAR" | "AED" | "QAR" | "KWD" | "JOD" | "OMR" | "BHD" | "LYD" | "AUD" | "CAD" | "CNY"), required) — Currency
- `computedAmount` (number, required) — Computed total amount from line items
- `nameCollection` (boolean, required) — Whether to collect customer name
- `billingAddressCollection` (boolean, required) — Whether to collect billing address
- `shippingAddressCollection` (boolean, required) — Whether to collect shipping address
- `phoneNumberCollection` (boolean, required) — Whether to collect phone number
- `allowPromotionCodes` (boolean, required) — Whether to allow promotion codes
- `submitType` (enum("PAY" | "SUBSCRIBE" | "BOOK" | "DONATE"), required) — Submit type
- `customerCreation` (enum("always" | "if_required")) — When to create customer
- `afterCompletion` (AfterCompletionResponse) — After completion settings
  - `type` (enum("redirect" | "hosted_confirmation"), required) — After completion type
  - `redirect` (AfterCompletionRedirectResponse | null) — Redirect configuration
  - `hostedConfirmation` (AfterCompletionHostedConfirmationResponse | null) — Hosted confirmation configuration
- `lineItems` (Array<LineItem>, required) — Line items
  - `id` (string, required) — Line item ID
  - `quantity` (number, required) — Quantity; zero represents an optional item
  - `price` (Price, required)
    - `id` (string, required) — Price ID
    - `unitAmount` (number) — Unit amount in smallest currency units
    - `currency` (enum("EGP" | "USD" | "EUR" | "GBP" | "SAR" | "AED" | "QAR" | "KWD" | "JOD" | "OMR" | "BHD" | "LYD" | "AUD" | "CAD" | "CNY"), required) — Price currency
    - `type` (enum("ONE_TIME" | "RECURRING" | "CUSTOM"), required) — Price type
    - `recurring` (Recurring)
    - `customUnitAmount` (CustomUnitAmount)
    - `createdAt` (string (date-time), required) — Creation timestamp
    - `active` (boolean, required) — Whether the price is available; inline prices surface as active
    - `stock` (number | null) — Remaining stock; null means unlimited and negative means oversold
    - `startDate` (string (date-time) | null) — Earliest checkout availability
    - `expirationDate` (string (date-time) | null) — Checkout availability ends at this time
    - `product` (Product, required)
  - `adjustableQuantity` (AdjustableQuantity)
    - `enabled` (boolean, required) — Whether adjustable quantity is enabled
    - `minimum` (number | null) — Minimum quantity allowed
    - `maximum` (number | null) — Maximum quantity allowed
  - `amountSubtotal` (number) — Subtotal before discounts and taxes
  - `amountTotal` (number) — Total after discounts and taxes
  - `amountDiscount` (number) — Allocated discount
  - `amountTax` (number) — Allocated tax
  - `currency` (enum("EGP" | "USD" | "EUR" | "GBP" | "SAR" | "AED" | "QAR" | "KWD" | "JOD" | "OMR" | "BHD" | "LYD" | "AUD" | "CAD" | "CNY")) — Currency of this line's amount fields
  - `description` (string) — Line item description
  - `presentmentDetails` (LineItemPresentmentDetails)
    - `unitAmount` (number, required) — Unit amount in presentment smallest units
    - `amountSubtotal` (number, required) — Line subtotal in presentment smallest units
    - `amountDiscount` (number, required) — Allocated line discount in presentment smallest units
    - `amountTotal` (number, required) — Line total after discount and tax, in presentment smallest units
    - `currency` (enum("EGP" | "USD" | "EUR" | "GBP" | "SAR" | "AED" | "QAR" | "KWD" | "JOD" | "OMR" | "BHD" | "LYD" | "AUD" | "CAD" | "CNY"), required) — Presentment currency matching the session
- `customFields` (Array<CustomField> | null) — Custom fields
  - `key` (string, required) — Unique key for the field
  - `label` (string, required) — Field label
  - `type` (enum("TEXT" | "NUMBER" | "DROPDOWN" | "CHECKBOX"), required) — Field type
  - `isOptional` (boolean, required) — Whether the customer may omit this field
  - `hasLimits` (boolean | null) — Whether validation limits are enabled
  - `limitType` (enum("AT_MOST" | "BETWEEN" | "AT_LEAST" | "EXACTLY")) — Type of validation limit
  - `minCharacters` (number | null) — Minimum number of characters
  - `maxCharacters` (number | null) — Maximum number of characters
  - `dropdownOptions` (Array<DropdownOptionResponse> | null)
    - `label` (string, required) — Option label
  - `text` (CustomFieldTextValue | null)
  - `numeric` (CustomFieldNumericValue | null)
  - `dropdown` (CustomFieldDropdownValue | null)
- `feeConfig` (FeeSettings | null) — Fee configuration
- `metadata` (object) — Custom metadata
- `brandingSettings` (BrandingSettingsResponse | null) — Branding settings
- `paymentMethodConfigurationId` (string | null) — Payment method configuration ID
- `createdAt` (string, required) — Creation timestamp (ISO 8601)
- `updatedAt` (string, required) — Last update timestamp (ISO 8601)

#### 401 — Authentication is required and the request did not present a valid API key.

Content type: `application/json`

- `error` (ApiErrorBody, required) — Structured error body. Returned inside `error` on every 4xx/5xx response. Switch on `code` to handle specific failure modes programmatically; show `message` to your end user.
  - `type` (enum("invalid_request_error" | "authentication_error" | "rate_limit_error" | "api_error" | "card_error" | "idempotency_error"), required) — High-level error category. Use this for branching at the top level of your error handler (e.g. retry on `api_error`, surface a card decline on `card_error`).
  - `code` (enum("apple_pay_certificate_invalid" | "apple_pay_certificate_expired" | "apple_pay_certificate_key_mismatch" | "apple_pay_certificate_identifier_mismatch" | "apple_pay_registration_rejected" | "invalid_request" | "parameter_out_of_range" | "parameter_invalid" | "parameter_missing" | "parameter_unknown" | "parameters_exclusive" | "parameter_requires_another" | "validation_error" | "resource_missing" | "resource_invalid_state" | "resource_already_exists" | "resource_in_use" | "merchant_conversion_owners_not_allowed" | "authentication_required" | "invalid_api_key" | "api_key_inactive" | "invalid_signature" | "merchant_not_activated" | "permission_denied" | "two_factor_required" | "checkout_session_expired" | "invalid_client_secret" | "livemode_mismatch" | "amount_reconfirmation_required" | "creation_failed" | "payment_still_confirming" | "payment_already_completed" | "payment_link_inactive" | "payment_link_expired" | "amount_invalid" | "currency_invalid" | "product_archived" | "price_inactive" | "price_not_yet_active" | "price_expired" | "price_sold_out" | "price_date_range_invalid" | "price_stock_invalid" | "price_recurring_not_supported" | "price_immutable_while_used" | "line_item_missing_price" | "line_item_quantity_not_adjustable" | "line_item_quantity_out_of_bounds" | "line_item_quantity_not_supported_for_custom" | "checkout_empty_cart" | "promotion_codes_not_allowed" | "promotion_code_not_found" | "promotion_code_inactive" | "promotion_code_expired" | "promotion_code_max_redemptions" | "promotion_code_customer_mismatch" | "promotion_code_minimum_amount" | "promotion_code_first_time_only" | "coupon_invalid" | "coupon_currency_mismatch" | "coupon_minimum_amount" | "coupon_customer_max_redemptions" | "too_many_discounts" | "payment_method_corrupted" | "payment_method_customer_mismatch" | "payment_intent_customer_mismatch" | "payment_method_mismatch" | "charge_not_captured" | "merchant_no_balance" | "insufficient_balance" | "charge_missing_balance_transaction" | "charge_missing_fee_data" | "charge_incomplete_fee_data" | "cannot_rename_default" | "must_have_enabled_method" | "cannot_delete_default" | "configuration_in_use" | "unsupported_currency" | "exchange_rate_not_found" | "coupon_in_use" | "promotion_code_exists" | "rate_limit" | "idempotency_key_in_use" | "internal_error" | "request_timeout")) — Stable, machine-readable code identifying the specific failure (e.g. `resource_missing`, `parameter_invalid`, `authentication_required`). Always present on documented errors. See the API Error Codes reference for the full list.
  - `message` (string, required) — Human-readable description of what went wrong. Safe to log or display, but not stable — use `code` for programmatic branching.
  - `param` (string) — Name of the request parameter that caused the error, when applicable (e.g. `amount`, `currency`).
  - `doc_url` (string) — URL to the documentation page for this specific error code. Deep-linked into the API Error Codes reference.
- `request_id` (string) — Unique identifier for this request, propagated to logs and traces. Include it when contacting support.

#### 403 — The credential is valid but lacks the permission this endpoint requires. Check the API key's allowed permissions in the dashboard.

Content type: `application/json`

- `error` (ApiErrorBody, required) — Structured error body. Returned inside `error` on every 4xx/5xx response. Switch on `code` to handle specific failure modes programmatically; show `message` to your end user.
  - `type` (enum("invalid_request_error" | "authentication_error" | "rate_limit_error" | "api_error" | "card_error" | "idempotency_error"), required) — High-level error category. Use this for branching at the top level of your error handler (e.g. retry on `api_error`, surface a card decline on `card_error`).
  - `code` (enum("apple_pay_certificate_invalid" | "apple_pay_certificate_expired" | "apple_pay_certificate_key_mismatch" | "apple_pay_certificate_identifier_mismatch" | "apple_pay_registration_rejected" | "invalid_request" | "parameter_out_of_range" | "parameter_invalid" | "parameter_missing" | "parameter_unknown" | "parameters_exclusive" | "parameter_requires_another" | "validation_error" | "resource_missing" | "resource_invalid_state" | "resource_already_exists" | "resource_in_use" | "merchant_conversion_owners_not_allowed" | "authentication_required" | "invalid_api_key" | "api_key_inactive" | "invalid_signature" | "merchant_not_activated" | "permission_denied" | "two_factor_required" | "checkout_session_expired" | "invalid_client_secret" | "livemode_mismatch" | "amount_reconfirmation_required" | "creation_failed" | "payment_still_confirming" | "payment_already_completed" | "payment_link_inactive" | "payment_link_expired" | "amount_invalid" | "currency_invalid" | "product_archived" | "price_inactive" | "price_not_yet_active" | "price_expired" | "price_sold_out" | "price_date_range_invalid" | "price_stock_invalid" | "price_recurring_not_supported" | "price_immutable_while_used" | "line_item_missing_price" | "line_item_quantity_not_adjustable" | "line_item_quantity_out_of_bounds" | "line_item_quantity_not_supported_for_custom" | "checkout_empty_cart" | "promotion_codes_not_allowed" | "promotion_code_not_found" | "promotion_code_inactive" | "promotion_code_expired" | "promotion_code_max_redemptions" | "promotion_code_customer_mismatch" | "promotion_code_minimum_amount" | "promotion_code_first_time_only" | "coupon_invalid" | "coupon_currency_mismatch" | "coupon_minimum_amount" | "coupon_customer_max_redemptions" | "too_many_discounts" | "payment_method_corrupted" | "payment_method_customer_mismatch" | "payment_intent_customer_mismatch" | "payment_method_mismatch" | "charge_not_captured" | "merchant_no_balance" | "insufficient_balance" | "charge_missing_balance_transaction" | "charge_missing_fee_data" | "charge_incomplete_fee_data" | "cannot_rename_default" | "must_have_enabled_method" | "cannot_delete_default" | "configuration_in_use" | "unsupported_currency" | "exchange_rate_not_found" | "coupon_in_use" | "promotion_code_exists" | "rate_limit" | "idempotency_key_in_use" | "internal_error" | "request_timeout")) — Stable, machine-readable code identifying the specific failure (e.g. `resource_missing`, `parameter_invalid`, `authentication_required`). Always present on documented errors. See the API Error Codes reference for the full list.
  - `message` (string, required) — Human-readable description of what went wrong. Safe to log or display, but not stable — use `code` for programmatic branching.
  - `param` (string) — Name of the request parameter that caused the error, when applicable (e.g. `amount`, `currency`).
  - `doc_url` (string) — URL to the documentation page for this specific error code. Deep-linked into the API Error Codes reference.
- `request_id` (string) — Unique identifier for this request, propagated to logs and traces. Include it when contacting support.

#### 404 — The payment link ID does not exist in this account / mode.

Content type: `application/json`

- `error` (ApiErrorBody, required) — Structured error body. Returned inside `error` on every 4xx/5xx response. Switch on `code` to handle specific failure modes programmatically; show `message` to your end user.
  - `type` (enum("invalid_request_error" | "authentication_error" | "rate_limit_error" | "api_error" | "card_error" | "idempotency_error"), required) — High-level error category. Use this for branching at the top level of your error handler (e.g. retry on `api_error`, surface a card decline on `card_error`).
  - `code` (enum("apple_pay_certificate_invalid" | "apple_pay_certificate_expired" | "apple_pay_certificate_key_mismatch" | "apple_pay_certificate_identifier_mismatch" | "apple_pay_registration_rejected" | "invalid_request" | "parameter_out_of_range" | "parameter_invalid" | "parameter_missing" | "parameter_unknown" | "parameters_exclusive" | "parameter_requires_another" | "validation_error" | "resource_missing" | "resource_invalid_state" | "resource_already_exists" | "resource_in_use" | "merchant_conversion_owners_not_allowed" | "authentication_required" | "invalid_api_key" | "api_key_inactive" | "invalid_signature" | "merchant_not_activated" | "permission_denied" | "two_factor_required" | "checkout_session_expired" | "invalid_client_secret" | "livemode_mismatch" | "amount_reconfirmation_required" | "creation_failed" | "payment_still_confirming" | "payment_already_completed" | "payment_link_inactive" | "payment_link_expired" | "amount_invalid" | "currency_invalid" | "product_archived" | "price_inactive" | "price_not_yet_active" | "price_expired" | "price_sold_out" | "price_date_range_invalid" | "price_stock_invalid" | "price_recurring_not_supported" | "price_immutable_while_used" | "line_item_missing_price" | "line_item_quantity_not_adjustable" | "line_item_quantity_out_of_bounds" | "line_item_quantity_not_supported_for_custom" | "checkout_empty_cart" | "promotion_codes_not_allowed" | "promotion_code_not_found" | "promotion_code_inactive" | "promotion_code_expired" | "promotion_code_max_redemptions" | "promotion_code_customer_mismatch" | "promotion_code_minimum_amount" | "promotion_code_first_time_only" | "coupon_invalid" | "coupon_currency_mismatch" | "coupon_minimum_amount" | "coupon_customer_max_redemptions" | "too_many_discounts" | "payment_method_corrupted" | "payment_method_customer_mismatch" | "payment_intent_customer_mismatch" | "payment_method_mismatch" | "charge_not_captured" | "merchant_no_balance" | "insufficient_balance" | "charge_missing_balance_transaction" | "charge_missing_fee_data" | "charge_incomplete_fee_data" | "cannot_rename_default" | "must_have_enabled_method" | "cannot_delete_default" | "configuration_in_use" | "unsupported_currency" | "exchange_rate_not_found" | "coupon_in_use" | "promotion_code_exists" | "rate_limit" | "idempotency_key_in_use" | "internal_error" | "request_timeout")) — Stable, machine-readable code identifying the specific failure (e.g. `resource_missing`, `parameter_invalid`, `authentication_required`). Always present on documented errors. See the API Error Codes reference for the full list.
  - `message` (string, required) — Human-readable description of what went wrong. Safe to log or display, but not stable — use `code` for programmatic branching.
  - `param` (string) — Name of the request parameter that caused the error, when applicable (e.g. `amount`, `currency`).
  - `doc_url` (string) — URL to the documentation page for this specific error code. Deep-linked into the API Error Codes reference.
- `request_id` (string) — Unique identifier for this request, propagated to logs and traces. Include it when contacting support.

#### 500 — Something went wrong on our end. Safe to retry idempotent requests; for non-idempotent calls, consult the `request_id` before resubmitting.

Content type: `application/json`

- `error` (ApiErrorBody, required) — Structured error body. Returned inside `error` on every 4xx/5xx response. Switch on `code` to handle specific failure modes programmatically; show `message` to your end user.
  - `type` (enum("invalid_request_error" | "authentication_error" | "rate_limit_error" | "api_error" | "card_error" | "idempotency_error"), required) — High-level error category. Use this for branching at the top level of your error handler (e.g. retry on `api_error`, surface a card decline on `card_error`).
  - `code` (enum("apple_pay_certificate_invalid" | "apple_pay_certificate_expired" | "apple_pay_certificate_key_mismatch" | "apple_pay_certificate_identifier_mismatch" | "apple_pay_registration_rejected" | "invalid_request" | "parameter_out_of_range" | "parameter_invalid" | "parameter_missing" | "parameter_unknown" | "parameters_exclusive" | "parameter_requires_another" | "validation_error" | "resource_missing" | "resource_invalid_state" | "resource_already_exists" | "resource_in_use" | "merchant_conversion_owners_not_allowed" | "authentication_required" | "invalid_api_key" | "api_key_inactive" | "invalid_signature" | "merchant_not_activated" | "permission_denied" | "two_factor_required" | "checkout_session_expired" | "invalid_client_secret" | "livemode_mismatch" | "amount_reconfirmation_required" | "creation_failed" | "payment_still_confirming" | "payment_already_completed" | "payment_link_inactive" | "payment_link_expired" | "amount_invalid" | "currency_invalid" | "product_archived" | "price_inactive" | "price_not_yet_active" | "price_expired" | "price_sold_out" | "price_date_range_invalid" | "price_stock_invalid" | "price_recurring_not_supported" | "price_immutable_while_used" | "line_item_missing_price" | "line_item_quantity_not_adjustable" | "line_item_quantity_out_of_bounds" | "line_item_quantity_not_supported_for_custom" | "checkout_empty_cart" | "promotion_codes_not_allowed" | "promotion_code_not_found" | "promotion_code_inactive" | "promotion_code_expired" | "promotion_code_max_redemptions" | "promotion_code_customer_mismatch" | "promotion_code_minimum_amount" | "promotion_code_first_time_only" | "coupon_invalid" | "coupon_currency_mismatch" | "coupon_minimum_amount" | "coupon_customer_max_redemptions" | "too_many_discounts" | "payment_method_corrupted" | "payment_method_customer_mismatch" | "payment_intent_customer_mismatch" | "payment_method_mismatch" | "charge_not_captured" | "merchant_no_balance" | "insufficient_balance" | "charge_missing_balance_transaction" | "charge_missing_fee_data" | "charge_incomplete_fee_data" | "cannot_rename_default" | "must_have_enabled_method" | "cannot_delete_default" | "configuration_in_use" | "unsupported_currency" | "exchange_rate_not_found" | "coupon_in_use" | "promotion_code_exists" | "rate_limit" | "idempotency_key_in_use" | "internal_error" | "request_timeout")) — Stable, machine-readable code identifying the specific failure (e.g. `resource_missing`, `parameter_invalid`, `authentication_required`). Always present on documented errors. See the API Error Codes reference for the full list.
  - `message` (string, required) — Human-readable description of what went wrong. Safe to log or display, but not stable — use `code` for programmatic branching.
  - `param` (string) — Name of the request parameter that caused the error, when applicable (e.g. `amount`, `currency`).
  - `doc_url` (string) — URL to the documentation page for this specific error code. Deep-linked into the API Error Codes reference.
- `request_id` (string) — Unique identifier for this request, propagated to logs and traces. Include it when contacting support.