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

# Bizum via Redsys

> Accept Bizum mobile payments from customers in Spain through Redsys, and see the phone fields Payrails requires.

Accept [Bizum](/docs/orchestration/payment-methods/bizum) payments with Redsys as the payment service provider (PSP). Payrails sends a payment request to the customer's phone, and the customer approves it in their banking app.

## 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 Bizum payment through Redsys:

1. Set up a Redsys integration in your workspace. Follow the [Redsys integration setup guide](/docs/orchestration/integrations/redsys) if you don't have one yet.
2. Ask your acquiring bank to activate Bizum on the Redsys terminal you use with Payrails.
3. In the Payrails Portal, go to **Settings → Integrations**, open your Redsys integration, select **Bizum** under **Payment methods**, and save.
4. Add Bizum as a [payment option](/docs/orchestration/payment-methods/set-up-payment-methods) in your workflow.

## Request fields for Redsys

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 |
| - | - | - |
| `meta.customer.phone.number` | Required | The customer's mobile number without the dialing code. The customer receives the payment request on this number. |
| `meta.customer.phone.countryCode` | Required | The dialing code of the customer's phone, for example `34`. Payrails sends it to Redsys in front of the number. |
| `meta.customer.name`, `meta.customer.lastName` | Optional | Sent to Redsys as the customer name. |
| `meta.customer.language` | Optional | Sent to Redsys as the customer language. |
| `meta.order.description` | Optional | Sent to Redsys as the product description. |
| `meta.clientContext.ipAddress` | Optional | Sent to Redsys as the customer IP. |

## Authorize a Bizum payment

Call [authorize a payment](/reference/authorizeaction) with `bizum` as the `paymentMethodCode`.

```json Authorize request theme={null}
{
  "amount": {
    "value": "25.00",
    "currency": "EUR"
  },
  "paymentComposition": [
    {
      "integrationType": "api",
      "paymentMethodCode": "bizum",
      "amount": {
        "value": "25.00",
        "currency": "EUR"
      }
    }
  ],
  "meta": {
    "customer": {
      "name": "Lucía",
      "lastName": "García",
      "phone": {
        "countryCode": "34",
        "number": "612345678"
      }
    },
    "order": {
      "description": "Order 4821"
    }
  },
  "returnInfo": {
    "success": "https://example.com/success",
    "error": "https://example.com/error"
  }
}
```

The payment stays pending until the customer approves it in their banking app. Confirm the result through [webhook notifications](/docs/orchestration/payment-acceptance/receive-notifications) or the execution status before you fulfill the order.

## How Redsys handles Bizum

* Payrails sends Redsys a Bizum request to pay, addressed to the customer's phone number with its dialing code.
* Payrails checks that both the phone number and the dialing code are present before it calls Redsys.
* A Bizum payment needs no redirect and no 3D Secure. Payrails keeps the payment pending until Redsys sends the final result as a notification.
* With instant capture, Redsys charges the customer as soon as they approve the payment. With manual capture, the customer approves the payment first, and Redsys charges it when you [capture the payment](/docs/orchestration/payment-acceptance/capture-and-cancel-modes#capture-mode).
* Refunds go back to the customer's bank account through Redsys.
* Each Bizum payment is a new customer-initiated payment.


## Related topics

- [Redsys](/docs/orchestration/integrations/redsys.md)
- [Bizum](/docs/orchestration/payment-methods/bizum.md)
- [Bizum via Checkout.com](/docs/orchestration/payment-methods/bizum/checkout-com.md)


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