Skip to content
Teyra Pay

Developers

An API you can read in an afternoon

Create a payment, send your customer to its checkout_url, and confirm the result with a signed webhook. Plain JSON, prefixed IDs and integer amounts.

POST /v1/paymentsExample API request that creates a payment.
curl https://api.teyra.co/v1/payments \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 13500,
    "currency": "KWD",
    "reference": "1042",
    "language": "ar",
    "return_url": "https://shop.example.com/thanks"
  }'

Accept a payment in three steps

  1. 1

    Create a payment

    Send the amount, currency and your return URL from your server with a secret key.

  2. 2

    Send the customer to checkout

    Redirect to the checkout_url in the response. The customer pays there, in Arabic or English.

  3. 3

    Confirm the result

    Wait for the payment.succeeded webhook, or fetch the payment. Never rely on the redirect alone.

  • Test and live keys

    Build against test keys before your account is approved, then switch to live keys.

  • Idempotent requests

    Retry any POST safely: the same Idempotency-Key never creates a second payment.

  • Signed webhooks

    Events are signed with HMAC-SHA256 and retried with backoff, up to 8 attempts.

  • Exact amounts

    Integers in minor units: 12500 means 12.500 KWD. No floating-point rounding.

API resources

Every list is cursor-paginated and every error has a stable code.

Payments
Create, retrieve and list payments.
Refunds
Refund in full or in part and track status.
Payment links
Create, list and deactivate shareable links.
Deposits
List payouts made to your bank account.
Webhook endpoints
Subscribe your server to events.

Webhook events

Each event is signed with your endpoint secret in the Teyra-Signature header.

  • payment.succeeded
  • payment.failed
  • payment.canceled
  • payment.expired
  • refund.succeeded
  • refund.failed
  • deposit.paid

Server SDKs

Official Node.js and PHP libraries for the Teyra Pay API are being built now. The docs show their status and how to use them.

Everything else is in the docs

Guides, the full API reference and the WooCommerce and Shopify setup steps live at docs.teyra.co.

Read the docs(opens in a new tab)

Ready to build?

Create an account to get your test keys, then follow the docs.