> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Set up your Payrails account and environment

> Set up the account foundations every Payrails module shares: API credentials and mTLS, users and roles, and workspaces.

Before integrating any Payrails module—whether it’s Payment Acceptance, Token Vault, Fraud Management, Reconciliation, or Analytics—you’ll need to set up the foundational elements of your account and environment. This section guides you through everything required to get started securely and efficiently.

Payrails is modular, but your setup is centralized: once configured, these settings apply across all modules and teams in your organization, ensuring a consistent and secure foundation for your integration.

## What You’ll Set Up

Each of the following sections walks you through a key part of your integration foundation. You will be provided staging and production environments to separate testing from live traffic, and will manage below aspects for each separately.

### 1. API Credentials and mTLS

Learn how to generate, rotate, and manage API credentials for secure access across environments, as well as configure the mutual TLS for added security.

### 2. Users, Roles & Permissions

Invite your team, assign permissions, and control access across workspaces and modules.

### 3. Organizations & Workspaces

Understand how organizations are structured in Payrails and how workspaces isolate data, environments, and permissions.


## Related topics

- [Create a payment link](/docs/orchestration/payment-links/create-a-payment-link.md)
- [Explore Payrails](/docs/explore-payrails.md)
- [Workspaces](/docs/account-setup/workspaces.md)
