Base path: /api/payments Authentication: session cookie, except the bank callback.

GET /api/payments/packs

Lists the credit packs on sale. No session required, so it is safe to call from a pricing page.

curl https://api.jetscrape.com/api/payments/packs
{
  "success": true,
  "packs": [
    {
      "id": "pack_basic",
      "name": "Basic Pack",
      "credits": 1000,
      "price": 29.99,
      "currency": "TRY"
    }
  ]
}

POST /api/payments/create

Starts a payment, with 3D Secure support.

curl -X POST https://api.jetscrape.com/api/payments/create \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "pack_id": "pack_basic",
    "card_holder": "JOHN DOE",
    "card_number": "4111111111111111",
    "card_exp_month": "12",
    "card_exp_year": "2026",
    "cvv": "123",
    "currency": "TRY"
  }'
{
  "success": true,
  "order_id": "ord_abc123",
  "html_3d": "<html>...3D Secure form...</html>"
}

Render html_3d in an iframe or a new page. When the customer completes verification, the bank posts to /api/payments/callback and the credit is loaded.

Errors: 400 missing pack_id · 401 session required · 402 payment failed.

Card details are never stored by JetScrape; they are forwarded to the payment provider. Send these requests from your server over HTTPS, never from the browser.

POST /api/payments/callback

Called by the bank after 3D Secure. It is not meant to be called by your client.

GET /api/payments/order

Looks up a single order by the orderId query parameter. Use it to confirm the outcome when the customer returns from 3D Secure.

curl "https://api.jetscrape.com/api/payments/order?orderId=ord_abc123" -b cookies.txt
{
  "success": true,
  "order": {
    "id": "ord_abc123",
    "status": "completed",
    "credits": 1000,
    "amount": 29.99,
    "currency": "TRY",
    "createdAt": "2025-06-08T10:00:00.000Z"
  }
}

GET /api/payments/history

curl "https://api.jetscrape.com/api/payments/history?page=1&limit=10" -b cookies.txt
  • page (default 1) — page number.
  • limit (default 10) — records per page.

The whole flow

GET  /api/payments/packs   →  show the packs
POST /api/payments/create  →  receive order_id + html_3d
     render html_3d for the customer
     bank → POST /api/payments/callback
GET  /api/payments/order   →  confirm the outcome
GET  /api/users/api-keys   →  read the updated remaining value

Last updated: September 22, 2026