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.
| Name | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Your reference or the PVB reference (pvb_reference or pvb_third_party_reference from the webhook payload). |
curl -X GET "https://api.piggyvest.business/api/v1/pocket/transfer/status/your-reference" \-H "Authorization: Bearer YOUR_SECRET_KEY"import axios from 'axios'const secretKey = process.env.PVB_SECRET_KEYconst url = `${process.env.PVB_BASE_URL}/api/v1/pocket/transfer/status/:reference`await axios.get(url, { headers: { 'Authorization': `Bearer ${secretKey}`, },}){ "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 } }}{ "status": false, "message": "Payment request not found"}{ "status": false, "message": "We are unable to process your request. please try again later or contact support"}The payment_request.status field in the response can be one of: