Payment Links

The Payment Links API allows you to manage payment links within your Rebill account. You can retrieve payment links, update them and create new ones. You can also create instant payment links in order to make instant charges.


GET/v2/payment-links

Get a list of all the payment links from your organization and a summary of their related plans/products.

Optional Query Parameters

    statusstring
    typestring
    orderstring
    searchstring
    pagestring
    takejson

Loading...

Response

  {
    "data": [
        {
            "linked": {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "type": "recurring",
                "prices": [
                    {
                        "amount": 15000,
                        "currency": "MXN",
                        "paymentMethods": [
                            "CARD",
                            "TRANSFER"
                        ]
                    }
                ],
                "name": "Subscription Service"
            },
            "id": "XXXXXXX-ef56-7890-gh12-ij34kl567mn8",
            "privateDescription": "Monthly subscription for premium webinars",
            "successUrl": "https://example.com/success",
            "expiration": "2024-12-31T23:59:59.999Z",
            "createdAt": "2024-01-01T00:00:00.000Z",
            "status": "active",
            "paymentLinkUrl": "payment link URL"
        },
        // more payment links...
    ],
    "meta": {
        "page": 1,
        "take": 2,
        "itemCount": 2,
        "pageCount": 1,
        "hasPreviousPage": false,
        "hasNextPage": false
    }
}


GET/v2/payment-links/{paymentLinkId}

Get a payment link by its ID.

Required Path Parameters

    paymentLinkIdstringrequired

Loading...

Response

  {
    {
      "linked": {
          "id": "abcd1234-ef56-7890-gh12-ij34kl567mn8",
          "name": "Test",
          "createdAt": "2024-01-01T12:00:00.000Z",
          "type": "one-time",
          "prices": [
              {
                  "amount": 30000,
                  "currency": "COP",
                  "paymentMethods": [
                      "CARD",
                      "CASH",
                      "TRANSFER"
                  ]
              }
          ]
      },
      "id": "XXaqqf1234-qr56-st90-uv12-wx34yz567za9",
      "privateDescription": "Example description",
      "successUrl": "https://example.com/success",
      "expiration": "2024-12-31T23:59:59.999Z",
      "createdAt": "2024-01-15T12:00:00.000Z",
      "status": "pending",
      "customFields": [
          "PHONE_NUMBER",
          "PERSONAL_ID",
          "BILLING_ADDRESS",
          "DISCOUNT_CODE"
      ],
      "paymentLinkUrl": "payment link URL"
  }
}

GET/v2/payment-links/plan/{planId}

Get a list of all the payment links from your organization related to a specific plan.

Required Path Parameters

    planIdstringrequired

Optional Query Parameters

    statusstring
    typestring
    orderstring
    searchstring
    pagestring
    takejson

Loading...

Response

  {
    "data": [
        {
            "linked": {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "type": "recurring",
                "prices": [
                    {
                        "amount": 15000,
                        "currency": "MXN",
                        "paymentMethods": [
                            "CARD",
                            "TRANSFER"
                        ]
                    }
                ],
                "name": "Subscription Service"
            },
            "id": "XXXXXXX-ef56-7890-gh12-ij34kl567mn8",
            "privateDescription": "Monthly subscription for premium webinars",
            "successUrl": "https://example.com/success",
            "expiration": "2024-12-31T23:59:59.999Z",
            "createdAt": "2024-01-01T00:00:00.000Z",
            "status": "active",
            "paymentLinkUrl": "payment link URL"
        },
        // more payment links...
    ],
    "meta": {
        "page": 1,
        "take": 2,
        "itemCount": 2,
        "pageCount": 1,
        "hasPreviousPage": false,
        "hasNextPage": false
    }
}


POST/v2/payment-links/plan

Create a new payment link associated with a specific plan in your organization.

Required Parameters

    planIdstringrequired

Optional Parameters

    customFieldsarray of strings
    privateDescriptionstring
    expirationdatetime
    successUrlstring
    paymentMethodsarray of strings

Loading...

Response

  {
    "id": "5555fd46-0726-4840-8c12-783353800b4c"
}

POST/v2/payment-links/product

Create a new payment link associated with a specific product in your organization.

Required Parameters

    productIdstringrequired

Optional Parameters

    customFieldsarray of strings
    privateDescriptionstring
    expirationdatetime
    successUrlstring
    paymentMethodsarray of strings

Loading...

Response

  {
    "id": "5555fd46-0726-4840-8c12-783353800b4c"
}

POST/v2/payment-links/instant

Create an instant payment link. Instant payment links are not related to any plan or product.

Required Parameters

    pricesarray of objectsrequired

Optional Parameters

    customFieldsarray of strings
    privateDescriptionstring
    expirationdatetime
    successUrlstring
    titlestring
    descriptionstring

Loading...

Response

  {
      "id": "example1234-5678-90ab-cdef-ghijklmnop"
  }

PUT/v2/payment-links/{paymentLinkId}

Use this endpoint to make changes to attributes like expiration, success URL, and payment methods allowed.

Required Path Parameters

    paymentLinkIdstringrequired

Required Body Parameters

    pausedbooleanrequired

Optional Parameters

    customFieldsarray of strings
    privateDescriptionstring
    expirationdatetime
    successUrlstring
    paymentMethodsarray of strings

Loading...

Response

    {
      "id": "example1234-5678-90ab-cdef-ghijklmnop"
  }

Was this page helpful?