Skip to main content
GET
/
history
/
payments
Get payments
curl --request GET \
  --url https://api.onswitch.xyz/history/payments \
  --header 'x-service-key: <api-key>'
{
  "success": true,
  "message": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "data": {
    "data": [
      {
        "status": "<string>",
        "type": "OFFRAMP",
        "reference": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "rate": 123,
        "fee": {
          "network": "<string>",
          "currency": "<string>",
          "amount": 123
        },
        "source": {
          "amount": 123,
          "currency": "<string>",
          "network": "<string>"
        },
        "destination": {
          "amount": 123,
          "currency": "<string>",
          "network": "<string>"
        },
        "payload": {},
        "deposit": {},
        "sender": "<string>",
        "session_id": "<string>",
        "hash": "<string>",
        "explorer_url": "<string>"
      }
    ],
    "page": 123,
    "limit": 123,
    "total": 123,
    "pages": 123
  }
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Query Parameters

type
enum<string>

Filter by payment direction

Available options:
OFFRAMP,
ONRAMP,
SWAP,
WALLET

Case-insensitive substring match on payment reference or meta.external_reference

Maximum string length: 200
start_date
string<date-time>

Inclusive lower bound on created_at (ISO 8601)

end_date
string<date-time>

Inclusive upper bound on created_at (ISO 8601)

page
integer
default:1

Page number (1-based). Default 1.

Required range: x >= 1
limit
integer
default:10

Page size. Default 10, maximum 100.

Required range: 1 <= x <= 100

Response

Payment history retrieved successfully

success
boolean
required
message
string
required
timestamp
string<date-time>
required
data
object
required