> ## 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.

# Choose the right integration approach

When integrating with Payrails it is important to consider different possible approaches, in particular with the client-side implementation. We offer a range of different SDKs with various degrees of customization and PCI scope. Below is an overview of the different aspects you should consider when choosing your integration approach.

## What should you consider when choosing an approach?

1. **Customization vs. ease of integration -** If you want the simplest client-side implementation that still leverages our orchestration features, consider our Drop-in SDK. For maximal control over UX and presentation, Elements or Secure Fields would be the better approach.
2. **PCI compliance -** All of our client-side SDKs as well as our client-side encryption solution leverage our PCI-compliant token vault and enable you to minimize your PCI scope. However, if you want to collect and tokenize card data yourself you can also integrate with Payrails using only our API.
3. **Adding new payment methods -** Our drop-in SDK has all of the frontend code for all payment methods built in. So adding new payment methods like Apple Pay and Google Pay requires no additional frontend implementation from your side. On the other hand, if you would like to have more control over the UX in your checkout flow, you can use other integration approaches to decide where to place payment options in your application.

See below an overview of different functionalities supported by different integration approaches. If you still have questions about the best approach, contact your Payrails representative and we will be happy to advise you.

| I want to... | Drop-in | Elements | Secure fields | Client-side encryption | API only |
| :- | :- | :- | :- | :- | :- |
| Leverage Payrails' orchestration features (routing, retries, etc.) | ✅ | ✅ | ✅ | ✅ | ✅ |
| Leverage Payrails' PCI-DSS certification to collect PAN data in your application | ✅ | ✅ | ✅ | ✅ | ❌ |
| Tokenize payment methods with no additional frontend code | ✅ | ✅ | ❌ | ❌ | ❌ |
| Add new payment methods with no additional frontend code | ✅ | ❌ | ❌ | ❌ | ❌ |
| Customize the style of a Payrails SDK with my own CSS | ✅ | ❌ | ❌ | ❌ | ❌ |
| Have complete control over UX in my checkout flow, i.e., payment method position, style, and animations | ❌ | ✅ | ✅ | ✅ | ✅ |

## What are the next steps after choosing an approach?

Once you have decided for the right integration approach, you can get started working on the client-side implementation. To get started with the SDKs in general, see [Payrails Checkout SDKs](https://docs.payrails.com/docs/orchestration/checkout-sdks), and for specifics about each SDK type refer to dedicated guides for [Drop-in](https://docs.payrails.com/docs/orchestration/checkout-sdks/web-v5-legacy/drop-in.md), [Elements](https://docs.payrails.com/docs/orchestration/checkout-sdks/web-v5-legacy/elements.md), or [Secure Fields](https://docs.payrails.com/docs/orchestration/checkout-sdks/web-v5-legacy/secure-fields.md).

Alternatively, if you decide to opt for more flexibility on the frontend and decide not to use one of our SDKs, refer to guides for [client-side encryption](https://docs.payrails.com/docs/token-vault/tokenize-payment-instruments/tokenize-cards-with-client-side-encryption.md) or [accepting payments via API](https://docs.payrails.com/docs/orchestration/checkout-sdks/accept-payments-via-api.md).


## Related topics

- [Getting Started](https://docs.payrails.com/docs/orchestration/getting-started.md)
- [Apple Pay](https://docs.payrails.com/docs/orchestration/payment-methods/apple-pay.md)
- [Tokenize Cards via SDK](https://docs.payrails.com/docs/token-vault/tokenize-payment-instruments.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.