Retrieve lifecycle and transaction data
Use the Issuing lifecycles, card transactions, and transaction events APIs to retrieve and filter transaction data, and subscribe to webhooks for real-time updates.
To reconcile card activity, build reporting, or power your UI with the three-level transaction model (lifecycles, card transactions, and transaction events), use the Issuing transaction APIs and optional webhooks. This guide shows you how to retrieve lifecycle data, card transactions, and transaction events, and how to receive real-time updates.
Before you begin
- Obtain your API credentials from the Airwallex web app.
- Have at least one active issued card with transaction activity.
- Understand the difference between lifecycles, card transactions, and transaction events so you can choose the right endpoint and filters.
Retrieve lifecycles
Use the lifecycles API when you need a network-level view of a payment and aggregated billing amounts for all related card transactions and events.
-
Call the
GET /api/v1/issuing/lifecyclesendpoint (see Card transaction lifecycles API in the API reference for your environment). -
Add query parameters to narrow results (for example,
card_id,from_created_date,to_created_date,page_num,page_size), according to the API specification. -
Send the request:
Shell1curl -G 'https://api-demo.airwallex.com/api/v1/issuing/lifecycles' \2 --data-urlencode 'card_id={{CARD_ID}}' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' -
Use the
id(lifecycle ID) andbilling_amountsfrom the response. To get all events for a lifecycle, use thatlifecycle_idwith the transaction events endpoint (see Retrieve transaction events).
A lifecycle response includes billing_amounts (totals for authorized, credited, debited, declined, expired, pending, and reversed amounts per currency), so you can use it for aggregation without summing events yourself.
Retrieve card transactions
Use the card transactions API when you need statuses with guaranteed terminal states (Authorized, Cleared, Reversed, Expired, Declined, Verified) and per-transaction details such as merchant, amounts, and fund direction.
-
Call the
GET /api/v1/issuing/card_transactionsendpoint (see Card transactions API in the API reference). -
Add query parameters such as
card_id,lifecycle_id,status,from_created_date,to_created_date, and pagination parameters, as supported by the API. -
Send the request:
Shell1curl -G 'https://api-demo.airwallex.com/api/v1/issuing/card_transactions' \2 --data-urlencode 'card_id={{CARD_ID}}' \3 --data-urlencode 'status=CLEARED' \4 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' -
Use the
lifecycle_idon each card transaction to group related card transactions (for example, purchase and refund). If you need per-event detail or failure reasons for multiple events in one card transaction, call the transaction events endpoint with the card transaction ID.
Retrieve transaction events
Use the transaction events API when you need the most granular data: individual network messages or fund movements, including type, subtype, failure reason, and per-event amounts.
-
Call the
GET /api/v1/issuing/transaction_eventsendpoint (see Card transaction events API in the API reference). -
Filter by
lifecycle_id,card_transaction_id,card_id, date range, and other supported parameters. -
Send the request:
Shell1curl -G 'https://api-demo.airwallex.com/api/v1/issuing/transaction_events' \2 --data-urlencode 'lifecycle_id={{LIFECYCLE_ID}}' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' -
Use the returned events to inspect type and subtype (for example, authorization, incremental authorization, clearing, reversal),
process_result,failure_reason, and billing or transaction amounts per event.
Webhooks for real-time updates
To react to lifecycle and event changes without polling, subscribe to the transaction lifecycle webhooks in the Airwallex web app. For this integration model, the following are the available events (see Transaction lifecycle (beta) in Issuing webhooks for full descriptions):
| Event | Description |
|---|---|
issuing.transaction_lifecycle.created | A transaction lifecycle has been created. |
issuing.transaction_lifecycle.modified | A transaction lifecycle has been modified with possible amounts, status, and/or details changes. |
issuing.transaction_lifecycle_event.created | A transaction lifecycle event has been created for an existing or newly created transaction lifecycle. |
-
In the Airwallex web app, open the Developer area and go to webhook configuration.
-
Subscribe to the events in the table above.
-
Set your endpoint URL and save. When events occur, Airwallex sends payloads to your URL; use identifiers in the payload (for example,
lifecycle_id) to fetch full details from the GET endpoints in this guide if needed.
Next steps
Now that you can retrieve lifecycle and transaction data:
- Retrieve card transactions (if you use the legacy transactions list API).
- Handle transaction disputes.
- Provide fraud feedback.
- Review Transaction lifecycle for status and fund-direction details.