Errors
All GoPay APIs return errors in a single, stable shape.code is machine-readable and safe to program against; message is human-readable; requestId identifies the request in GoPay’s logs — include it in support tickets.
Error Codes
Authentication failures are deliberately generic.
INVALID_SIGNATURE covers every authenticity check — bad signature, unknown or inactive key, merchant mismatch, stale timestamp — so responses never reveal which specific check failed.Retry Guidance
Payments (C2B) — onUPSTREAM_UNAVAILABLE or UPSTREAM_TIMEOUT, retry with a fresh X-Request-ID and signature (the old ID may already be consumed), and send the same Idempotency-Key so the payment is not created twice.
Transfers (B2C) — retrying moves money, so be careful. On a timeout, check for a settlement webhook or contact support with the requestId before resubmitting, and always use a stable client_reference so duplicates surface during reconciliation. The wallet debit itself is idempotent per transaction, so a single accepted transfer can never double-charge.
Never retry INVALID_SIGNATURE, PERMISSION_DENIED, or VALIDATION_FAILED without fixing the underlying problem — see Common Mistakes for the usual signature culprits.
Back off on RATE_LIMITED (429) before retrying; your per-merchant budget refills over time.