Manage a payment

Let's look at some of the features available for managing a payment object. The endpoint list below demonstrates how various APIs can be used to manage payments.

Apply filters

You can apply a filter using the endpoint /payments/filter and some optional request parameters.

We'll show you how you can filter the payment list to get all the paid payments.

Request

{
  "status": [
    "paid"
  ],
  "limit": 20
}

Request parameters

For more information on other optional parameters you can apply, please refer to the below-mentioned table.

ParameterTypeDescription
idsarray_stringIn this parameter, you specify an array of ids of the payments through which you want to filter the list of payments.
statusarray_stringIn this parameter, you specify an array of statuses for which the list should be filtered.
amountobjectSpecify the amount as a value in one of the following mutually
exclusive sub-parameters to get a filtered list based on that amount.

GtAll payments with an amount greater than this will be returned.
ltAll payments with an amount less than this will be returned.
GteAll payments with an amount greater than and equal to this will be returned.
lteAll payments with an amount less than and equal to this will be returned.
currencyarray_stringIn this parameter, you specify an array of currencies for which payments should be filtered. A three-lettered ISO-compliant currency name must be used.
target_amountobjectSpecify the target amount as a value in one of the following manually exclusive sub-parameters to get a filtered list based on that target amount.

GtAll payments with a target amount greater than this will be returned.
ltAll payments with a target amount less than this will be returned.
GteAll payments with a target amount greater than and equal to this will be returned.
lteAll payments with a target amount less than and equal to this will be returned.
target_currencyarray_stringIn this parameter, you specify an array of target currencies for which payments should be filtered.
target_amount_paidobjectSpecify the target amount paid as a value in one of the following manually exclusive sub-parameters to get a filtered list based on the target amount paid.

GtAll payments with a target_amount_paid greater than this will be returned.
ltAll payments with a target_amount_paid less than this will be returned.
GteAll payments with a target_amount_paid greater than and equal to this will be returned.
lteAll payments with a target_amount_paid less than and equal to this will be returned.
limitintA limit specifies the number of objects to be returned. The default and maximum page size have 10 objects per page, and it is consistent across endpoints.
starting_afterstringThis is one of the pagination parameters. Enter the ID of any object here to retrieve the next page of the list starting after the ID you specified. Starting after and ending before are mutually exclusive and can only be used once.
ending_beforestringThis is one of the pagination parameters. Enter the ID of any object here to retrieve the previous page of the list ending before the ID you specified. Starting after and ending before are mutually exclusive and can only be used once.
createdobjectSpecify a timestamp as a value in one of the following mutually
exclusive sub-parameters to get a filtered list based on the time they were created.

GtAll payments created after the specified timestamp will be returned.
lt All payments created before the specified timestamp will be returned.
GteAll payments created after and on the specified timestamp will be returned.
lteAll payments created before and on the specified timestamp will be returned.

Request headers

As of now, there are two versions (2022-04-15 and 2022-10-15). Version 2022-10-15 supports both on-chain and lightning payment methods. Whereas the 2022-04-15 version only supports lightning payments. In this string header speed-version, you can specify any version you want with all of the above APIs.

Track payments

You can check the payment outcome on your web application, which provides detailed insights. Alternatively, you can configure notification webhooks to receive payment updates. Learn more about Webhook subscriptions.