Listing payment links

GET /api/public/v1/payment_links

This endpoint returns a list of payment links with pagination.

Headers

Name
Value

Content-Type

application/vnd.api+json

Authorization

Bearer <api_key>

URL Parameters

Name
Type
Description

order

string

Order in which the list of records should be returned. Can be created_at.

order_type

string

Order type. Can be either asc or desc.

page

number

Page for which you want to return records.

per_page

number

Number of records per page to return.

reference

number

Payment link reference.

Response Body

Name
Type
Description

data[].id

string

Payment link ID.

data[].type

string

Entity type returned. Always paymentLinks.

data[].attributes

object

Set of payment attributes.

data[].attributes.amount

string

Payment amount to display to end users.

data[].attributes.currency

string

Payment currency to display to end users. Refer to Supported currencies.

data[].attributes.accountCurrency

string

data[].attributes.network

string

Payment network code. E.g. trx:usdt. Refer to Supported currencies.

data[].attributes.networkName

string

Payment network name. E.g. Tron (TRC20). Refer to Supported currencies.

data[].attributes.reference

string

The custom reference ID to tie the payment to end-user.

data[].attributes.hostedPageUrl

The payment hosted page URL to redirect your end-users to.

data[].attributes.status

string

Payment link status context. Can be created, pending, completed, expired.

data[].attributes.network

string

Network code. Refer to Supported currencies.

data[].attributes.expiresAt

string

Payment link expiry date and time.

data[].attributes.createdAt

string

Date and time payment was created at.

data[].attributes.successRedirectUrl

string

URL you want your customer to be redirected from our hosted page to if the invoice completes.

data[].attributes.unsuccessRedirectUrl

string

URL you want your customer to be redirected from our hosted page to if the invoice gets expired, cancelled or rejected.

data[].relationships.target

object

This object will contain ID of the child Invoice or Payout generated by the Payment Link.

included[]

array

This array will contain data about the child Invoice or Payout generated by the Payment Link. For more details refer to Invoice and Payout pyaloads.

Response

{
  "data": [
    {
      "id": "1e1a0c1b-4af0-4e3d-ae87-e31776a60a2c",
      "type": "paymentLinks",
      "attributes": {
        "amount": "100.00",
        "currency": "EUR",
        "accountCurrency": "EUR",
        "network": null,
        "networkName": null,
        "reference": "8c40d8b6-ccdf-4861-a6d6-6c3125ce3f31",
        "hostedPageUrl": "https://sandbox.txn.pro/redirect?payment_link_id=1e1a0c1b-4af0-4e3d-ae87-e31776a60a2c\u0026request_type=payment_link_hosted_page",
        "status": "pending",
        "expiresAt": "2025-01-12T23:00:00.000Z",
        "createdAt": "2025-01-12T07:44:19.246Z",
        "paymentType": "Payout",
        "successRedirectUrl": "https://example.com/success",
        "unsuccessRedirectUrl": "https://example.com/fail"
      },
      "relationships": {
        "target": {
          "data": {
            "type": "payouts",
            "id": "1e1fe963-f7aa-4c06-bd81-8c9354227269"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "1e1fe963-f7aa-4c06-bd81-8c9354227269",
      "type": "payouts",
      "attributes": {
        "address": "TTbGTMwUwA3mncLP7xqCZei1ekaNSgeAJe",
        "expiresAt": "2025-01-12T07:46:57.342Z",
        "createdAt": "2025-01-12T07:46:27.342Z",
        "absorbFees": false,
        "reference": "8c40d8b6-ccdf-4861-a6d6-6c3125ce3f31",
        "status": "completed",
        "amount": "100.00",
        "currency": "EUR",
        "payCurrency": "USDT",
        "payAmount": "97.931154",
        "payNetwork": "ttrx:usdt",
        "payNetworkName": "Tron (TRC20)",
        "txid": "736121c4cbcba101d375a8936c4f27d203792f3fcb2da9ba064cb45f1940e63a",
        "networkFee": "2.500000",
        "networkFeeCurrency": "USDT",
        "payoutFee": "1.00",
        "payoutFeeCurrency": "EUR",
        "exchangeRate": "0.9857499"
      }
    }
  ],
  "meta": {
    "page": "2",
    "per_page": "1",
    "total": 26
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Last updated