API Reference
Overview
REST API documentation for GivePay payment sessions
Overview
The GivePay API allows you to create and manage payment sessions programmatically. Use these endpoints to integrate GivePay payments directly into your application.
Base URL
https://api.givepay.co/api/v1Authentication
All API requests require an API key passed in the Authorization header. Both forms are accepted:
Authorization: Bearer YOUR_API_KEY
Authorization: YOUR_API_KEYAPI key prefixes:
| Prefix | Environment | Use |
|---|---|---|
gp_test_pk_... | Sandbox | Public publishable key, safe to embed client-side |
gp_test_sk_... | Sandbox | Secret key, server-side only |
gp_live_pk_... | Live | Public publishable key, safe to embed client-side |
gp_live_sk_... | Live | Secret key, server-side only |
You can obtain and rotate keys from the GivePay dashboard.
Environments
The API key prefix determines the environment — there is no separate base URL. Sandbox traffic is isolated from live traffic.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /payment-session/checkout | Create a payment session and get a checkout URL |
GET | /payment-session/:slug | Retrieve payment session details |
PATCH | /payment-session/:slug | Update a pending payment session (e.g. tip, payer, metadata) |
GET | /subscription/:slug | Retrieve subscription details |
PATCH | /subscription/:slug | Update an active subscription |
Webhook events deliver real-time updates about payments, refunds, and subscriptions — see the Webhooks section.