Skip to main content
This API allows you to view, approve, and reject cryptocurrency payment claims submitted by customers.

The payment claim object

id
string
Unique identifier with pymt_claim_ prefix (e.g., pymt_claim_abc123def456).
object
string
Always "payment_claim".
status
string
Claim status: pending, approved, or rejected.
amount
string
Claimed transaction amount.
transaction_id
string
Blockchain transaction hash provided by customer.
rejection_reason
string
Reason for rejection. null if not rejected.
approved_at
string
When the claim was approved or rejected (ISO 8601). null if pending.
customer_id
string
The customer who submitted the claim.
currency
string
Currency code (e.g., BTC, ETH).
to_address_id
string
The receiving address ID.
to_address
string
The receiving address.
approved_by_id
integer
User ID who approved or rejected. null if pending.
crypto_transaction_id
string
Created transaction ID. null if not approved.
created_at
string
When the claim was submitted (ISO 8601).
updated_at
string
When the claim was last updated (ISO 8601).

List payment claims

GET /v1/crypto_payment_claims
Retrieves a paginated list of all payment claims in your account. Claims are ordered by creation date (newest first).
page
integer
default:"1"
Page number for pagination. Results are returned 25 items per page.
status
string
Filter by status. One of: pending, approved, rejected.
curl https://api.gettrxn.com/v1/crypto_payment_claims \
  -H "Authorization: Bearer $TRXN_TOKEN"

Filtering by status

curl "https://api.gettrxn.com/v1/crypto_payment_claims?status=pending" \
  -H "Authorization: Bearer $TRXN_TOKEN"
Response
{
  "crypto_payment_claims": [
    {
      "id": "pymt_claim_abc123def456",
      "object": "payment_claim",
      "status": "pending",
      "amount": "0.5",
      "transaction_id": "0x1234567890abcdef...",
      "rejection_reason": null,
      "approved_at": null,
      "customer_id": "cust_xyz789",
      "currency": "BTC",
      "to_address_id": "addr_abc123",
      "to_address": "bc1q...",
      "approved_by_id": null,
      "crypto_transaction_id": null,
      "created_at": "2025-01-25T12:00:00Z",
      "updated_at": "2025-01-25T12:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pages": 3,
    "count": 67
  }
}

Get payment claim

GET /v1/crypto_payment_claims/:id
Retrieves a specific payment claim by ID.
id
string
required
The payment claim’s ID (e.g., pymt_claim_abc123def456).
curl https://api.gettrxn.com/v1/crypto_payment_claims/pymt_claim_abc123def456 \
  -H "Authorization: Bearer $TRXN_TOKEN"
Response
{
  "id": "pymt_claim_abc123def456",
  "object": "payment_claim",
  "status": "pending",
  "amount": "0.5",
  "transaction_id": "0x1234567890abcdef...",
  "rejection_reason": null,
  "approved_at": null,
  "customer_id": "cust_xyz789",
  "currency": "BTC",
  "to_address_id": "addr_abc123",
  "to_address": "bc1q...",
  "approved_by_id": null,
  "crypto_transaction_id": null,
  "created_at": "2025-01-25T12:00:00Z",
  "updated_at": "2025-01-25T12:00:00Z"
}

Approve payment claim

POST /v1/crypto_payment_claims/:crypto_payment_claim_id/approval
Approves a pending payment claim. This creates a corresponding crypto transaction record.
crypto_payment_claim_id
string
required
The payment claim’s ID (e.g., pymt_claim_abc123def456).
curl -X POST https://api.gettrxn.com/v1/crypto_payment_claims/pymt_claim_abc123def456/approval \
  -H "Authorization: Bearer $TRXN_TOKEN"
Response
{
  "id": "pymt_claim_abc123def456",
  "object": "payment_claim",
  "status": "approved",
  "amount": "0.5",
  "transaction_id": "0x1234567890abcdef...",
  "rejection_reason": null,
  "approved_at": "2025-01-25T14:30:00Z",
  "customer_id": "cust_xyz789",
  "currency": "BTC",
  "to_address_id": "addr_abc123",
  "to_address": "bc1q...",
  "approved_by_id": 123,
  "crypto_transaction_id": "trxn_new789xyz",
  "created_at": "2025-01-25T12:00:00Z",
  "updated_at": "2025-01-25T14:30:00Z"
}

Error when claim is not pending

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "Payment claim is not pending",
    "param": "status"
  }
}

Reject payment claim

POST /v1/crypto_payment_claims/:crypto_payment_claim_id/rejection
Rejects a pending payment claim with an optional reason.
crypto_payment_claim_id
string
required
The payment claim’s ID (e.g., pymt_claim_abc123def456).
reason
string
Reason for rejection. Defaults to "No reason provided" if omitted.
curl -X POST https://api.gettrxn.com/v1/crypto_payment_claims/pymt_claim_abc123def456/rejection \
  -H "Authorization: Bearer $TRXN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Transaction not found on blockchain"
  }'
Response
{
  "id": "pymt_claim_abc123def456",
  "object": "payment_claim",
  "status": "rejected",
  "amount": "0.5",
  "transaction_id": "0x1234567890abcdef...",
  "rejection_reason": "Transaction not found on blockchain",
  "approved_at": "2025-01-25T14:30:00Z",
  "customer_id": "cust_xyz789",
  "currency": "BTC",
  "to_address_id": "addr_abc123",
  "to_address": "bc1q...",
  "approved_by_id": 123,
  "crypto_transaction_id": null,
  "created_at": "2025-01-25T12:00:00Z",
  "updated_at": "2025-01-25T14:30:00Z"
}

Payment claim statuses

StatusDescription
pendingAwaiting review — can be approved or rejected.
approvedPayment verified and transaction created.
rejectedPayment claim was rejected.

Workflow

  1. Customer submits a payment claim via a payment claim link.
  2. Claim appears with pending status.
  3. Review the claim by checking the transaction on the blockchain.
  4. Approve the claim (creates a crypto transaction) or reject it with a reason.
  5. Approved claims can be allocated to invoices.

Webhooks

The following webhook events are triggered for payment claims:
EventDescription
payment_claim.submittedWhen a new claim is submitted.
payment_claim.approvedWhen a claim is approved.
payment_claim.rejectedWhen a claim is rejected.

Sandbox support

The API respects sandbox scoping. If your API token is associated with a sandbox, you can only access claims created in that sandbox. Approved and rejected claims are isolated from production data.