Skip to main content
POST
/
sessions
Create a payment session
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({paymentId: '<string>', expiresIn: 86400})
};

fetch('https://api.prudra.dev/sessions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "sessionId": "sess_abc123",
  "vaultId": "vlt_abc123",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

Body

application/json
paymentId
string
required
expiresIn
integer
default:86400

Session TTL in seconds

Response

Session created

sessionId
string
required
Example:

"sess_abc123"

vaultId
string
required
Example:

"vlt_abc123"

expiresAt
string<date-time>
required