Prerequisites
- Merchant Account: Contact sales for a GoPay merchant account
- API Key Pair: Create an Ed25519 key pair with the
c2bpermission — see Authentication - Server Environment: A backend to securely sign and send API requests — never sign requests in a browser or mobile app
Implementation Steps
- Step 1: Sign the Request
- Step 2: Create Payment
- Step 3: Redirect to Checkout
Every request is authenticated with a detached Ed25519 signature sent in HTTP headers (
X-Public-Key, X-Signature, X-Timestamp, X-Request-ID) — nothing auth-related goes in the JSON body.The full scheme, including ready-to-use signing helpers in Node.js, Python, and Go, is on the Authentication page. In short:- Hash your exact request body bytes with SHA-256
- Build the v1 canonical string from the method, host, path, timestamp, request ID, and body hash
- Sign it with your Ed25519 private key and send
X-Signature: ed25519=<base64>
Idempotency-Key header if you retry on network errors.Next Steps
API Reference
Full request/response contract and validation rules
Code Examples
Complete initiate-payment calls in Node.js, Python, and Go
