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

List Link Charges

Retrieve a paginated list of all charges created from a specific payment link. Useful for tracking payments made through a particular link.

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
Pagination - 5 fieldsPagination Parameters

Responsesโ€‹

200

Successful retrieval

Charges list retrieved successfully. Returns a paginated list of charge objects.

Response structure:
  • object - Always returns "list"
  • data - Array of charge objects associated with the link
  • limit - Records per page
  • offset - Number of records skipped
  • total - Total number of charges for this link
  • order - Sort order applied
  • from - Start date filter applied
  • to - End date filter applied

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid date format (must be ISO 8601)
  • Invalid limit value (exceeds maximum)
  • Invalid order value
  • Malformed parameters

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)

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/links/link_test_5xuy4w91xqz7d1w9u0t/charges \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-G \
-d "limit=20" \
-d "offset=0" \
-d "order=reverse_chronological"

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]+
invalid_date_formatDate format validation failedUse ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)

Charge Object Fieldsโ€‹

FieldTypeDescription
objectstringAlways returns "charge"
idstringUnique charge identifier
livemodebooleanProduction vs test environment indicator
amountintegerTransaction value in smallest currency unit
currencystringISO currency code
statusstringCharge status (successful, failed, pending, etc.)
paidbooleanWhether the charge has been paid
linkstringAssociated link ID
created_atstringCreation timestamp (ISO 8601)

๐Ÿ”‘API Credentials

Try it outโ€‹

Required - 1 fields
โ–ผ
Additional - 5 fields
Your IP: ...Loading...