Status Query

GET/api/v1/pocket/transfer/status/:reference

You might want to get the status of a payment request upon receiving webhooks. Use this endpoint to fetch the current status of a transfer.

Path Parameters

NameTypeRequiredDescription
referencestringYesYour reference or the PVB reference (pvb_reference or pvb_third_party_reference from the webhook payload).
Note: You can pass your own reference used when initiating the transfer, or the Piggyvest reference. Use pvb_reference or pvb_third_party_reference from the webhook payload.
1
cURL Example
(cURL)
curl -X GET "https://api.piggyvest.business/api/v1/pocket/transfer/status/your-reference" \
-H "Authorization: Bearer YOUR_SECRET_KEY"
2
Node.js Example
(JavaScript)
import axios from 'axios'
const secretKey = process.env.PVB_SECRET_KEY
const url = `${process.env.PVB_BASE_URL}/api/v1/pocket/transfer/status/:reference`
await axios.get(url, {
headers: {
'Authorization': `Bearer ${secretKey}`,
},
})

Responses

Success Response (200)

Success Response
(JSON)
{
"status": true,
"message": "Payment request found",
"data": {
"payment_request": {
"id": "f461f152-1c89-418e-8a26-ec2f560683eb",
"reference": "pvfb_89259283-8702-4472-af66-41edd8784f221729962149844",
"third_party_reference": "101029928283737373636533",
"status": "successful",
"amount": 20000,
"tag": "mazigraphql",
"narration": "Success test",
"product_name": "Chinex Electronics",
"wallet_id": "3b8251aa-b373-495b-9525-1221fe799f31",
"meta": null
}
}
}

Error Response (404)

Not Found
(JSON)
{
"status": false,
"message": "Payment request not found"
}

Error Response (500)

Internal Server Error
(JSON)
{
"status": false,
"message": "We are unable to process your request. please try again later or contact support"
}

Status Values

The payment_request.status field in the response can be one of:

pendingPocket user has not yet accepted or rejected the request.
failedPocket user rejected the payment request.
successfulPocket user accepted the request and your account was credited successfully.