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 is100(GHS 1.00). emailStringrequired- Customer's email address.
currencyStringoptional- Only
GHSis supported. Defaults toGHS. 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
httpsin live mode. channelsArrayoptional- Payment channels to show on the checkout:
mobile_moneyandwiregh_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:
merchantorcustomer. Defaults to your business setting.
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 POSTconst response = await fetch('https://api.wiregh.com/transaction/initialize', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'customer@email.com',
amount: 20000,
metadata: {
order_id: '1042'
}
})
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/transaction/initialize');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([
'email' => 'customer@email.com',
'amount' => 20000,
'metadata' => [
'order_id' => '1042',
],
]),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
'Content-Type: application/json',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"status": true,
"message": "Authorization URL created",
"data": {
"authorization_url": "https://checkout.wiregh.com/5297adjn3udup2s",
"access_code": "5297adjn3udup2s",
"reference": "WG261109RF9825WN4C3L9K"
}
}{
"status": false,
"message": "amount must be a whole number in pesewas (e.g. 5000 for GHS 50.00).",
"code": "invalid_request"
}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.
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.
curl https://api.wiregh.com/transaction/verify/WG2611096D4HQE52FMY9KW \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GETconst response = await fetch('https://api.wiregh.com/transaction/verify/WG2611096D4HQE52FMY9KW', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY'
}
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/transaction/verify/WG2611096D4HQE52FMY9KW');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"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"
}
}
}{
"status": false,
"message": "Transaction reference not found",
"code": "not_found"
}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.
curl https://api.wiregh.com/transaction/173 \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GETconst response = await fetch('https://api.wiregh.com/transaction/173', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY'
}
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/transaction/173');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"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,abandonedorreversed. 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.
curl https://api.wiregh.com/transaction?perPage=1&status=success \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GETconst response = await fetch('https://api.wiregh.com/transaction?perPage=1&status=success', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY'
}
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/transaction?perPage=1&status=success');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"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
}
}