Tracking a Buy Transaction

This page explains how to track, view, and confirm the status of your gift card purchases.

After creating a buy transaction, you can use this endpoint to check its current status, whether it’s still processing, completed, failed, or refunded.

πŸ“‘ Endpoint

GET /giftcard-trade/buy/history

This retrieves all your buy transactions, including their statuses and basic details.


🧾 Query Parameters

ParameterTypeRequiredDescription
referenceStringNo(Optional) Use this if you want to fetch a single transaction by its reference ID.
pageNumberNoFor paginated results (default = 1).
limitNumberNoNumber of transactions per page (default = 10).

πŸ“¦ Example Request

GET /giftcard-trade/buy/history?page=1&limit=5

or

GET /giftcard-trade/buy/history?reference=BGC-4287462729

βœ… Example Response

{
  "success": true,
  "message": "Buy transaction history fetched successfully.",
  "data": [
    {
      "reference": "BGC-4287462729",
      "sku": 922,
      "title": "Google Play Gift Card",
      "amount": 50,
      "quantity": 1,
      "totalAmount": 50000,
      "paymentMethod": "NAIRA",
      "status": "COMPLETED",
      "cardCode": "ABCD-1234-EFGH-5678",
      "cardPin": "7890",
      "cardImage": "https://cdn.prestmit.io/cards/googleplay.jpg",
      "createdAt": "2024-02-12T10:24:05Z",
      "updatedAt": "2024-02-12T10:30:30Z"
    },
    {
      "reference": "BGC-4287462730",
      "sku": 407,
      "title": "Amazon Gift Card",
      "amount": 25,
      "quantity": 2,
      "totalAmount": 25000,
      "paymentMethod": "CEDIS",
      "status": "PENDING",
      "createdAt": "2024-02-12T10:31:50Z"
    }
  ]
}

πŸ”Ž Understanding Transaction Status

StatusMeaning
PENDINGThe transaction has been created and is being processed.
PROCESSINGPayment confirmed; card delivery in progress.
COMPLETEDTransaction successful, gift card delivered.
FAILEDThe purchase failed. No funds were deducted.
REFUNDEDThe transaction was reversed; funds returned to your wallet.

🧠 Tips for Implementation

  • Always check the transaction status before marking an order as complete within your system.
  • The gift card code, or PIN will only appear when the transaction is COMPLETED.
  • For webhook integration, use your webhook endpoint to automatically receive updates (see β€œManaging Webhooks” page).

πŸ”” Pro Tip

It’s best to automate status updates in your app using webhooks. That way, your system stays updated in real time when a trade’s status changes.

Learn how to set up webhooks here: Setting Up Webhooks β†’


What’s Next

Next... Let's discuss how our payment and commission work.