---
title: GET Payment Link
slug: get-payment-link
icon: 🟦
createdAt: 2022-03-23T02:29:36.000Z
---

Get the link to send to your patient.  This link will take them to a white-listed version of iCorePay to complete their payment.  After they pay, we will send a **Webhook** (documented later) to update your system with the status of orders and/or payment transactions.

Use this instead of (or in conjuction with) **SEND Payment Link** if you want to control how the link is delivered and/or displayed

From your backend code, get the patient link using your API key and Order ID.  There are two types of link, the regular link will allow the patient 3 chances to hit the URL or 72 hours.  If they do not pay after 3 hits to the URL (or 72 hours later), they will have a button to send a new link to the email address provided in the Create Order API call above.  &#x20;

Every time the below API call is made, it increases the number of retries for a patient (e.g. from 3 to 4).&#x20;

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://gfp-api.acdev.io/api/v1/orders/{orderId}/payment-link",
  "name": "Get Payment Link",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "SETbcxdu_4s8ZB8lUNoHb",
        "code": "{\n    \"patientLink\": \"https://gfp-pay.acdev.io/invoice/01FDW69FYZCGKQS9BY0G1W25CM/01FDZF7CAZS9SQYVFEAHJ2ZNN8\",\n    \"expires\":\"2022-03-26T21:53:07.236242\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "SETbcxdu_4s8ZB8lUNoHb"
  },
  "examples": {
    "languages": [
      {
        "id": "cXzMcrZoqg6XNbeRLOYoX",
        "code": "curl --request GET \\\n  --url 'https://gfp-api.acdev.io/api/v1/orders/:orderId/payment-link' \\\n  --header 'content-type: application/json;charset=UTF-8' \\\n  --header 'accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "cXzMcrZoqg6XNbeRLOYoX"
  },
  "description": "Generete a Payment Link to send to Patient",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

The short link on the other hand requires additional verification from the patient; zip code, email or phone number depending on what details are available on the order. This link does not expire.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://gfp-api.acdev.io/api/v1/orders/{orderId}/payment-link-short-url",
  "name": "Get Payment Link (short)",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "SETbcxdu_4s8ZB8lUNoHb",
        "code": "{\n    \"patientLink\": \"https://gfp-pay.acdev.io/p/krukmDdeTq\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "SETbcxdu_4s8ZB8lUNoHb"
  },
  "examples": {
    "languages": [
      {
        "id": "cXzMcrZoqg6XNbeRLOYoX",
        "code": "curl --request GET \\\n  --url 'https://gfp-api.acdev.io/api/v1/orders/:orderId/payment-link-short-url' \\\n  --header 'content-type: application/json;charset=UTF-8' \\\n  --header 'accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "cXzMcrZoqg6XNbeRLOYoX"
  },
  "description": "Generete a Payment Link to send to Patient",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



