Skip to main content
POST
Register a card for a merchant-scoped customer without creating an order, transaction, mandate, cryptogram, or payment credential. POST /v1/sessions/enroll-card · Authenticated with your secret key.
This endpoint has two deliberately different contracts. provision_only is a synchronous, server-to-server operation. full_enrollment creates an interactive session that the cardholder completes on Prava’s secure surface.

Choose the request shape

Do not send iframe-only fields with provision_only. The request schemas are strict: integration_type and callback_url are accepted only with full_enrollment, and unknown fields return 400 VAL_2001.

Request examples by use case

Choose the example that matches both where the card comes from and how Prava’s secure surface should open.

Body

Common fields

string
required
Your stable identifier for this customer. It is scoped to the merchant account authenticated by your secret key. Must be non-blank and no longer than 255 characters.
string
Customer email, maximum 320 characters. It is optional only when Prava already has an email for this merchant’s user_id; otherwise the request returns 400 ENROLL_USER_EMAIL_REQUIRED.
Optional reference to the consent record in your system, maximum 255 characters. When present it must be non-blank and contain no control characters. Prava records whether this reference was supplied; it does not independently validate the underlying consent.
string
default:"provision_only"
provision_only or full_enrollment. Omitting the field preserves the existing provision_only behavior.

Mode-specific fields

string
Skyflow record UUID created using your configured card-collection credentials. Required for provision_only. Optional for full_enrollment: include it to skip card entry, or omit it to let the cardholder enter a card in Prava’s iframe.
string
default:"full_checkout"
Full enrollment only. Use embedding to mount the secure surface inside your application, or full_checkout to open the Prava-hosted flow.
string
Full enrollment only. Optional HTTPS URL, maximum 2048 characters. In hosted mode Prava redirects the cardholder here after completion. If omitted, the final screen remains visible and tells the cardholder they may safely close it.

Provision only

Use this mode when you already have a valid vault_ref_id and only need the card provisioned. The call completes synchronously and returns the merchant-scoped card identifier. Do not call the enrollment-status endpoint for this mode. The 201 response is the result.

Full enrollment

Full enrollment makes the card and passkey ready for later use. It creates an orderless session and returns the same client artifacts used by other Prava interactive surfaces:
string
Identifier used when polling enrollment status.
string
Short-lived token passed to the SDK for iframe authentication.
string
ISO 8601 expiry. Treat this returned value as authoritative.
string
Secure Prava URL. Pass or open it exactly as returned.
There is no order_id, transaction identifier, payment token, dynamic CVV, or cryptogram in this response.
Omit vault_ref_id. The cardholder enters the card on Prava’s secure surface, then completes passkey setup or verifies an existing passkey.

Integration types

Set integration_type: "embedding", return the session artifacts from your backend to your frontend, and mount the returned iframe_url using the SDK.
Keep the SDK mounted after onSuccess. For a full-enrollment session, completion is signaled by onEnrollmentComplete, and your backend should confirm it through Get Card Enrollment Status.

Complete integration sequence

1

Create the session on your backend

Call this endpoint with your secret key. Never expose the secret key in browser code.
2

Open Prava's secure surface

Embed or navigate to iframe_url. Pass it exactly as returned; it already contains the session_id.
3

Poll from your backend

Poll GET /v1/sessions/{sessionId}/status. Do not send your secret key from the browser.
4

Accept the terminal result

Enrollment succeeded only when status is completed and outcome is fully_enrolled.
Retries happen inside the same iframe. If the status response contains error.retryable: true, do not create a new session and do not call a retry endpoint. Keep the current iframe available while the cardholder selects Try again; Prava reuses the already selected or provisioned card.

Error responses

Full-enrollment failures that occur after the session is created are returned through the status resource, not by changing this create response. Every response includes an X-Response-ID header. Include it when contacting support@prava.space.