Payments API

Search & list payments

Retrieve a list of your payments. Results are paginated, they will only return up to 100 payments maximum. To access the next page of result, set the `cursor` query parameter to the value of `nextCursor` in your current result payload. Use `prevCursor` to go back to the previous page. **Note:** this endpoint returns a list of summarized payments. Not all payments attributes are present. You can use the query parameters to filter payments. You can separate multiple query parameters with the `&` symbol. Query parameters with types of the form "Array of strings" (such as the status parameter) can be specified as a comma-separated list. For example, if you wanted to get both `FAILED` and `CANCELLED` payments, for customer `john-123`, you would use: ```bash curl --location --request GET 'https://api.primer.io/payments?status=FAILED,CANCELLED&customer\_id=john-123' \ --header 'X-Api-Key: ' ``` You can alternatively specify a list by repeating the parameter multiple times. **Note:** payments will be available within a minute from being created.

get/payments

Query parameters

statusPaymentStatus[]

Filter payments by their status.

Filter payments by their status.

payment_method_typePaymentMethodTypeEnum[]

Filter payments by their payment method type.

Filter payments by their payment method type.

processorstring[]

Filter payments by their payment processor.

Filter payments by their payment processor.

currency_codestring[]

Filter payments by their payment currency.

Use the 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars."

Filter payments by their payment currency. e.g. use USD for US dollars.

from_datestring date-time

Return only payments from this date (inclusive).

Return only payments from this date (inclusive).

to_datestring date-time

Return only payments up to this date (inclusive).

Return only payments up to this date (inclusive).

order_idstring

Return payments related to this order ID.

Return payments related to this order ID.

min_amountinteger

Return payments of this amount minimum (inclusive).

Return payments of this amount minimum (inclusive).

max_amountinteger

Return payments of this amount max (inclusive).

Return payments of this amount max (inclusive).

customer_idstring[]

ID of the customer that has made the payment.

ID of the customer that has made the payment.

merchant_idstring[]

ID of the merchant involved in the payment.

ID of the merchant involved in the payment.

customer_email_addressstring[]

Email of the customer that has made the payment.

Email of the customer that has made the payment.

last_4_digitsstring[]

Last 4 digits of the card used for the payment.

Last 4 digits of the card used for the payment.

paypal_emailstring[]

Paypal email address associated with the payment.

Paypal email address associated with the payment.

klarna_emailstring[]

Klarna email address associated with the payment.

Klarna email address associated with the payment.

limitinteger

Maximum number of payments to return per page.

Maximum number of payments to return per page.

cursorstring

If results are paginated, pass the nextCursor to access next page.

If results are paginated, pass the nextCursor to access next page.

Headers

X-API-VERSIONstring required
Example:2.4

Specifies the version of the API to use. This must be set to 2.4.

Response

Successful Response

nextCursorstring
prevCursorstring

Example response

{
  "data": [
    {
      "id": "IHQlakKC",
      "date": "2021-03-24T14:56:56.869248",
      "status": "SETTLED",
      "orderId": "my-order-123",
      "currencyCode": "EUR",
      "amount": 700,
      "processor": {
        "name": "STRIPE",
        "processorMerchantId": "acct_stripe_1234"
      },
      "metadata": {
        "productId": 123,
        "merchantId": "a13bsd62s"
      }
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.