Prefer zero frontend code? The REST checkout walkthrough does
the same flow with hosted card entry and nothing but cURL.
Prerequisites (all self-serve)
- Sign up at dashboard.prava.space and create an API key; you get
pk_test_*+sk_test_*instantly (Quickstart has the details). - Add your app’s domain to allowed domains in the dashboard.
- Install the SDK:
npm install @prava-sdk/core.
Step 1 — Backend: create a session
Your server pins the order and returns the session to your frontend. The secret key never leaves the server.Step 2 — Frontend: collect the card
Mount Prava’s PCI-compliant iframe in your page. The raw card number never touches your DOM, JavaScript, or servers.Step 3 — Backend: get the credentials and check out
After collection, poll the payment result. When a line item reachesawaiting_result it carries the
one-time credentials.
Step 4 — Backend: report the outcome
Always close the loop, whether the checkout succeeded or failed:status becomes completed. Details: Report Status.
Step 5 — Test it
Run the whole flow in sandbox with a test card. See Testing in Sandbox for the checklist and what behaves differently.Ship it
Go-live checklist
Swap to live keys, verify domains, and what needs Prava’s sign-off.
Errors reference
Every code you might hit along this flow, with recovery steps.