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

# Meta Fields

> How to use meta fields with your execution context.

Part of Payrails's power comes from its ability to unify the many languages providers speak into one common language. However, this is a huge challenge! So, this document explains how our meta fields work and how we map them to different providers.

## What are *meta fields*?

When using our APIs, some fields are required, and some are optional. We define them according to whether we need them to process your requests or to control our features.

However, when your request includes a call to an external provider, they will also have their own required or optional fields, possibly with different names and formats. Don't worry! Payrails will handle that translation, but we need your help giving us all the information we need to do it in a generic way so that when you add new providers, your requests have minimal to no change.

The place where you send information so Payrails can translate it to provider-specific terminology is what we call **meta fields**. They can be sent in most of our endpoints in a field called `meta`, and have a predefined structure described in our API docs, for example, in the [Authorize action](/reference/authorizeaction).

## Importance of Meta Fields

Meta fields are essential for several reasons:

* **Enhanced Transaction Management:** Meta fields allow merchants to capture specific details about each transaction, facilitating better order management and tracking.
* **Improved Risk Assessment:** Meta fields provide valuable data for assessing the risk associated with each transaction, enabling fraud prevention measures and authentication processes.
* **Customization and Personalization:** Meta fields offer flexibility for merchants to customize the payment experience for their customers, enhancing user satisfaction and loyalty.
* **Compliance and Reporting:** Meta fields help ensure compliance with regulatory requirements by capturing necessary information for reporting and auditing purposes.

## Required or optional

Initially, they are all optional because we don't actually need them in Payrails. However, as you add providers to your ecosystem or write rules into your workflows, whatever fields they require become required by Payrails. The same happens if you start using meta fields in your routing rules; we will need them to decide where to process your authorizations, so they will be marked as required.

Then how can you know if they are required? You must check your **Meta fields** page in your Merchant Portal. We show you whether they are required, and if they are, we tell you who is making them required (e.g., a rule, a provider, etc.). Also, you will find the expected format and some example values.

Even if your meta fields are optional, we recommend sending them anyway for the following reasons:

* they may become required once you include more providers in your routing logic
* sometimes they aren't required, but the performance of your authorizations is lower if they are missing
* your fraud providers will have a better picture to evaluate the risk of your transaction
* your tracking and reporting will be more complete and informative

## Categories

Meta fields can belong to various categories, including:

* **`clientContext`:** Browser and device information, screen dimensions, language settings, etc.
* **`customer`:** Personal and contact information, identity verification, etc.
* **`risk`:** Authentication, fraud prevention, risk scores, etc.
* **`order`:** Order amount, billing and delivery details, soft descriptor, etc.
  * For more information about the breakdown of costs, check the [order costs](/docs/orchestration/payment-acceptance/meta-fields/order-costs) guide.
* **`subscription`:** Subscription frequency, expiration date, etc.
* **`vendor`:** Vendor details, address information, etc.
* **`tags`**: Any extra tag you want to assign to your execution for later reconciliation.

In case you want to add new categories or simply more meta fields to your execution, you can just add them to the `meta` JSON object in your requests, and they will be available as context for your executions when you query the [Get an execution by ID](/reference/getexecution) endpoint.


## Related topics

- [Payabl.](/docs/orchestration/integrations/payabl.md)
- [PAYCO](/docs/orchestration/payment-methods/payco.md)
- [Pix Automático](/docs/orchestration/payment-methods/pix-automatico.md)
