class

Polar::Api::Payments

Inherits Reference < Object

API client for payments operations

Constants

Log = ::Log.for(self)

Constructors

new(client : Client)

Creates a new Payments instance

@param client [Client] The Polar API client instance

Source

Instance methods

Get Payment

Get a payment by ID.

Scopes: payments:read

Endpoint: GET /v1/payments/{id}

Parameters:

  • id (required): The payment ID.

Returns: Polar::Models::Payment

Raises:

  • ResourceNotFoundError on 404
  • NotPermittedError on 403
  • HTTPValidationError on 422
  • PolarError on other errors
Source
list(organization_id : String | Nil = nil, checkout_id : String | Nil = nil, order_id : String | Nil = nil, status : String | Nil = nil, method : String | Nil = nil, customer_email : String | Nil = nil, page : Int32 | Nil = nil, limit : Int32 | Nil = nil, sorting : String | Nil = nil) : Polar::Models::ListResource(Polar::Models::Payment)

List Payments

List payments.

Scopes: payments:read

Endpoint: GET /v1/payments/

Parameters:

  • organization_id (optional): Filter by organization ID.
  • checkout_id (optional): Filter by checkout ID.
  • order_id (optional): Filter by order ID.
  • status (optional): Filter by payment status.
  • method (optional): Filter by payment method.
  • customer_email (optional): Filter by customer email.
  • page (optional): Page number, defaults to 1.
  • limit (optional): Size of a page, defaults to 10. Maximum is 100.
  • sorting (optional): Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

Returns: Polar::Models::ListResource(Polar::Models::Payment)

Raises:

  • ResourceNotFoundError on 404
  • NotPermittedError on 403
  • HTTPValidationError on 422
  • PolarError on other errors
Source