Skip to main content
GET
/
payment
/
requests
cURL
curl --request GET \
  --url https://api.otim.com/payment/requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "direction": "from",
  "statuses": [
    "pending"
  ],
  "perPage": 10,
  "page": 0
}'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "fromUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "toUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "payerAddress": "<string>",
    "ephemeralWalletAddress": "<string>",
    "instructions": {
      "ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "completionIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    },
    "metadata": {},
    "status": "pending",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "dueDate": "2023-11-07T05:31:56Z"
  }
]
Get payment requests for a user, filtered by direction and optional status.

Authorizations

Authorization
string
header
required

JWT token for API authentication

Body

application/json
direction
enum<string>
required

Direction to filter payment requests

Available options:
from,
to
statuses
enum<string>[] | null

Optional statuses to filter by

perPage
integer | null

Number of records per page

Example:

10

page
integer | null

Page number

Example:

0

Response

200 - application/json

Payment requests retrieved successfully

id
string<uuid>
required

Unique identifier for the payment request

fromUserId
string<uuid>
required

Unique identifier for the user creating the payment request

ephemeralWalletAddress
string<address>
required

Address of the ephemeral wallet that will sweep the funds

instructions
object
required

Instructions associated with the payment request

metadata
object
required

Payment request metadata as arbitrary JSON

status
enum<string>
required

Payment request status

Available options:
pending,
inProgress,
paid,
cancelled,
draft
createdAt
string<date-time>
required

Timestamp when the payment request was created

updatedAt
string<date-time>
required

Timestamp when the payment request was last updated

toUserId
string<uuid> | null

Optional user id of the payee to connect the payment request to

payerAddress
string<address> | null

Address of the payer

dueDate
string<date-time> | null

Due date of the payment request