VeyqoDEVELOPERS
DocumentationGET Retrieve a payment

Payments API

GET/payments/{id}

Retrieve a payment

Retrieve by Veyqo payment ID or your merchant reference directly in the path. URL-encode references; use the Veyqo ID when a reference contains reserved URL characters.

GEThttps://api.veyqo.org/api/v1/payments/{id}Try in console
Use your sandbox environment to start. Understand error codes and payment statuses before handling a live payment.
Retrieve a payment
curl --request GET "https://api.veyqo.org/api/v1/payments/$PAYMENT_ID" \
  --header "Authorization: Bearer $VEYQO_SECRET_KEY" \
  --header "Accept: application/json"
{
  "success": true,
  "data": {
    "id": "pay_01M6EB66SC61Q3RQYAN0693DGM",
    "object": "payment",
    "reference": "ORDER-1001",
    "status": "pending",
    "amount": 50000,
    "amount_refunded": 0,
    "currency": "NGN",
    "customer": {
      "email": "customer@example.com",
      "name": "Ada Lovelace",
      "phone": null
    },
    "description": "Order 1001",
    "checkout_url": "https://checkout.paystack.com/example",
    "provider": "paystack",
    "provider_reference": "provider_reference_example",
    "metadata": {
      "order_id": "1001"
    },
    "failure_code": null,
    "failure_message": null,
    "authorized_at": null,
    "succeeded_at": null,
    "failed_at": null,
    "created_at": "2026-11-02T12:00:00+00:00"
  }
}

Illustrative examples. Replace IDs and environment variables with your own values. Keep secret keys on your server.

Headers

Authorizationstringrequired
Bearer <secret-key>. This key determines your project environment and must stay on your server.
Acceptstringoptional
application/json

Endpoint

GET https://api.veyqo.org/api/v1/payments/{id}

Server secret key required. Scope: payments:read. The key determines the project and environment; no project-selection header is accepted.

Path and query parameters

ParameterLocationRequiredDescription
idpathYesVeyqo payment ID or URL-encoded merchant reference. Prefer the Veyqo ID for unambiguous lookup.

Response fields

idstringrequired
Globally unique Veyqo payment ID; use it for reconciliation.
object"payment"required
See the JSON example.
referencestringrequired
Merchant reference unique within the project environment; defaults to the payment ID.
statusstringrequired
Normalized payment state. Do not fulfil pending, processing, failed or cancelled payments. Values: created, pending, processing, succeeded, failed, cancelled, refunded, partially_refunded.
amountintegerrequired
Original amount in the smallest currency unit.
amount_refundedintegerrequired
Successfully refunded amount in the smallest currency unit.
currencystringrequired
Three-letter currency code.
customerobjectrequired
See the JSON example.
customer.emailstringrequired
Customer email address.
customer.namestring | nullrequired
Customer name.
customer.phonestring | nullrequired
Customer phone.
descriptionstring | nullrequired
Optional description.
checkout_urlstring | nullrequired
Provider checkout URL for direct payments; may be null depending on the flow. Format: uri.
providerstringrequired
Selected provider slug.
provider_referencestring | nullrequired
Reference the provider assigned, not your order reference.
metadataobject | arrayrequired
Your non-sensitive JSON metadata. Objects are recommended; do not store secrets or card details.
failure_codestring | nullrequired
Machine-readable payment failure reason, separate from API error codes.
failure_messagestring | nullrequired
Human-readable payment failure reason.
authorized_atstring | nullrequired
ISO 8601 timestamp. Format: date-time.
succeeded_atstring | nullrequired
ISO 8601 timestamp. Format: date-time.
failed_atstring | nullrequired
ISO 8601 timestamp. Format: date-time.
created_atstring | nullrequired
ISO 8601 timestamp. Format: date-time.

Errors and recovery

CodeHTTPRecoveryRetry policy
INVALID_API_KEY401Use a current kc_test_ or kc_live_ secret key on /api/v1. Use a pk_test_ or pk_live_ publishable key only on browser checkout.After fixing credentials.
INSUFFICIENT_PERMISSION403Grant the required scope or use a suitably scoped key. Dashboard organization roles and staff permissions are separate.After permission changes.
RATE_LIMIT_EXCEEDED429Honor Retry-After, use bounded exponential backoff with jitter, and reduce concurrent requests. Read X-RateLimit headers.Yes, after Retry-After; preserve write idempotency.
METHOD_NOT_ALLOWED405Use the method documented for the endpoint, such as POST for verification and refunds.After fixing the method.
INTERNAL_ERROR500Record X-Request-Id, timestamp and sanitized request context. Reconcile unknown payment outcomes before retrying a write; contact support if it persists.Safe reads: bounded backoff. Writes: reconcile first.
PAYMENT_NOT_FOUND404Use the saved Veyqo payment ID or correctly URL-encoded merchant reference with the original project’s key.No blind retry.
ENVIRONMENT_MISMATCH403Use the correct sandbox/live key. Resources outside the key’s project remain not-found instead of disclosing ownership.After selecting the correct key.