Payments

Get a payment

GET/payments/{id}Scope payments:read

Reads back a payment asked for with Ask for a payment, with any refunds made on it. To be told instead of asking, use the payment.paid webhook.

Path parameters

  • idstringrequired

    The id that Ask for a payment returned.

Good to know

  • status is created (waiting to be paid), paid, cancelled (withdrawn from the dashboard side) or expired. paymentId is your gateway's payment id once paid.
  • refundedAmount is what was given back, from refunds made in the dashboard or your gateway.

Errors

StatusCodeWhen
404NOT_FOUNDNo payment with that id was asked for through the API by this workspace.

Plus the errors any endpoint can return, such as a missing key or scope. See Errors.

# macOS, Linux or Git Bash, with WAMAFY_API_KEY set. The quoting does not work in Windows cmd or PowerShell.
curl "https://api.wamafy.com/api/v1/public/payments/5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d24" \
  -H "Authorization: Bearer $WAMAFY_API_KEY"
Response 200
{
  "success": true,
  "data": {
    "id": "5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d24",
    "referenceId": "wp-mv5jrp6d-aba359af",
    "status": "created",
    "amount": 499,
    "currency": "INR",
    "to": "919876543210",
    "paymentId": null,
    "paidAt": null,
    "expiresAt": "2026-10-13T10:30:00.000Z",
    "refundedAmount": 0,
    "refunds": [],
    "createdAt": "2026-10-13T10:00:00.000Z"
  }
}

Base URL https://api.wamafy.com/api/v1/public

    Get a payment - Wamafy API