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

# Razer Gold via Razer

> Set up Razer Gold wallet payments through Razer in Payrails, and see the fields Razer needs on each request.

Accept [Razer Gold](/docs/orchestration/payment-methods/razer-gold) payments with Razer as the payment service provider (PSP). The customer selects Razer Gold in your checkout, signs in to their Razer Gold wallet on the Razer checkout page and approves the payment.

## Supported workflows

<table>
  <thead>
    <tr><th>Workflow</th><th>Supported</th></tr>
  </thead>

  <tbody>
    <tr><td>Payrails SDK</td><td>✔</td></tr>
    <tr><td>Payrails API</td><td>✔</td></tr>
    <tr><td>[Delayed / Manual Capture](/docs/orchestration/payment-acceptance/capture-and-cancel-modes#capture-mode)</td><td>✖</td></tr>
    <tr><td>[Instant Capture](/docs/orchestration/payment-acceptance/capture-and-cancel-modes#capture-mode)</td><td>✔</td></tr>
    <tr><td>[Cancel / Void](/docs/orchestration/payment-acceptance/cancel-a-payment)</td><td>✖</td></tr>
    <tr><td>[Refund / Reverse](/docs/orchestration/payment-acceptance/refund-a-payment)</td><td>✖</td></tr>
    <tr><td>[Save Instruments](/docs/resources/manage-instruments)</td><td>✖</td></tr>
    <tr><td>[Merchant Initiated Transaction (MIT)](/docs/resources/payments/authorization-flags)</td><td>✖</td></tr>
  </tbody>
</table>

## Before you begin

Complete these steps before you send your first Razer Gold payment through Razer:

1. Set up a Razer integration in your workspace. Follow the [Razer integration setup guide](/docs/orchestration/integrations/razer) if you don't have one yet.
2. Ask Razer to enable the Razer Gold wallet channel on your application.
3. In the Payrails Portal, go to **Settings → Integrations**, open your Razer integration, select **Razer Gold** under **Payment methods**, and save.
4. Add Razer Gold as a [payment option](/docs/orchestration/payment-methods/set-up-payment-methods) in your workflow.

## Request fields for Razer

Send these fields in the authorize request, in addition to the standard [authorize fields](/reference/authorizeaction). **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to the PSP when you include them.

| Field | Status | Description |
| - | - | - |
| `amount.value` | Required | Sent to Razer as `amount`, in minor units. |
| `amount.currency` | Required | Sent to Razer as `currencyCode`. Use one of the currencies on the [Razer Gold](/docs/orchestration/payment-methods/razer-gold#supported-currencies-and-countries) page. |
| `holderReference` | Required | Your reference for the customer, up to 50 alphanumeric characters. Sent to Razer as `customerId`. |
| `meta.order.description` | Optional | Sent to Razer as `description`. Payrails sends the first 255 characters. |

## Field mapping

Payrails builds each Razer payment request from your authorize request and the Razer integration. This table shows where every Razer parameter comes from.

| Razer parameter | Source |
| - | - |
| `applicationCode` | **Application Code** in the [Razer integration](/docs/orchestration/integrations/razer). |
| `referenceId` | The Payrails payment ID, without hyphens. |
| `version` | `v1`, the Razer API version. |
| `channelId` | `1` for `razerGold`, from `paymentComposition[].paymentMethodCode`. |
| `amount` | `amount.value`, in minor units. |
| `currencyCode` | `amount.currency`. |
| `customerId` | `holderReference`. |
| `description` | `meta.order.description`, up to 255 characters. |
| `returnUrl` | A Payrails redirect URL that brings the customer back to your `returnInfo` URL. |
| `callbackUrl` | The **Notification URL** of the Razer integration. |
| `hashType` | `hmac-sha256`, the signature type. |
| `signature` | An HMAC-SHA256 signature with the **Secret Key** of the Razer integration. |

## Authorize a Razer Gold payment

Call [authorize a payment](/reference/authorizeaction) with `razerGold` as the `paymentMethodCode`. The response includes the redirect to the Razer Gold checkout page.

```json Authorize request theme={null}
{
  "amount": {
    "value": "4.00",
    "currency": "USD"
  },
  "paymentComposition": [
    {
      "integrationType": "api",
      "paymentMethodCode": "razerGold",
      "amount": {
        "value": "4.00",
        "currency": "USD"
      }
    }
  ],
  "meta": {
    "order": {
      "description": "Game credits"
    }
  },
  "returnInfo": {
    "success": "https://example.com/success",
    "cancel": "https://example.com/cancel",
    "pending": "https://example.com/pending",
    "error": "https://example.com/error"
  }
}
```

Set `holderReference` when you create the workflow execution. The payment stays pending until the customer approves it. Confirm the result through [webhook notifications](/docs/orchestration/payment-acceptance/receive-notifications) or the execution status before you fulfill the order.

## How Razer handles Razer Gold

* Payrails creates the payment at Razer and returns a redirect to the Razer checkout page. Razer doesn't allow its checkout page in a frame, so the redirect opens in a full page.
* When the customer returns, Payrails queries Razer for the payment status. Razer also sends a signed result to Payrails, which updates the payment.
* Payrails checks the signature on every response and result from Razer before it updates the payment.
* Razer settles payments immediately, so a successful payment shows as **Captured**. The Razer payment ID, which starts with `MPO`, shows as the integration reference.
* An unpaid payment stays pending. If the customer doesn't complete the payment, it expires at Razer and Payrails marks it as failed.
* Each Razer Gold payment is a one-time, customer-initiated payment. Use a new payment for each attempt: Razer rejects a payment that reuses an earlier payment's reference.


## Related topics

- [Razer](/docs/orchestration/integrations/razer.md)
- [Razer Gold](/docs/orchestration/payment-methods/razer-gold.md)
- [Integrations](/docs/orchestration/integrations.md)


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