Skip to main content
Version: 2019-05-29 (Current)

Retrieve a Link

Retrieve details for a specific payment link by its identifier. Returns the complete link object including charge history and usage status.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`link_id`STRING(required)
Link identifier matching pattern /link(_test)?_[0-9a-z]+/. This is provided in the URL path.
Example:"link_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must be a valid link ID

Responsesโ€‹

200

Successful retrieval

Link retrieved successfully. Returns the complete link object with all details.

Response includes:
  • payment_uri - Shareable URL for customer payment
  • used - Whether the single-use link has been consumed
  • charges - List of all charges made with this link
  • amount - Payment amount in smallest currency unit
  • currency - Currency code
  • title - Link title shown to customers
  • description - Link description and details

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Link not found with the provided ID.

Common causes:
  • Invalid link ID format
  • Link does not exist
  • Link belongs to different account
  • Using test key with live link ID (or vice versa)

Code samplesโ€‹

curl https://api.omise.co/links/link_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundLink not foundCheck link ID is correct and exists
invalid_link_idMalformed link IDEnsure ID matches format link(test)?[0-9a-z]+
FieldTypeDescription
objectstringAlways returns "link"
idstringUnique link identifier
livemodebooleanProduction vs test environment indicator
payment_uristringShareable payment URL
amountintegerTransaction value in smallest currency unit
currencystringISO currency code
usedbooleanSingle-use link consumption status
multiplebooleanReusability flag
titlestringLink title
descriptionstringLink description
chargeslistAssociated payment transactions
created_atstringCreation timestamp (ISO 8601)

Try it outโ€‹

Required - 1 fields
โ–ผ