Draft API — Not Live Yet
GoPaySol API Reference
Create payment links, retrieve payment status, and connect Solana payment flows to your application.
Base URL
text
https://api.gopaysol.comAuthentication
Use a bearer API key. API keys will be available from the GoPaySol developer dashboard.
http
Authorization: Bearer <API_KEY>Create Payment Link
Create a hosted payment link for a customer.
http
POST /v1/payment-linksRequest Body
json
{
"title": "Website Design Advance Payment",
"description": "Advance payment for website design project",
"amount": "25.00",
"token": "USDC",
"environment": "test",
"customer_reference": "customer_456",
"metadata": {
"order_id": "ORD-1001",
"source": "website"
}
}Response
json
{
"payment_id": "pay_123456",
"checkout_url": "https://gopaysol.com/pay/pay_123456",
"status": "created",
"environment": "test",
"amount": "25.00",
"token": "USDC"
}Retrieve Payment Status
http
GET /v1/payments/{payment_id}Response
json
{
"payment_id": "pay_123456",
"status": "paid",
"amount": "25.00",
"token": "USDC",
"environment": "test",
"transaction_signature": "5rY...",
"receipt_url": "https://gopaysol.com/receipts/rcpt_123456",
"metadata": {
"order_id": "ORD-1001"
}
}Common Payment Statuses
| Status | Meaning |
|---|---|
created | Payment link created |
pending_onchain | Waiting for blockchain transaction |
detected | Transaction detected but not fully validated |
paid | Payment validated successfully |
underpaid | Buyer sent less than expected amount |
wrong_token | Buyer sent unsupported token |
expired | Payment link expired |
API Safety Notes
- API secrets should only be stored on your server.
- Never expose API keys in frontend code.
- Use idempotency keys when retrying payment creation.
- Use webhooks for fulfillment.
- Do not treat frontend success as final payment confirmation.
