Skip to content
Wire Ghapi

Transactions

The Transactions API lets you create and manage payments on your integration. Start a payment with Initialize, send your customer to the checkout, then confirm the result with Verify.

Initialize Transaction

Start a transaction from your server. You get back an authorization_url to redirect your customer to, and an access_code you can pass to the Wire Gh popup. The checkout link stays valid for 30 minutes.

Headers

authorizationStringrequired
Set value to Bearer YOUR_SECRET_KEY.
content-typeStringrequired
Set value to application/json.
idempotency-keyStringoptional
A unique value you choose so a retried request is processed only once. See idempotent requests.

Body parameters

amountIntegerrequired
Amount in pesewas. GHS 200.00 is 20000. The minimum is 100 (GHS 1.00).
emailStringrequired
Customer's email address.
currencyStringoptional
Only GHS is supported. Defaults to GHS.
referenceStringoptional
Your own unique reference for this transaction. Letters, digits and . = - only, up to 100 characters. We create one if you leave it out.
callback_urlStringoptional
Where the checkout sends your customer after payment. Overrides the callback URL set on your dashboard. Must be https in live mode.
channelsArrayoptional
Payment channels to show on the checkout: mobile_money and wiregh_wallet. Leave it out to offer both.
metadataObjectoptional
Any extra information you want to keep with the transaction, such as an order number. Returned on verify and in webhooks. Up to 10KB.
first_nameStringoptional
Customer's first name.
last_nameStringoptional
Customer's last name.
phoneStringoptional
Customer's phone number.
bearerStringoptional
Who pays the transaction fee: merchant or customer. Defaults to your business setting.
POST/transaction/initialize
curl https://api.wiregh.com/transaction/initialize \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
  "email": "customer@email.com",
  "amount": 20000,
  "metadata": {
    "order_id": "1042"
  }
}' \
-X POST
Sample response
{
  "status": true,
  "message": "Authorization URL created",
  "data": {
    "authorization_url": "https://checkout.wiregh.com/5297adjn3udup2s",
    "access_code": "5297adjn3udup2s",
    "reference": "WG261109RF9825WN4C3L9K"
  }
}

Verify Transaction

Confirm the status of a transaction. Always call this from your server before you give value. Check that data.status is success and that data.amount is the amount you expected.

Transaction statuses

A transaction is pending, ongoing, success, failed, abandoned or reversed. Only success means you have been paid.

Headers

authorizationStringrequired
Set value to Bearer YOUR_SECRET_KEY.

Path parameters

referenceStringrequired
The transaction reference.
GET/transaction/verify/:reference
curl https://api.wiregh.com/transaction/verify/WG2611096D4HQE52FMY9KW \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
Sample response
{
  "status": true,
  "message": "Verification successful",
  "data": {
    "id": 173,
    "domain": "test",
    "status": "success",
    "reference": "WG2611096D4HQE52FMY9KW",
    "amount": 5000,
    "requested_amount": 5000,
    "message": null,
    "gateway_response": "Approved",
    "paid_at": "2026-11-09T01:03:40.000Z",
    "created_at": "2026-11-09T01:03:40.000Z",
    "channel": "mobile_money",
    "currency": "GHS",
    "ip_address": "154.160.2.17",
    "metadata": {
      "order_id": "1042"
    },
    "fees": 98,
    "fee_bearer": "merchant",
    "refunded_amount": 0,
    "customer": {
      "id": 169,
      "first_name": null,
      "last_name": null,
      "email": "customer@email.com",
      "customer_code": "CUS_c0473agwwkdxmih",
      "phone": null,
      "metadata": null,
      "risk_action": "default",
      "createdAt": "2026-11-09T01:03:40.000Z",
      "updatedAt": "2026-11-09T01:03:40.000Z"
    },
    "authorization": {
      "channel": "mobile_money",
      "bank": "MTN",
      "last4": "4987",
      "country_code": "GH",
      "reusable": false,
      "mobile_money_number": "23355****87"
    }
  }
}

Fetch Transaction

Get the details of a single transaction by its numeric ID.

Headers

authorizationStringrequired
Set value to Bearer YOUR_SECRET_KEY.

Path parameters

idIntegerrequired
The ID of the transaction, as returned in data.id.
GET/transaction/:id
curl https://api.wiregh.com/transaction/173 \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
Sample response
{
  "status": true,
  "message": "Transaction retrieved",
  "data": {
    "id": 173,
    "domain": "test",
    "status": "success",
    "reference": "WG2611096D4HQE52FMY9KW",
    "amount": 5000,
    "requested_amount": 5000,
    "message": null,
    "gateway_response": "Approved",
    "paid_at": "2026-11-09T01:03:40.000Z",
    "created_at": "2026-11-09T01:03:40.000Z",
    "channel": "mobile_money",
    "currency": "GHS",
    "ip_address": "154.160.2.17",
    "metadata": null,
    "fees": 98,
    "fee_bearer": "merchant",
    "refunded_amount": 0,
    "customer": {
      "id": 169,
      "first_name": null,
      "last_name": null,
      "email": "customer@email.com",
      "customer_code": "CUS_c0473agwwkdxmih",
      "phone": null,
      "metadata": null,
      "risk_action": "default",
      "createdAt": "2026-11-09T01:03:40.000Z",
      "updatedAt": "2026-11-09T01:03:40.000Z"
    },
    "authorization": {
      "channel": "mobile_money",
      "bank": "MTN",
      "last4": "4987",
      "country_code": "GH",
      "reusable": false,
      "mobile_money_number": "23355****87"
    }
  }
}

List Transactions

List the transactions on your integration, newest first. Results are paginated.

Headers

authorizationStringrequired
Set value to Bearer YOUR_SECRET_KEY.

Query parameters

perPageIntegeroptional
Records per page, from 1 to 100. Defaults to 50.
pageIntegeroptional
Page to return. Defaults to 1.
statusStringoptional
Only return transactions with this status: pending, ongoing, success, failed, abandoned or reversed.
customerIntegeroptional
Only return transactions for this customer ID.
fromDatetimeoptional
Start of the period, for example 2026-11-01.
toDatetimeoptional
End of the period, for example 2026-11-30.
amountIntegeroptional
Only return transactions of this amount, in pesewas.
GET/transaction
curl https://api.wiregh.com/transaction?perPage=1&status=success \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
Sample response
{
  "status": true,
  "message": "Transactions retrieved",
  "data": [
    {
      "id": 173,
      "domain": "test",
      "status": "success",
      "reference": "WG2611096D4HQE52FMY9KW",
      "amount": 5000,
      "requested_amount": 5000,
      "message": null,
      "gateway_response": "Approved",
      "paid_at": "2026-11-09T01:03:40.000Z",
      "created_at": "2026-11-09T01:03:40.000Z",
      "channel": "mobile_money",
      "currency": "GHS",
      "ip_address": "154.160.2.17",
      "metadata": null,
      "fees": 98,
      "fee_bearer": "merchant",
      "refunded_amount": 0,
      "customer": {
        "id": 169,
        "first_name": null,
        "last_name": null,
        "email": "customer@email.com",
        "customer_code": "CUS_c0473agwwkdxmih",
        "phone": null,
        "metadata": null,
        "risk_action": "default",
        "createdAt": "2026-11-09T01:03:40.000Z",
        "updatedAt": "2026-11-09T01:03:40.000Z"
      },
      "authorization": {
        "channel": "mobile_money",
        "bank": "MTN",
        "last4": "4987",
        "country_code": "GH",
        "reusable": false,
        "mobile_money_number": "23355****87"
      }
    }
  ],
  "meta": {
    "total": 1,
    "perPage": 1,
    "page": 1,
    "pageCount": 1
  }
}