---
title: "Retrieve Payment Link"
source_url: https://docs.rapyd.net/en/retrieve-payment-link.html
lang: en
---

# Retrieve Payment Link

Retrieve details of a payment link.

> **Note:**
>
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors").
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

### Parameters

### Request Path Parameters

- - payment_link
  - ID of the payment link. String starting with **hp_reuse_**.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - amount
  - The amount of the payment, in units of the currency defined in `currency`. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015.

    On the hosted payment page, the customer:

    - Cannot modify the amount when `amount_is_editable` is **false** or not used.
    - Can modify the amount when `amount_is_editable` is **true** and `amount` has a positive value.
    - Must enter an amount when `amount_is_editable` is **true** and `amount` is **0**, **null**, or not used.
- - amount_is_editable
  - Determines whether the customer can edit the amount.

    - **true** - The customer can edit the amount.
    - **false** - The customer cannot edit the amount.
- - country
  - The two-letter ISO 3166-1 ALPHA-2 code for the country.
- - currency
  - - **Transactions without FX** - Indicates the currency of the amount received by the recipient.
    - **FX transactions** - Indicates the currency of the amount paid by the buyer.
- - customer
  - ID of a specific customer. String starting with **cus_**. Restricts the payment link to the customer.
- - fixed_side
  - Indicates whether the FX rate is fixed for the buy side (seller) or for the sell side (buyer).

    - **buy** - The currency that the Rapyd Wallet receives for goods or services. Fixed side buy relates to the seller (merchant) funds. For example, a US-based merchant wants to charge 100 USD. The buyer (customer) pays the amount in MXN that converts to 100 USD.
    - **sell** - The currency that the buyer is charged for purchasing goods or services. Fixed side sell relates to the buyer (customer) funds. For example, a US-based merchant wants to charge a buyer 2,000 MXN and will accept whatever amount in USD that is converted from 2,000 MXN.
- - id
  - ID of the payment link. String starting with **hp_reuse_**.
- - language
  - Determines the default language of the hosted page. For a list of values, see [List Supported Languages](https://docs.rapyd.net/en/list-supported-languages.md "List Supported Languages").

    - When this parameter is null, the language of the user's browser is used.
    - If the language of the user's browser cannot be determined, the default language is English.
- - max_payments
  - Indicates the maximum number of times that the payment link can be used for payments. When not defined, there is no limit.
- - merchant_alias
  - Client's name.

    Rapyd
- - merchant_color
  - Color of the call-to-action (CTA) button on the hosted page.

    To configure this field, use the Client Portal. See [Customizing Your Hosted Page](https://docs.rapyd.net/en/customizing-your-hosted-page.md "Customizing Your Hosted Page").
- - merchant_customer_support
  - Contains details of the client’s customer support. To configure these fields, use the Client Portal. See [Customizing Your Hosted Page](https://docs.rapyd.net/en/customizing-your-hosted-page.md "Customizing Your Hosted Page").

    - - email
      - Email address.
    - - url
      - URL for the client's customer support service.
    - - phone_number
      - Phone number for contacting the client's customer support service.
- - merchant_logo
  - URL for the image of the client's logo.

    To configure this field, use the Client Portal. See [Customizing Your Hosted Page](https://docs.rapyd.net/en/customizing-your-hosted-page.md "Customizing Your Hosted Page").
- - merchant_privacy_policy
  - URL for the terms and conditions of the agreement between the client and the client’s customers.

    To configure this field, use the Client Portal. See [Customizing Your Hosted Page](https://docs.rapyd.net/en/customizing-your-hosted-page.md "Customizing Your Hosted Page").
- - merchant_reference_id
  - Identifier defined by the client for reference purposes. Limit: 45 characters.
- - merchant_terms
  - URL for the client's terms and conditions.

    To configure this field, use the Client Portal.
- - merchant_wallet
  - ID of the Rapyd wallet that serves as the merchant's wallet. String starting with **ewallet_**. Restricted to Payment Facilitator (PayFac). See also the 'Create Payment Link with merchant wallet' sample on this page.
- - merchant_website
  - The URL where the customer is redirected after exiting the hosted page.

    Relevant when one or both of the following fields is unset:

    - `cancel_url`
    - `complete_url`

    To configure this field, use the Client Portal. See [Customizing Your Hosted Page](https://docs.rapyd.net/en/customizing-your-hosted-page.md "Customizing Your Hosted Page").
- - page_expiration
  - End of the time when the customer can use the payment link, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time"). One year after creation.

    > **Note:**
    >
    > Each hosted page that the payment link generates expires 14 days after creation.
- - requested_currency
  - Currency for one side of an FX transaction. Three-letter ISO 4217 code.

    - When `fixed_side` is **sell**, it is the currency received in the Rapyd Wallet.
    - When `fixed_side` is **buy**, it is the currency charged to the buyer (customer).
- - redirect_url
  - The payment link URL.
- - status
  - Status of the hosted payment page. One of the following:

    - **NEW** - The hosted page was created.
    - **EXP** - The hosted page expired.
- - template
  - Optional parameters for the checkout page.

### Code Samples

- - .NET

    - ```csharp
      using System;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string id = "hp_reuse_44298a945030cbd9e8347383ac9c0c80";

                      string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/hosted/collect/payments/{id}");

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const result = await makeRequest(
            'GET',
            '/v1/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80'
          );

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }onst makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const body = {
            currency: 'USD',
            customer: 'cus_b3b8ad0174f4c415c663b35bcf542192',
            metadata: {
              merchant_defined: true
            },
            amount: 10
          };
          const result = await makeRequest('POST', '/v1/invoice_items', body);

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php
      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      try {
          $object = make_request('get', '/v1/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80');
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      id = "hp_reuse_44298a945030cbd9e8347383ac9c0c80"
      response = make_request(method='get',
                              path=f'/v1/hosted/collect/payments/{id}')

      pprint(response)?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      try {
          $object = make_request('get', '/v1/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80');
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>rom pprint import pprint

      from utilities import make_request

      invoice_item = {
          "currency": "USD",
          "customer": "cus_b3b8ad0174f4c415c663b35bcf542192",
          "metadata": {
              "merchant_defined": True
          },
          "amount": 10
      }
      result = make_request(method='post', path='/v1/invoice_items', body=invoice_item)
      pprint(result)
      ```

- /v1/hosted/collect/payments/:payment_link

- Retrieve Payment Link
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/hosted/collect/payments/hp_reuse_8214bae0231646e3080eff4a84b96941' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "26c00e15-235c-43f5-ac25-432b53cacaa1"
      },
      "data": {
          "id": "hp_reuse_8214bae0231646e3080eff4a84b96941",
          "amount": 100,
          "currency": "GBP",
          "country": "GB",
          "amount_is_editable": false,
          "merchant_reference_id": "payment link",
          "template": {
              "error_payment_url": "https://error.rapyd.com",
              "complete_payment_url": "https://complete.rapyd.com"
          },
          "amount_range_per_currency_mapping": {
              "GBP": {
                  "min_amount": 0,
                  "max_amount": 1.7976931348623157e+308
              }
          },
          "customer": "",
          "requested_currency": null,
          "fixed_side": null,
          "max_payments": 3,
          "status": "NEW",
          "language": "en",
          "org_id": "153e08b8-4bf3-4cb9-bb03-79d405eaed2a",
          "merchant_color": "323fff",
          "merchant_logo": "",
          "merchant_website": "https://example1234.net",
          "merchant_customer_support": {
              "url": "https://example1234.net",
              "email": "support@example1234.net",
              "phone_number": "121255551213"
          },
          "merchant_alias": "Doc Team",
          "merchant_terms": "https://example1234.net/terms_and_conditions",
          "merchant_privacy_policy": "https://example1234.net/privacy_policy",
          "page_expiration": 1795434913,
          "redirect_url": "https://sandboxcheckout.rapyd.net/collect/payments?token=hp_reuse_8214bae0231646e3080eff4a84b96941",
          "region": "EMEA",
          "geo_country": "IL",
          "type": "CHECKOUT",
          "page_type": "REUSABLE_LINK"
      }
  }
  ```

- Bad Request - Link ID Not Found
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/hosted/collect/payments/hp_reuse_b6e8a4381d137273572d371e2278587' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_HOSTED_PAGE_GET_REUSABLE_LINK_PAGE",
          "status": "ERROR",
          "message": "Please contact Rapyd Client Support.",
          "response_code": "ERROR_HOSTED_PAGE_GET_REUSABLE_LINK_PAGE",
          "operation_id": "f9d8b732-846e-45dc-9f03-11c3d48f119b"
      }
  }
  ```

- Bad Request - Link ID Missing
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/hosted/collect/payments' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_PARSE_PAGE_TOKEN",
          "status": "ERROR",
          "message": "Please contact Rapyd Client Support.",
          "response_code": "ERROR_PARSE_PAGE_TOKEN",
          "operation_id": "31b460a3-82ad-46c0-92cf-f2a5093205b6"
      }
  }
  ```
