Developers

PayWall API Documentation

Fast, secure, and flexible payments. Use our REST API to accept payments, manage links, and automate your workflows.

Overview

The PayWall API follows REST principles and uses JSON for request and response bodies. All requests are made over HTTPS.

Base URL
https://team.paywall.app
Content-Type
application/json

Authentication

Authenticate requests using Bearer tokens. Include your secret key in the Authorization header.


curl -X POST   https://team.paywall.app/quickcheckout/YOUR-ACCOUNT-ID/   -H 'Authorization: Bearer sk_test_xxx'   -H 'Content-Type: application/json'   -d '{"amount":1000,"currency":"usd"}'

Quick Checkout

Create a one-time payment link and redirect your customer to a secure checkout hosted by PayWall.

Endpoint
POST /quickcheckout/<YOUR-ACCOUNT-ID>/
Request (curl)
curl -X POST https://team.paywall.app/quickcheckout/YOUR-ACCOUNT-ID/ -H 'Authorization: Bearer sk_test_xxx' -H 'Content-Type: application/json' -d '{ "amount": 10000, "currency": "usd", "success_url": "https://example.com/success", "cancel_url": "https://example.com/cancel", "name": "John Smith", "email": "customer@example.com" }'
Request (JavaScript)
await fetch('https://team.paywall.app/quickcheckout/YOUR-ACCOUNT-ID/', { method: 'POST', headers: { 'Authorization': 'Bearer sk_test_xxx', 'Content-Type': 'application/json' }, body: JSON.stringify({ amount: 10000, currency: 'usd' }) })
Response
{ "team_id": "1", "name": "John Smith", "email": "customer@example.com", "order_id": "ABC1001", "account_id": "acct_xxxxxxxxxxxxxxxx", "payment_intent": { "id": "pi_3MN60bITWiIE2bdDfrsghtFd", "object": "payment_intent", "amount": 10000, "currency": "usd", "status": "succeeded" } }

Parameters

amount Required
Positive integer in the smallest currency unit (e.g., cents).
currency Required
Three-letter ISO code in lowercase (e.g., usd, dop).
success_url
Redirect URL after successful payment.
success_post_url
Webhook-like POST to your endpoint after success.
cancel_url
Redirect URL after a canceled payment.
name
Customer name.
email
Customer email.
phone
Customer phone.
sub_total
Subtotal amount.
shipping_amount
Shipping amount.
tax_amount
Tax amount.
order_id
Your internal order identifier.

Webhooks

Receive real-time notifications about payment events at your endpoint.

Example payload
{ "type": "payment_intent.succeeded", "data": { "id": "pi_3MN60bITWiIE2bdDfrsghtFd", "amount": 10000, "currency": "usd", "status": "succeeded" } }

Errors

The API uses conventional HTTP response codes to indicate success or failure.

  • 200 – Request succeeded.
  • 400 – Bad request, check parameters.
  • 401 – Invalid or missing API key.
  • 429 – Rate limit exceeded, retry later.
  • 500 – Server error, contact support if persistent.

Test Card Numbers

BrandNumberCVCExpiry
Visa4242 4242 4242 4242Any 3 digitsAny future date
Mastercard5555 5555 5555 4444Any 3 digitsAny future date
American Express3782 8224 6310 005Any 4 digitsAny future date

Ready to integrate?

Create an account to get your API keys and start accepting payments in minutes.