Skip to main content
GET

Overview

Retrieve detailed information about a specific transaction using one of three identifiers: the payment intent ID, your merchant order reference, or the Waypay transaction reference. This flexibility allows you to query transactions using whichever identifier is most convenient for your system.

Path Parameters

string
required
Transaction identifier - can be one of three types:You can provide any of the following:
  • Payment Intent ID - The UUID returned when creating a payment (e.g., 550e8400-e29b-41d4-a716-446655440000)
  • Merchant Order Reference - Your orderRef provided when creating the transaction (e.g., ORD123456)
  • Transaction Reference - The txnRef returned by Waypay (e.g., WP20251212123456)
Recommended: Use your merchant order reference for the easiest integration with your existing systems.
string
required
API version (e.g., “1”)

Response

uuid
Unique transaction identifier
number
Transaction amount
string
Currency code (e.g., “PKR”, “USD”)
number
Transaction processing fee
number
Net amount after fees
integer
Transaction type:
  • 0 - CardDeposit (Deposit)
  • 1 - WalletDeposit
  • 2 - Transfer
  • 3 - Withdrawal
  • 4 - WalletWithdrawal
  • 5 - Fee
  • 6 - Reversal (Reversed)
  • 7 - Settlement
  • 8 - Refund
string
Transaction type description (e.g., “Deposit”, “WalletDeposit”, “Withdrawal”)
string
Transaction description
string
Additional transaction notes
string
Payment provider used
string
Transaction reference number
integer
Transaction status:
  • 1 - Pending
  • 2 - Completed
  • 3 - Failed
  • 4 - Cancelled
  • 5 - RefundRequested
  • 6 - RefundFailed
  • 7 - Refunded
  • 8 - InProgress
  • 9 - OnHold
  • 10 - Reversed
  • 11 - Disputed
  • 12 - Settled
string
Human-readable status description (e.g., “Pending”, “Completed”, “Failed”)
datetime
Transaction creation timestamp (UTC)
boolean
Whether this is a live or test transaction
string
Transaction mode (e.g., “Live”, “Test”)
string
Your merchant order reference (the orderRef you provided)
uuid
Payment intent identifier
string
Name of the fee rule applied to this transaction
string
Detailed breakdown of how the fee was calculated

Query by Payment Intent ID, Order Reference, or Transaction Reference

This endpoint supports querying transactions using three types of identifiers, giving you maximum flexibility:

Payment Intent ID (paymentIntentId)

  • What it is: A UUID generated by Waypay when you create any payment, deposit, or withdrawal order
  • Format: UUID (e.g., 550e8400-e29b-41d4-a716-446655440000)
  • Where to get it: Returned immediately in the API response when creating a transaction
  • Use case: Query transactions right after creation using the payment intent ID you just received

Merchant Order Reference (orderRef)

  • What it is: Your own order reference that you provided when creating the transaction
  • Format: Your custom format (e.g., ORD123456, ORDER-2025-001, INV-2025-12345)
  • Where to get it: From your own system/database
  • Use case: Query transactions using your internal order tracking system without storing Waypay IDs

Transaction Reference (txnRef)

  • What it is: A unique reference generated by Waypay after the transaction is processed
  • Format: Waypay’s format (e.g., WP20251212123456)
  • Where to get it: Returned in webhook notifications and transaction details
  • Use case: Query transactions when you have the Waypay transaction reference from webhooks or receipts
Recommended Approach: Use your merchant order reference (orderRef) for the easiest integration. This allows you to query transactions without storing any Waypay-generated identifiers.

Which Identifier Should You Use?

Response Fields Explained

Transaction Types (txType)

The txType field indicates what type of transaction this is:

Transaction Status (status)

The status field shows the current state of the transaction:

Best Practices

  • Use Order Reference: Query by your orderRef for the easiest integration - no need to store Waypay identifiers
  • Store Payment Intent ID: If you need immediate status checks, save the paymentIntentId returned from transaction creation
  • Poll Wisely: Don’t poll too frequently. Use webhooks for real-time updates instead
  • Handle 404s: A 404 response means the identifier doesn’t exist or you don’t have access to it
  • Store Transaction IDs: Save the id field from responses for your records and reconciliation
  • Check Status: Always verify the status field before processing the transaction
  • Fee Transparency: Use feeCalculationBreakdown to understand fee calculations
  • Reconciliation: Use merchantOrderRef to match transactions with your orders
  • Live vs Test: Check isLive to distinguish between production and test transactions
  • Choose the Right Identifier: Use payment intent ID for immediate checks, order reference for long-term tracking

Use Cases

Check transaction status immediately after creating a payment using the payment intent ID.
Display transaction status to customers on your order status page by querying with your order reference.
Verify webhook notifications by querying the transaction using the txnRef from the webhook payload.
Match transactions with your internal orders for accounting and reconciliation.
Look up transaction details when customers contact support with their order number.
Generate detailed payment receipts using the payment intent ID or transaction reference.

Common Error Scenarios

Security Considerations

  • Keep API keys secure and never expose them in client-side code
  • Use HTTPS for all API communications
  • Implement proper error handling for failed queries
  • Log all transaction queries for audit purposes
  • Rate limit your queries to avoid overwhelming the API
  • Validate transaction data before using it in your system

Next Steps

Setup Webhooks

Get real-time transaction updates

Transaction Status Guide

Understand transaction lifecycle

Create Refund

Process refunds for transactions

Payment Endpoints

Create new payment transactions