OS-03 · Developers
Build on Ostrel.
A REST API over HTTPS with JSON responses, signed webhooks and a full test mode. Accept a first test payment in an afternoon; go live once your account is verified.
§1Getting started
Step 1
Get test keys
Your dashboard issues a test secret key as soon as the account is created.
Step 2
Create a payment
Send the amount and currency; redirect the buyer to the checkout URL.
Step 3
Listen for events
Register a webhook endpoint and capture or fulfil on payment.captured.
curl https://api.ostrel.vip/v1/payments \
-u "$OSTREL_SECRET_KEY:" \
-d amount=8410 \
-d currency=eur \
-d "customer[email]=juno@example.com" \
-d return_url="https://shop.example/thanks"
# → { "id": "pay_7Q42218K", "status": "requires_action",
# "checkout_url": "https://pay.ostrel.vip/c/…" }§2API reference
Authenticate with your secret key over HTTP Basic auth. Amounts are integers in the currency’s smallest unit. Every list endpoint is paginated with limit and starting_after.
| Method | Path | Does |
|---|---|---|
| POST | /v1/payments | Create a payment and get a checkout URL |
| GET | /v1/payments/:id | Retrieve a payment and its checks |
| POST | /v1/payment_links | Create a reusable payment link |
| POST | /v1/refunds | Refund all or part of a payment |
| GET | /v1/disputes | List dispute cases and their deadlines |
| GET | /v1/payouts | List payouts with their statements |
| GET | /v1/customers/:id | Retrieve a customer file from the CRM |
The complete reference, with every field and error code, is shared with your account in the dashboard.
§3Libraries
No library is required: any HTTP client works. Store plugins for Shopify, WooCommerce, PrestaShop and Magento install from your dashboard. If you would like a server library for your language, tell us which.
§4Guides
Hosted checkout
Redirect to a page we host, in your colours, with the methods your buyer’s market expects.
Embedded form
Secure fields inside your own page; card data goes straight to our payment partners.
Payment links
Create a link from the dashboard or the API and send it by email or chat.
Subscriptions
Charge on a schedule, retry failed payments and open CRM follow-ups automatically.
Refunds and disputes
Refund by API or dashboard; answer dispute cases with evidence before the deadline.
Reconciliation
Match each transaction to its payout with the payout statement export.
§5Webhooks
Each event is sent as a POST with an Ostrel-Signature header. Verify it with your endpoint secret before trusting the body, answer with a 2xx quickly, and do the work afterwards. Failed deliveries are retried.
- payment.authorized
- payment.captured
- payment.held_for_review
- payment.failed
- refund.succeeded
- dispute.opened
- dispute.closed
- payout.scheduled
- payout.paid
import crypto from "node:crypto";
export function verify(rawBody, header, secret) {
const [t, sig] = header.split(",").map((p) => p.split("=")[1]);
const expected = crypto
.createHmac("sha256", secret)
.update(`${t}.${rawBody}`)
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
}
// header: Ostrel-Signature: t=1763550000,v1=5e1c…§6Test mode
Test keys start with os_test_, live keys with os_live_. In test mode no money moves; test card numbers and scenarios (approved, declined, 3-D Secure challenge, held for review, dispute) are listed in your dashboard.
§7Best practices
- Keep secret keys on your server, never in a browser or app.
- Fulfil orders from webhooks, not from the redirect page.
- Use an idempotency key on every POST.
- Rotate keys from the dashboard if one may have leaked.
- Show the buyer the currency and total before they pay.
- Keep delivery proof: it is your best evidence in a dispute.
Stuck?
Write to our team with your request ID and we’ll look at the logs with you.