# Configurar una suscripción con débito directo SEPA Obtén información sobre cómo crear y cobrar una suscripción con débito directo SEPA. # Página alojada > This is a Página alojada for when platform is web and payment-ui is stripe-hosted. View the full page at https://docs.stripe.com/billing/subscriptions/sepa-debit?platform=web&payment-ui=stripe-hosted. Echa un vistazo al [ejemplo en GitHub](https://github.com/stripe-samples/checkout-single-subscription) o explora la [demostración](https://checkout.stripe.dev/checkout). Una [sesión de Checkout](https://docs.stripe.com/api/checkout/sessions.md) representa los datos de la intención de compra de tu cliente. Creas una sesión de Checkout cuando el cliente quiere iniciar una *suscripción* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis). Después de redirigir a tu cliente a una sesión de Checkout, Stripe le presentará un formulario de pago en el que podrá completar su compra. Una vez completada, el cliente será redirigido de nuevo a tu sitio. ## Configurar Stripe [Lado del servidor] Instala el cliente de Stripe que prefieras: #### Ruby ```bash # Available as a gem sudo gem install stripe ``` ```ruby # If you use bundler, you can add this line to your Gemfile gem 'stripe' ``` Instala la CLI de Stripe (opcional). La CLI te permite hacer [pruebas de webhooks](https://docs.stripe.com/webhooks.md#test-webhook) y puedes ejecutarla para crear productos y precios. Para obtener más opciones de instalación, consulta [Empezar a usar la CLI de Stripe](https://docs.stripe.com/stripe-cli.md). ## Crear el modelo de tarifas [Dashboard] [CLI de Stripe] Los [modelos de precios recurrentes](https://docs.stripe.com/products-prices/pricing-models.md) representan los productos o servicios que vendes, cuánto cuestan, qué monedas aceptas para los pagos y el período de servicio para las suscripciones. Para crear el modelo de precios, crea [productos](https://docs.stripe.com/api/products.md) (lo que vendes) y [precios](https://docs.stripe.com/api/prices.md) (cuánto cuestan y con qué frecuencia cobrar por los productos). En este ejemplo, se utiliza una tarifa con tasa fija con dos opciones de niveles de servicio diferentes: básico y premium. Para cada opción de nivel de servicio, debes crear un producto y un precio recurrente. Si quieres agregar un cargo por única vez, como el costo de instalación, crea un tercer producto con un precio por única vez. Cada producto se factura de forma mensual. El precio del producto básico es de 5 EUR. El precio del producto premium es de 15 EUR. Consulta la guía de [tarifas con tasa fija](https://docs.stripe.com/subscriptions/pricing-models/flat-rate-pricing.md) para ver un ejemplo con tres niveles. #### Dashboard Ve a la página [Agregar un producto](https://dashboard.stripe.com/test/products/create) y crea dos productos. Agrega un precio a cada producto, cada uno con un período de facturación mensual recurrente: - Producto prémium: servicio prémium con más funcionalidades - Precio: Tarifa plana | 15 EUR - Producto básico: servicio básico con las funcionalidades mínimas - Precio: Tarifa plana | 5 EUR Después de crear los precios, registra los ID de precio para usarlos en otros pasos. Los ID de precio se ven así: `price_G0FvDp6vZvdwRZ`. Cuando esté todo listo, usa el botón **Copiar en modo activo**, en la parte superior derecha de la página, para clonar el producto y pasarlo de [entorno de prueba a modo activo](https://docs.stripe.com/keys.md#test-live-modes). #### API Puedes usar la API para crear los [productos](https://docs.stripe.com/api/products.md) y los [precios](https://docs.stripe.com/api/prices.md). Crear el producto premium: ```curl curl https://api.stripe.com/v1/products \ -u "<>:" \ --data-urlencode "name=Billing Guide: Premium Service" \ -d "description=Premium service with extra features" ``` Crear el producto básico: ```curl curl https://api.stripe.com/v1/products \ -u "<>:" \ --data-urlencode "name=Billing Guide: Basic Service" \ -d "description=Basic service with minimum features" ``` Registra el ID de cada producto. Se ve así: ```json { "id": "prod_H94k5odtwJXMtQ", "object": "product", "active": true, "attributes": [ ], "created": 1587577341, "description": "Premium service with extra features", "images": [ ], "livemode": false, "metadata": { }, "name": "Billing Guide: Premium Service", "statement_descriptor": null, "type": "service", "unit_label": null, "updated": 1587577341 } ``` Usa los ID de producto para crear el precio de cada producto. El número [unit_amount](https://docs.stripe.com/api/prices/object.md#price_object-unit_amount) está en centavos. Por ejemplo, `1500` = 15 EUR. Crear el precio superior: ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d product={{PREMIUM_PRODUCT_ID}} \ -d unit_amount=1500 \ -d currency=usd \ -d "recurring[interval]=month" ``` Crear el precio básico: ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d product={{BASIC_PRODUCT_ID}} \ -d unit_amount=500 \ -d currency=usd \ -d "recurring[interval]=month" ``` Registra el ID de cada precio para poder utilizarlo en los pasos siguientes. Se ve así: ```json { "id": "price_HGd7M3DV3IMXkC", "object": "price", "product": "prod_HGd6W1VUqqXGvr", "type": "recurring", "currency": "eur", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "active": true, "billing_scheme": "per_unit", "created": 1589319695, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "unit_amount": 1500, "unit_amount_decimal": "1500", "tiers": null, "tiers_mode": null, "transform_quantity": null } ``` Para ver otros modelos de tarifas, consulta los [ejemplos de Billing](https://docs.stripe.com/products-prices/pricing-models.md). ## Crear una sesión de Checkout [Lado del cliente] [Lado del servidor] Agrega un botón para finalizar la compra en tu sitio web que llame a un punto de conexión del lado del servidor para crear una sesión de Checkout. ```html Checkout
``` ### Parámetros de la sesión de Checkout Consulta [Crea una sesión de Checkout](https://docs.stripe.com/api/checkout/sessions/create.md) para obtener una lista completa de los parámetros que pueden usarse. Crea una sesión de Checkout con la ID de un *precio* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions) existente. Asegúrate de que el modo esté configurado en `subscription` y de especificar al menos un precio recurrente. Puedes agregar precios únicos además de los precios recurrentes. Después de crear la sesión de Checkout, redirige a tu cliente a la [URL](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-url) devuelta en la respuesta. #### cURL ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Cuando el cliente completa correctamente su pago, se lo redirige a `success_url`, una página de tu sitio web que le informa que su pago se realizó correctamente. Haz que el ID de sesión esté disponible en la página de éxito incluyendo la variable de la plantilla `{CHECKOUT_SESSION_ID}` en el `success_url` como en el ejemplo anterior. Cuando tu cliente hace clic en tu logotipo en una sesión de Checkout sin completar un pago, Checkout lo redirige de nuevo a tu sitio web que el cliente vio antes de ser redirigido a Checkout. Las sesiones de Checkout vencen 24 horas después de su creación de forma predeterminada. Desde el [Dashboard](https://dashboard.stripe.com/settings/payment_methods), habilita los métodos de pago de tus clientes que quieras aceptar. Checkout acepta [varios métodos de pago](https://docs.stripe.com/payments/payment-methods/payment-method-support.md#product-support). > No te bases solo en el redireccionamiento a la `success_url` para detectar el inicio del pago, por la siguiente razón: > > - Algunos usuarios maliciosos podrían acceder directamente a la `success_url` y tener acceso a los bienes o servicios sin pagar. - Después de que un pago se efectúe correctamente, los clientes pueden cerrar la pestaña de su navegador antes de ser redirigidos a la `success_url`. ## Confirmar que el pago se efectuó correctamente Cuando tu cliente completa correctamente el pago, Stripe lo redirige a la URL que especificaste en el parámetro `success_url`. Por lo general, esta es una página de tu sitio web que le informa al cliente que su pago se efectuó correctamente. Sin embargo, es un método de pago con notificación diferida, lo que significa que los fondos no están disponibles de inmediato. Debido a esto, retrasa el pedido *PaymentIntent* hasta que estén disponibles los fondos. Una vez que se efectúe correctamente el pago, el estado subyacente *PaymentIntent* cambia de `procesamiento` a `efectuado correctamente`. Puedes confirmar que el pago se efectuó correctamente de varias maneras: #### Dashboard Los pagos exitosos se muestran en la [lista de pagos](https://dashboard.stripe.com/payments) del Dashboard. Cuando haces clic en un pago, te lleva a la página de detalles del pago. La sección **Checkout summary** contiene la información de facturación y la lista de artículos comprados, que puedes usar para cumplir el pedido manualmente. ![](https://b.stripecdn.com/docs-statics-srv/assets/source.16d3029596357c80a8efdbbfe106108a.png) > Stripe puede ayudar a que te mantengas actualizado respecto de los pagos entrantes mediante notificaciones por correo electrónico cada vez que un cliente efectúa un pago correctamente. Usa el Dashboard para [configurar notificaciones de correo electrónico](https://dashboard.stripe.com/settings/user). #### Webhooks Enviamos los siguientes eventos de Checkout cuando el estado del pago cambia: | Nombre del evento | Descripción | Próximos pasos | | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | [checkout.session.completed](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.completed) | El cliente ha autorizado correctamente el pago con débito enviando el formulario de Checkout. | Espera hasta saber si el pago se efectuó correctamente o no. | | [checkout.session.async_payment_succeeded](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_succeeded) | El método de pago aplazado acabó triunfando. | Entrega los bienes o servicios que el cliente compró. | | [checkout.session.async_payment_failed](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_failed) | El método de pago aplazado finalmente fracasó. | Envía un correo electrónico al cliente y solicita que intente el pago nuevamente. | | [invoice.paid](https://docs.stripe.com/api/events/types.md#event_types-invoice.paid) | El pago del cliente se efectuó correctamente. | Entrega los bienes o servicios que el cliente compró. | | [invoice.payment_failed](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_failed) | El pago del cliente se rechazó o falló por algún otro motivo. | Ponte en contacto con el cliente por correo electrónico y solicítale que intente nuevamente el pago. | El código de su webhook debe gestionar todos estos eventos del proceso de compra. Cada carga de webhooks de Checkout incluye el [objeto Checkout Session](https://docs.stripe.com/api/checkout/sessions.md), y los webhooks de factura incluyen el objeto [Invoice](https://docs.stripe.com/api/invoices/object.md). Ambos contienen información sobre el *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) y el *PaymentIntent* (The Payment Intents API tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods). . Stripe envía el webhook `checkout.session.completed` a tu servidor antes de redirigir al cliente. La confirmación de tu webhook (cualquier código de estado `2xx`) activa el redireccionamiento del cliente a `success_url`. Si Stripe no recibe una confirmación dentro de los 10 segundos de un pago correcto, tu cliente se redirigirá automáticamente a la página `success_url`. Te recomendamos [usar webhooks](https://docs.stripe.com/webhooks.md) para confirmar que el pago se efectuó correctamente y cumplir con la entrega de los productos o servicios comprados por el cliente. A continuación, verás un ejemplo de un punto de conexión de webhooks que gestiona el éxito o la falla de un pago: #### Ruby ```ruby # Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. # Find your keys at https://dashboard.stripe.com/apikeys. Stripe.api_key = '<>' # You can find your endpoint's secret in your webhook settings endpoint_secret = 'whsec_...' # Using Sinatra post '/webhook' do payload = request.body.read event = nil # Verify webhook signature and extract the event # See https://stripe.com/docs/webhooks#verify-events for more information. sig_header = request.env['HTTP_STRIPE_SIGNATURE'] begin event = Stripe::Webhook.construct_event( payload, sig_header, endpoint_secret ) rescue JSON::ParserError => e # Invalid payload status 400 return rescue Stripe::SignatureVerificationError => e # Invalid signature status 400 return end case event['type'] when 'checkout.session.completed' session = event['data']['object'] subscription_id = session.subscription # Find the subscription or save it to your database. # invoice.paid may have fired before this so there # could already be a subscription. find_or_create_subscription(subscription_id) when 'invoice.paid' invoice = event['data']['object'] subscription_id = invoice.parent.subscription_details.subscription # Find the subscription or save it to your database. # checkout.session.completed may not have fired yet # so we may need to create the subscription. subscription = find_or_create_subscription(subscription_id) # Fulfill the purchase fulfill_order(invoice) # Record that the subscription has been paid for # this payment period. invoice.paid will fire every # time there is a payment made for this subscription. record_as_paid_for_this_period(subscription) when 'invoice.payment_failed' invoice = event['data']['object'] # Send an email to the customer asking them to retry their payment email_customer_about_failed_payment(invoice) end status 200 end ``` Puedes obtener información sobre el cliente, el pago o la suscripción recuperando los objetos `Customer`, `PaymentIntent` o `Subscription` a los que hacen referencia las propiedades `customer`, `payment_intent` y `subscription` en la carga del webhook. ### Cómo recuperar ítems de factura del webhook Los webhooks de Checkout, de forma predeterminada, no devuelven `line_items`. Para recuperar los ítems creados en la sesión de Checkout, debes hacer una solicitud adicional con el ID de la sesión de Checkout: #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions/{{CHECKOUT_SESSION_ID}}/line_items \ -u <>: ``` #### CLI de Stripe ```bash stripe get /v1/checkout/sessions/{{CHECKOUT_SESSION_ID}}/line_items ``` ### Cómo probar webhooks a nivel local Para probar los webhooks localmente, puedes utilizar la [CLI de Stripe](https://docs.stripe.com/stripe-cli.md). Después de instalarla, puedes reenviar eventos a tu servidor: ```bash stripe listen --forward-to localhost:4242/webhook Ready! Your webhook signing secret is '{{WEBHOOK_SIGNING_SECRET}}' (^C to quit) ``` Más información sobre [cómo configurar webhooks](https://docs.stripe.com/webhooks.md). #### Plugins de terceros Puedes usar plugins como [Zapier](https://stripe.com/works-with/zapier) para automatizar la actualización de tus sistemas de gestión logística de pedidos con la información de los pagos de Stripe. Veamos algunos ejemplos de automatización que se basan en plugins: - Cómo actualizar planillas utilizadas para el seguimiento de pedidos en respuesta a los pagos efectuados correctamente - Cómo actualizar los sistemas de gestión de inventarios en respuesta a los pagos efectuados correctamente - Cómo activar notificaciones a los equipos internos de servicio al cliente mediante correo electrónico o aplicaciones de chat ## Probar la integración Puedes probar tu integración usando los Códigos Internacionales de Cuenta Bancaria (IBAN) que figuran a continuación. Los detalles del método de pago se recopilan para cada IBAN, pero muestran un comportamiento diferente cuando se cobran. ##### Prueba los IBAN Usa estos IBAN de prueba con el Payment Element para probar tu integración de débito directo SEPA. El Payment Element valida automáticamente el Código Internacional de Cuenta Bancaria (IBAN) y muestra la orden cuando ingresas uno de estos valores de prueba. ### AT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | AT611904300234573201 | pm_success_at | The PaymentIntent status transitions from `processing` to `succeeded`. | | AT321904300235473204 | pm_successDelayed_at | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | AT861904300235473202 | pm_failed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | AT051904300235473205 | pm_failedDelayed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | AT591904300235473203 | pm_disputed_at | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | AT981904300000343434 | pm_exceedsWeeklyVolumeLimit_at | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | AT601904300000121212 | pm_exceedsWeeklyTransactionLimit_at | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | AT981904300002222227 | pm_insufficientFunds_at | The payment fails with an `insufficient_funds` failure code. | ### BE | Account Number | Token | Description | | ---------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | BE62510007547061 | pm_success_be | The PaymentIntent status transitions from `processing` to `succeeded`. | | BE78510007547064 | pm_successDelayed_be | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | BE68539007547034 | pm_failed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | BE51510007547065 | pm_failedDelayed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | BE08510007547063 | pm_disputed_be | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | BE90510000343434 | pm_exceedsWeeklyVolumeLimit_be | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | BE52510000121212 | pm_exceedsWeeklyTransactionLimit_be | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | BE90510002222227 | pm_insufficientFunds_be | The payment fails with an `insufficient_funds` failure code. | ### HR | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | HR7624020064583467589 | pm_success_hr | The PaymentIntent status transitions from `processing` to `succeeded`. | | HR6323600002337876649 | pm_successDelayed_hr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | HR2725000096983499248 | pm_failed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | HR6723600004878117427 | pm_failedDelayed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | HR8724840081455523553 | pm_disputed_hr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | HR7424020060000343434 | pm_exceedsWeeklyVolumeLimit_hr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | HR3624020060000121212 | pm_exceedsWeeklyTransactionLimit_hr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | HR7424020060002222227 | pm_insufficientFunds_hr | The payment fails with an `insufficient_funds` failure code. | ### EE | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | EE382200221020145685 | pm_success_ee | The PaymentIntent status transitions from `processing` to `succeeded`. | | EE222200221020145682 | pm_successDelayed_ee | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | EE762200221020145680 | pm_failed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | EE922200221020145683 | pm_failedDelayed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | EE492200221020145681 | pm_disputed_ee | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | EE672200000000343434 | pm_exceedsWeeklyVolumeLimit_ee | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | EE292200000000121212 | pm_exceedsWeeklyTransactionLimit_ee | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | EE672200000002222227 | pm_insufficientFunds_ee | The payment fails with an `insufficient_funds` failure code. | ### FI | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FI2112345600000785 | pm_success_fi | The PaymentIntent status transitions from `processing` to `succeeded`. | | FI3712345600000788 | pm_successDelayed_fi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FI9112345600000786 | pm_failed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FI1012345600000789 | pm_failedDelayed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FI6412345600000787 | pm_disputed_fi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FI6712345600343434 | pm_exceedsWeeklyVolumeLimit_fi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FI2912345600121212 | pm_exceedsWeeklyTransactionLimit_fi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FI6712345602222227 | pm_insufficientFunds_fi | The payment fails with an `insufficient_funds` failure code. | ### FR | Account Number | Token | Description | | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FR1420041010050500013M02606 | pm_success_fr | The PaymentIntent status transitions from `processing` to `succeeded`. | | FR3020041010050500013M02609 | pm_successDelayed_fr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FR8420041010050500013M02607 | pm_failed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FR7920041010050500013M02600 | pm_failedDelayed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FR5720041010050500013M02608 | pm_disputed_fr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FR9720041010050000000343434 | pm_exceedsWeeklyVolumeLimit_fr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FR5920041010050000000121212 | pm_exceedsWeeklyTransactionLimit_fr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FR9720041010050000002222227 | pm_insufficientFunds_fr | The payment fails with an `insufficient_funds` failure code. | ### DE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | DE89370400440532013000 | pm_success_de | The PaymentIntent status transitions from `processing` to `succeeded`. | | DE08370400440532013003 | pm_successDelayed_de | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | DE62370400440532013001 | pm_failed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | DE78370400440532013004 | pm_failedDelayed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | DE35370400440532013002 | pm_disputed_de | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | DE65370400440000343434 | pm_exceedsWeeklyVolumeLimit_de | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | DE27370400440000121212 | pm_exceedsWeeklyTransactionLimit_de | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | DE65370400440002222227 | pm_insufficientFunds_de | The payment fails with an `insufficient_funds` failure code. | ### GI | Account Number | Token | Description | | ----------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GI60MPFS599327643783385 | pm_success_gi | The PaymentIntent status transitions from `processing` to `succeeded`. | | GI08RRNW626436291644533 | pm_successDelayed_gi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GI41SAFA461293238477751 | pm_failed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GI50LROG772261344693297 | pm_failedDelayed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GI26KJBC361883934534696 | pm_disputed_gi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GI14NWBK000000000343434 | pm_exceedsWeeklyVolumeLimit_gi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GI73NWBK000000000121212 | pm_exceedsWeeklyTransactionLimit_gi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GI14NWBK000000002222227 | pm_insufficientFunds_gi | The payment fails with an `insufficient_funds` failure code. | ### IE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | IE29AIBK93115212345678 | pm_success_ie | The PaymentIntent status transitions from `processing` to `succeeded`. | | IE24AIBK93115212345671 | pm_successDelayed_ie | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | IE02AIBK93115212345679 | pm_failed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | IE94AIBK93115212345672 | pm_failedDelayed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | IE51AIBK93115212345670 | pm_disputed_ie | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | IE10AIBK93115200343434 | pm_exceedsWeeklyVolumeLimit_ie | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | IE69AIBK93115200121212 | pm_exceedsWeeklyTransactionLimit_ie | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | IE10AIBK93115202222227 | pm_insufficientFunds_ie | The payment fails with an `insufficient_funds` failure code. | ### LI | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LI0508800636123378777 | pm_success_li | The PaymentIntent status transitions from `processing` to `succeeded`. | | LI4408800387787111369 | pm_successDelayed_li | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LI1208800143823175626 | pm_failed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LI4908800356441975566 | pm_failedDelayed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LI7708800125525347723 | pm_disputed_li | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LI2408800000000343434 | pm_exceedsWeeklyVolumeLimit_li | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LI8308800000000121212 | pm_exceedsWeeklyTransactionLimit_li | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LI2408800000002222227 | pm_insufficientFunds_li | The payment fails with an `insufficient_funds` failure code. | ### LT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LT121000011101001000 | pm_success_lt | The PaymentIntent status transitions from `processing` to `succeeded`. | | LT281000011101001003 | pm_successDelayed_lt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LT821000011101001001 | pm_failed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LT981000011101001004 | pm_failedDelayed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LT551000011101001002 | pm_disputed_lt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LT591000000000343434 | pm_exceedsWeeklyVolumeLimit_lt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LT211000000000121212 | pm_exceedsWeeklyTransactionLimit_lt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LT591000000002222227 | pm_insufficientFunds_lt | The payment fails with an `insufficient_funds` failure code. | ### LU | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LU280019400644750000 | pm_success_lu | The PaymentIntent status transitions from `processing` to `succeeded`. | | LU440019400644750003 | pm_successDelayed_lu | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LU980019400644750001 | pm_failed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LU170019400644750004 | pm_failedDelayed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LU710019400644750002 | pm_disputed_lu | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LU900010000000343434 | pm_exceedsWeeklyVolumeLimit_lu | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LU520010000000121212 | pm_exceedsWeeklyTransactionLimit_lu | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LU900010000002222227 | pm_insufficientFunds_lu | The payment fails with an `insufficient_funds` failure code. | ### NL | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NL39RABO0300065264 | pm_success_nl | The PaymentIntent status transitions from `processing` to `succeeded`. | | NL55RABO0300065267 | pm_successDelayed_nl | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NL91ABNA0417164300 | pm_failed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NL28RABO0300065268 | pm_failedDelayed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NL82RABO0300065266 | pm_disputed_nl | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NL27RABO0000343434 | pm_exceedsWeeklyVolumeLimit_nl | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NL86RABO0000121212 | pm_exceedsWeeklyTransactionLimit_nl | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NL55RABO0300065267 | pm_insufficientFunds_nl | The payment fails with an `insufficient_funds` failure code. | ### NO | Account Number | Token | Description | | --------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NO9386011117947 | pm_success_no | The PaymentIntent status transitions from `processing` to `succeeded`. | | NO8886011117940 | pm_successDelayed_no | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NO6686011117948 | pm_failed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NO6186011117941 | pm_failedDelayed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NO3986011117949 | pm_disputed_no | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NO0586010343434 | pm_exceedsWeeklyVolumeLimit_no | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NO0586010343434 | pm_exceedsWeeklyTransactionLimit_no | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NO0586012222227 | pm_insufficientFunds_no | The payment fails with an `insufficient_funds` failure code. | ### PT | Account Number | Token | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | PT50000201231234567890154 | pm_success_pt | The PaymentIntent status transitions from `processing` to `succeeded`. | | PT66000201231234567890157 | pm_successDelayed_pt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | PT23000201231234567890155 | pm_failed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | PT39000201231234567890158 | pm_failedDelayed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | PT93000201231234567890156 | pm_disputed_pt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | PT05000201230000000343434 | pm_exceedsWeeklyVolumeLimit_pt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | PT64000201230000000121212 | pm_exceedsWeeklyTransactionLimit_pt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | PT05000201230000002222227 | pm_insufficientFunds_pt | The payment fails with an `insufficient_funds` failure code. | ### ES | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ES0700120345030000067890 | pm_success_es | The PaymentIntent status transitions from `processing` to `succeeded`. | | ES2300120345030000067893 | pm_successDelayed_es | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | ES9121000418450200051332 | pm_failed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | ES9300120345030000067894 | pm_failedDelayed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | ES5000120345030000067892 | pm_disputed_es | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | ES1700120345000000343434 | pm_exceedsWeeklyVolumeLimit_es | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | ES7600120345000000121212 | pm_exceedsWeeklyTransactionLimit_es | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | ES1700120345000002222227 | pm_insufficientFunds_es | The payment fails with an `insufficient_funds` failure code. | ### SE | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SE3550000000054910000003 | pm_success_se | The PaymentIntent status transitions from `processing` to `succeeded`. | | SE5150000000054910000006 | pm_successDelayed_se | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | SE0850000000054910000004 | pm_failed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | SE2450000000054910000007 | pm_failedDelayed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | SE7850000000054910000005 | pm_disputed_se | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | SE2850000000000000343434 | pm_exceedsWeeklyVolumeLimit_se | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | SE8750000000000000121212 | pm_exceedsWeeklyTransactionLimit_se | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | SE2850000000000002222227 | pm_insufficientFunds_se | The payment fails with an `insufficient_funds` failure code. | ### CH | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | CH9300762011623852957 | pm_success_ch | The PaymentIntent status transitions from `processing` to `succeeded`. | | CH8656663438253651553 | pm_successDelayed_ch | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | CH5362200119938136497 | pm_failed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | CH1843597160341964438 | pm_failedDelayed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | CH1260378413965193069 | pm_disputed_ch | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | CH1800762000000343434 | pm_exceedsWeeklyVolumeLimit_ch | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | CH7700762000000121212 | pm_exceedsWeeklyTransactionLimit_ch | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | CH1800762000002222227 | pm_insufficientFunds_ch | The payment fails with an `insufficient_funds` failure code. | ### GB | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GB82WEST12345698765432 | pm_success_gb | The PaymentIntent status transitions from `processing` to `succeeded`. | | GB98WEST12345698765435 | pm_successDelayed_gb | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GB55WEST12345698765433 | pm_failed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GB71WEST12345698765436 | pm_failedDelayed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GB28WEST12345698765434 | pm_disputed_gb | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GB70WEST12345600343434 | pm_exceedsWeeklyVolumeLimit_gb | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GB32WEST12345600121212 | pm_exceedsWeeklyTransactionLimit_gb | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GB70WEST12345602222227 | pm_insufficientFunds_gb | The payment fails with an `insufficient_funds` failure code. | ## Optional: Cómo agregar un costo de instalación único [Lado del servidor] Además de especificar los precios recurrentes, puedes agregar precios únicos en modo `subscription`. Estos solo se incluyen en la *factura* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) inicial creada por la suscripción. Esta función resulta útil para agregar costos de instalación u otros costos únicos asociados a una suscripción. Puedes agregar un *precio* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions) único a un producto existente o crear un *producto* (Products represent items your customer can subscribe to with a Subscription. An associated Price object describes the pricing and other terms of the subscription) nuevo con un precio nuevo. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[0][price]"="{{RECURRING_PRICE_ID}}" \ -d "line_items[0][quantity]"=1 \ -d "line_items[1][price]"="{{ONE_TIME_PRICE_ID}}" \ -d "line_items[1][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" ``` ## Optional: Crear precios y productos alineados [Lado del servidor] Además de especificar los ID de los precios existentes, puedes crear precios nuevos al crear la sesión de Checkout. Primero, define un *producto* (Products represent what your business sells—whether that's a good or a service) y luego crea una sesión de Checkout con el ID del producto. Asegúrate de especificar [price_data](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-price_data) con los datos `unit_amount`, `currency` y `recurring`: #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \-d line_items[0][price_data][unit_amount]=5000 \ -d line_items[0][price_data][currency]=eur\ -d line_items[0][price_data][product]="{{PRODUCT_ID}}" \ -d line_items[0][price_data][recurring][interval]=month \ -d line_items[0][quantity]=1 \ -d mode=subscription \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Si también tienes que crear productos alineados, puedes hacerlo con [product_data](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-price_data-product_data): #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \-d "line_items[][price_data][currency]"=eur\ -d "line_items[][price_data][product_data][name]"=T-shirt \ -d "line_items[][price_data][unit_amount]"=2000 \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` ## Optional: Clientes existentes [Lado del servidor] Si has creado antes un objeto *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) para representar a un cliente, usa el argumento [cliente](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-customer) para especificar el ID de cliente al crear una sesión de confirmación de compra. Esto garantiza que todos los objetos creados durante la sesión estén asociados con el objeto Customer correcto. Cuando especificas un ID de cliente, Stripe también toma el correo electrónico almacenado en el objeto Customer para rellenar automáticamente el campo de correo electrónico en la página de Checkout. Si el cliente cambia el correo electrónico en la página de Checkout, se actualizará en el objeto Customer después de la efectivización de un pago. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "customer"="{{CUSTOMER_ID}}" \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" ``` ## Optional: Rellenar automáticamente los datos de los clientes [Lado del servidor] Si ya tienes el correo electrónico del cliente y quieres completarlo automáticamente en la sesión de Checkout, especifica [customer_email](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-customer_email) cuando crees una sesión de Checkout. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \-d customer_email="customer@example.com" \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \ -d mode=subscription \ -d success_url="https://example.com/success" \ ``` ## Optional: Cómo gestionar los períodos de prueba [Lado del servidor] Puedes usar [trial_end](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-trial_end) o [trial_period_days](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-trial_period_days) en la sesión de Checkout para especificar la duración del período de prueba. En este ejemplo, usamos `trial_period_days` para crear una sesión de Checkout para una suscripción con una prueba de 30 días. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "subscription_data[trial_period_days]"=30 \ -d mode=subscription \ -d success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ ``` Checkout muestra la siguiente información de forma automática para las suscripciones con períodos de prueba: - Período de prueba - Frecuencia e importe de los cargos después de vencida la prueba Para obtener más información sobre los requisitos de cumplimiento de la normativa, consulta los [Requisitos de gestión del cumplimiento](https://docs.stripe.com/billing/subscriptions/trials/manage-trial-compliance.md) o las guías de [soporte](https://support.stripe.com/questions/2020-visa-trial-subscription-requirement-changes-guide). ## Optional: Tarifas de impuesto [Lado del servidor] Puedes especificar [tasas impositivas](https://docs.stripe.com/billing/taxes/tax-rates.md) (impuesto sobre las ventas, IVA, GST, etc.) en las sesiones de Checkout para aplicar impuestos a las *suscripciones* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis). - Usa tasas impositivas fijas si conoces la tasa impositiva exacta que debes cobrar al cliente antes de que inicie al proceso de finalización de compra (por ejemplo, si solo vendes a clientes del Reino Unido y siempre cobras un 20 % de IVA). - Con la API *Prices* (Prices define how much and how often to charge for products. This includes how much the product costs, what currency to use, and the interval if the price is for subscriptions), puedes usar tasas impositivas dinámicas si necesitas más información del cliente (por ejemplo, su dirección de envío o de facturación) antes de determinar qué tasa cobrar. Si usas tasas impositivas dinámicas, creas tasas por región (por ejemplo, un 20 % de IVA para clientes en el Reino Unido un impuesto del 7.25 % sobre las ventas para clientes de California, en Estados Unidos) y Stripe intentará asignar una de esas tasas según la ubicación del cliente. #### Tasas impositivas fijas Configura [subscription_data.default_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-default_tax_rates) para aplicar una tasa impositiva predeterminada a una suscripción creada con Checkout. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "subscription_data[default_tax_rates][]"="{{TAX_RATE_ID}}" \ -d mode=subscription \ -d success_url="https://example.com/success" \ ``` También puedes especificar [line_items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-tax_rates) o [subscription_data.items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-items-tax_rates) para aplicar tasas impositivas a planes o partidas de factura específicos. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "line_items[][tax_rates][0]"="{{TAX_RATE_ID}}" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` #### Tasas impositivas dinámicas Especifica una matriz de [tasas impositivas](https://docs.stripe.com/api/tax_rates/object.md) en [line_items.dynamic_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates). Cada tasa impositiva debe incluir un `country` [admitido](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates) y, en el caso de EE. UU., un `state`. Esta lista asocia las tasas impositivas con la [dirección de envío](https://docs.stripe.com/payments/collect-addresses.md), la dirección de facturación o el país del cliente. La dirección de envío tiene prioridad sobre la dirección de facturación para determinar la tasa impositiva que se debe cobrar. Si no recopilas la dirección de envío o de facturación, se utiliza el país del cliente (y el código postal, cuando corresponda) para determinar la tasa impositiva. Si no has definido una tasa impositiva que coincida con el país o con la dirección de envío o de facturación del cliente, no se aplica ninguna tasa. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "line_items[][dynamic_tax_rates][]"="{{FIRST_TAX_RATE_ID}}" \ -d "line_items[][dynamic_tax_rates][]"="{{SECOND_TAX_RATE_ID}}" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` > [subscription_data.default_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-default_tax_rates) y [line_items.tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-tax_rates) no pueden combinarse con [line_items.dynamic_tax_rates](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-line_items-dynamic_tax_rates). Puedes utilizar las exportaciones de datos de Stripe para completar los informes periódicos necesarios para la remesa de impuestos. Para obtener más información, visita [Declaración y remesa de impuestos](https://docs.stripe.com/billing/taxes/tax-rates.md#remittance). ## Optional: Cómo agregar cupones [Lado del servidor] Puedes aplicar [cupones](https://docs.stripe.com/billing/subscriptions/coupons.md) a las suscripciones en una sesión de Checkout estableciendo [descuentos](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-discounts). Este cupón anula otros cupones del cliente. Si estás creando una suscripción para un [cliente existente](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#handling-existing-customers), los cupones asociados con el cliente se aplican a las *facturas* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) de la suscripción. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"=sepa_debit \ -d "line_items[][price]"="{{PRICE_ID}}" \ -d "line_items[][quantity]"=1 \-d "discounts[][coupon]"="{{COUPON_ID}}" \ -d "mode"="subscription" \ -d success_url="https://example.com/success" \ ``` ### Cómo agregar códigos de promoción que ve el cliente También puedes habilitar [códigos de promoción](https://docs.stripe.com/billing/subscriptions/coupons.md#promotion-codes) que el cliente puede canjear usando el parámetro [allow_promotion_codes](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-allow_promotion_codes) en las sesiones de Checkout. Cuando se habilita `allow_promotion_codes` en una sesión, Checkout incluye una casilla de canje de códigos de promoción para que tus clientes los utilicen. Crea tus [cupones](https://docs.stripe.com/billing/subscriptions/coupons.md) y códigos de promoción a través del Dashboard o la API para que tus clientes los canjeen en Checkout. #### curl ```bash curl https://api.stripe.com/v1/checkout/sessions \ -u <>: \ -d "payment_method_types[]"="sepa_debit" \ -d "line_items[0][price_data][unit_amount]"=2000 \ -d "line_items[0][price_data][currency]"="eur" \ -d "line_items[0][price_data][product]={{PRODUCT_ID}}" \ -d "line_items[0][price_data][recurring][interval]=month" \ -d "line_items[0][quantity]"=1 \-d "allow_promotion_codes"="true" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ ``` ## See also - [Personaliza tu integración](https://docs.stripe.com/payments/checkout/customization.md) - [Administrar suscripciones con el portal de clientes](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=checkout&ui=stripe-hosted) # Integración avanzada > This is a Integración avanzada for when platform is web and payment-ui is elements. View the full page at https://docs.stripe.com/billing/subscriptions/sepa-debit?platform=web&payment-ui=elements. Aprende a crear y cobrar una *suscripción* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) con débito directo SEPA. > Si eres un usuario nuevo, usa el [Payment Element](https://docs.stripe.com/payments/payment-element.md) en lugar de usar Stripe Elements como se describe en esta guía. El Payment Element ofrece una vía de integración sin código con optimizaciones de conversión integradas. Para ver las instrucciones, consulta [Crear una suscripción](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=elements). ## Crear un producto y un precio [Dashboard] Los [Productos](https://docs.stripe.com/api/products.md) representan el artículo o servicio que vendes. Los [Precios](https://docs.stripe.com/api/prices.md) definen cuánto cobras un producto y con qué frecuencia. Esto incluye el costo del producto, la moneda aceptada y si se trata de un cargo único o recurrente. Si tienes pocos productos y precios, puedes crearlos y gestionarlos en el Dashboard. La guía toma como ejemplo una foto de archivo de un servicio por el que se cobra a los clientes una suscripción mensual de 15 EUR. Para modelar la suscripción: 1. Ve a la página de [Productos](https://dashboard.stripe.com/products?active=true) y haz clic en **Crear producto**. 1. Ingresa el **Nombre** del producto. De forma opcional, puedes agregar una **Descripción** y subir una imagen del producto. 1. Selecciona un **Código de impuesto del producto**. Obtén más información sobre [códigos de impuestos de productos](https://docs.stripe.com/tax/tax-codes.md). 1. Selecciona **Recurrente**. Luego ingresa **15** para el precio y selecciona **EUR** como la moneda. 1. Elige si deseas **Incluir impuestos en el precio**. Puedes usar el valor predeterminado de tu [configuración de impuestos](https://dashboard.stripe.com/test/settings/tax) o establecer el valor manualmente. En este ejemplo, selecciona **Automático**. 1. Selecciona **Mensual** para el **período de facturación**. 1. Haz clic en **Más opciones de tarifas**. Luego selecciona **Tarifa fija** como el modelo de tarifas para este ejemplo. Obtén más información sobre [tarifa fija](https://docs.stripe.com/products-prices/pricing-models.md#flat-rate) y otros [modelos de precios](https://docs.stripe.com/products-prices/pricing-models.md). 1. Agrega una **Descripción del precio** interna y una [Clave de búsqueda](https://docs.stripe.com/products-prices/manage-prices.md#lookup-keys) para organizar, consultar y actualizar precios específicos en el futuro. 1. Haz clic en **Siguiente**. Luego haz clic en **Agregar producto**. Después de crear el producto y el precio, registra el ID del precio para usarlo en pasos sucesivos. La página de tarifas te muestra el ID, que será similar a esto: `price_G0FvDp6vZvdwRZ`. ## Crea un cliente [Lado del servidor] Una suscripción necesita un *cliente* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) para poder reutilizar los métodos de pago y hacer un seguimiento de los pagos recurrentes. Crea un objeto `Customer` cuando tu cliente cree una cuenta en tu empresa. ```curl curl -X POST https://api.stripe.com/v1/customers \ -u "<>:" ``` ## Crear la suscripción [Lado del servidor] Crea la *suscripción* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) con los ID de cliente y precio. Devuelve al lado del cliente el `client_secret` del [confirmation_secret.client_secret](https://docs.stripe.com/api/invoices/object.md#invoice_object-confirmation_secret) de la última factura o, para las suscripciones que no cobran un pago por adelantado, el [pending_setup_intent](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-pending_setup_intent). Además, establece lo sigueinte: - Establece [payment_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-payment_behavior) en `default_incomplete` para simplificar el cobro de la orden de débito directo SEPA. - Establece [save_default_payment_method](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-payment_settings-save_default_payment_method) en `on_subscription` para guardar el método de pago como determinado para la suscripción cuando el pago se realiza correctamente. Guardar un método de pago predeterminado aumenta la tasa de éxito de futuros pagos de suscripción. #### Ruby ```ruby # Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. # Find your keys at https://dashboard.stripe.com/apikeys. Stripe.api_key = '<>' post '/create-subscription' do content_type 'application/json' data = JSON.parse(request.body.read) customer_id = cookies[:customer] price_id = data['priceId'] subscription = Stripe::Subscription.create( customer: customer_id, items: [{ price: price_id, }], payment_behavior: 'default_incomplete', payment_settings: {save_default_payment_method: 'on_subscription'}, expand: ['latest_invoice.confirmation_secret', 'pending_setup_intent'] ) if subscription.pending_setup_intent != nil { type: 'setup', clientSecret: subscription.pending_setup_intent.client_secret }.to_json else { type: 'payment', clientSecret: subscription.latest_invoice.confirmation_secret.client_secret }.to_json end end ``` ## Recopilar datos del método de pago y la confirmación del mandato [Lado del cliente] Ya tienes todo listo para recopilar información de pago del lado del cliente con [Stripe Elements](https://docs.stripe.com/payments/elements.md). Elements es un conjunto de componentes de interfaz de usuario prediseñados para recopilar datos de pago. Un Stripe Element contiene un iframe que envía la información del pago a Stripe en modo seguro a través de una conexión HTTPS. La dirección de la página de finalización de compra también debe empezar con https:// en lugar de http:// para que funcione tu integración. Puedes probar tu integración sin usar HTTPS. [Habilítala](https://docs.stripe.com/security/guide.md#tls) cuando todo esté listo para aceptar pagos reales. ### Configurar Stripe Elements #### HTML + JS Stripe Elements se encuentra disponible automáticamente como función de Stripe.js. Incluye el script de Stripe.js en tu página de pago agregándolo al `head` de tu archivo HTML. Carga siempre Stripe.js directamente desde js.stripe.com para cumplir con la normativa PCI. No incluyas el script en un paquete ni alojes una copia en tus sistemas. ```html Submit Payment ``` Crea una instancia de Elements con el siguiente JavaScript en tu página de pago. Especifica el `modo` y la `moneda` para permitir que el Payment Element recopile los datos de pago por débito directo SEPA: ```javascript const stripe = Stripe('<>'); const options = { mode: 'setup', currency: 'eur', }; const elements = stripe.elements(options); ``` ### Agrega el Payment Element El Payment Element necesita un lugar donde ubicarse en tu formulario de pago. Crea un nodo DOM vacío (contenedor) con un ID único en tu formulario de pago. El Payment Element muestra automáticamente el formulario de débito directo SEPA y el texto de aceptación de la orden cuando el débito SEPA está habilitado: ```html
``` Cuando se cargue el formulario, [crea una instancia](https://docs.stripe.com/js/elements_object/create_element?type=payment) del Payment Element y móntala en el contenedor del Element. El Payment Element recopila automáticamente el nombre, el correo electrónico y el Código Internacional de Cuenta Bancaria (IBAN) del cliente, y muestra el texto de aceptación de la orden: ```javascript // Create and mount the Payment Element const paymentElement = elements.create('payment'); paymentElement.mount('#payment-element'); ``` #### React Instala [React Stripe.js](https://www.npmjs.com/package/@stripe/react-stripe-js) y el [cargador de Stripe.js](https://www.npmjs.com/package/@stripe/stripe-js) desde el registro público de npm: ```bash npm install --save @stripe/react-stripe-js @stripe/stripe-js ``` Pasa los datos de configuración (`modo: 'setup'`, `moneda`) al [proveedor Elements](https://docs.stripe.com/sdks/stripejs-react.md#elements-provider): ```jsx import React from 'react'; import {loadStripe} from '@stripe/stripe-js'; import {Elements} from '@stripe/react-stripe-js'; import PaymentSetupForm from './PaymentSetupForm'; // Make sure to call `loadStripe` outside of a component's render to avoid // recreating the `Stripe` object on every render. const stripePromise = loadStripe('<>'); export default function App() { const options = { mode: 'setup', currency: 'eur', }; return ( ); } ``` Crea un componente de formulario de configuración que represente el [PaymentElement](https://docs.stripe.com/sdks/stripejs-react.md#element-components): ```jsx import React from 'react'; import {PaymentElement} from '@stripe/react-stripe-js'; export default function PaymentSetupForm() { return (
); } ``` ## Enviar los datos del método de pago a Stripe [Lado del cliente] Usa [confirmSepaDebitPayment](https://docs.stripe.com/js/payment_intents/confirm_sepa_debit_payment#stripe_confirm_sepa_debit_payment-with_element) o, en el caso de las suscripciones que no cobran un pago por adelantado, [confirmSepaDebitSetup](https://docs.stripe.com/js/setup_intents/confirm_sepa_debit_setup#stripe_confirm_sepa_debit_setup-with_element) para confirmar la suscripción y crear un [PaymentMethod](https://docs.stripe.com/api/payment_methods.md) para débito directo SEPA. Incluye el nombre y la dirección de correo electrónico del cliente en las propiedades `payment_method.billing_details`. #### HTML + JS ```javascript // Define stripe with your publishable key var stripe = Stripe('pk_test_1234'); // Get the IBAN information from your element var iban = document.getElementById('iban-element'); const form = document.getElementById('payment-form'); const accountholderName = document.getElementById('accountholder-name'); const email = document.getElementById('email'); form.addEventListener('submit', async(event) => { event.preventDefault(); // Create the subscription const res = await fetch('/create-subscription', { method: 'POST', }); const {type, clientSecret} = await res.json(); const confirmIntent = type === 'setup' ? stripe.confirmSepaDebitSetup : stripe.confirmSepaDebitPayment; const {error} = await confirmIntent( clientSecret, { payment_method: { sepa_debit: iban, billing_details: { name: accountholderName.value, email: email.value, }, }, } ); }); ``` #### React ```jsx import React, {useState} from 'react'; import {useStripe, useElements, IbanElement} from '@stripe/react-stripe-js'; import IbanForm from './IbanForm'; export default function PaymentSetupForm() { const stripe = useStripe(); const elements = useElements(); const handleSubmit = async (event) => { // We don't want to let default form submission happen here, // which would refresh the page. event.preventDefault(); if (!stripe || !elements) { // Stripe.js hasn't yet loaded. // Make sure to disable form submission until Stripe.js has loaded. return; } const iban = elements.getElement(IbanElement); // For brevity, this example is using uncontrolled components for // the accountholder's name and email. In a real world app, you'd // probably want to use controlled components. // https://reactjs.org/docs/uncontrolled-components.html // https://reactjs.org/docs/forms.html#controlled-components const accountholderName = event.target['accountholder-name']; const email = event.target.email; // Create the subscription const res = await fetch('/create-subscription', { method: 'POST', }); const {type, clientSecret} = await res.json(); const confirmIntent = type === 'setup' ? stripe.confirmSepaDebitSetup : stripe.confirmSepaDebitPayment; const {error} = await confirmIntent(clientSecret, { payment_method: { sepa_debit: iban, billing_details: { name: accountholderName.value, email: email.value, }, }, }); if (res.error) { // Show error to your customer console.log(res.error.message); } else { // Show a confirmation message to your customer } }; return ( ); } ``` ## Configurar el método de pago predeterminado [Lado del servidor] Tienes que agregarle al cliente un método de pago guardado de modo que se puedan efectuar los próximos pagos. Para ello, establece el método de pago que acabas de recopilar en el nivel superior del objeto *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) como [método de pago predeterminado](https://docs.stripe.com/api/customers/update.md#update_customer-invoice_settings-default_payment_method) para las *facturas* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice): ```curl curl https://api.stripe.com/v1/customers/cus_Gk0uVzT2M4xOKD \ -u "<>:" \ -d "invoice_settings[default_payment_method]=pm_1F0c9v2eZvKYlo2CJDeTrB4n" ``` ## Gestionar el estado de la suscripción [Lado del cliente] Si el pago inicial se efectúa correctamente, el estado de la *suscripción* será `active` y no será necesario hacer nada más. Si los pagos fallan, el estado cambia al **estado de suscripción** definido en tu [configuración de cobro automático](https://docs.stripe.com/invoicing/automatic-collection.md). Debes notificar al cliente si falla el pago y [cobrarle con un método de pago distinto](https://docs.stripe.com/billing/subscriptions/overview.md#requires-payment-method). > Los pagos con débito directo SEPA nunca se reintentan automáticamente, aunque tengas un [cronograma de reintentos](https://docs.stripe.com/invoicing/automatic-collection.md) configurado para otros métodos de pago. ## Probar la integración Puedes probar tu integración usando los Códigos Internacionales de Cuenta Bancaria (IBAN) que figuran a continuación. Los detalles del método de pago se recopilan para cada IBAN, pero muestran un comportamiento diferente cuando se cobran. ##### Prueba los IBAN Usa estos IBAN de prueba con el Payment Element para probar tu integración de débito directo SEPA. El Payment Element valida automáticamente el Código Internacional de Cuenta Bancaria (IBAN) y muestra la orden cuando ingresas uno de estos valores de prueba. ### AT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | AT611904300234573201 | pm_success_at | The PaymentIntent status transitions from `processing` to `succeeded`. | | AT321904300235473204 | pm_successDelayed_at | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | AT861904300235473202 | pm_failed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | AT051904300235473205 | pm_failedDelayed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | AT591904300235473203 | pm_disputed_at | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | AT981904300000343434 | pm_exceedsWeeklyVolumeLimit_at | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | AT601904300000121212 | pm_exceedsWeeklyTransactionLimit_at | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | AT981904300002222227 | pm_insufficientFunds_at | The payment fails with an `insufficient_funds` failure code. | ### BE | Account Number | Token | Description | | ---------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | BE62510007547061 | pm_success_be | The PaymentIntent status transitions from `processing` to `succeeded`. | | BE78510007547064 | pm_successDelayed_be | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | BE68539007547034 | pm_failed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | BE51510007547065 | pm_failedDelayed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | BE08510007547063 | pm_disputed_be | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | BE90510000343434 | pm_exceedsWeeklyVolumeLimit_be | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | BE52510000121212 | pm_exceedsWeeklyTransactionLimit_be | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | BE90510002222227 | pm_insufficientFunds_be | The payment fails with an `insufficient_funds` failure code. | ### HR | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | HR7624020064583467589 | pm_success_hr | The PaymentIntent status transitions from `processing` to `succeeded`. | | HR6323600002337876649 | pm_successDelayed_hr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | HR2725000096983499248 | pm_failed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | HR6723600004878117427 | pm_failedDelayed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | HR8724840081455523553 | pm_disputed_hr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | HR7424020060000343434 | pm_exceedsWeeklyVolumeLimit_hr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | HR3624020060000121212 | pm_exceedsWeeklyTransactionLimit_hr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | HR7424020060002222227 | pm_insufficientFunds_hr | The payment fails with an `insufficient_funds` failure code. | ### EE | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | EE382200221020145685 | pm_success_ee | The PaymentIntent status transitions from `processing` to `succeeded`. | | EE222200221020145682 | pm_successDelayed_ee | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | EE762200221020145680 | pm_failed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | EE922200221020145683 | pm_failedDelayed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | EE492200221020145681 | pm_disputed_ee | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | EE672200000000343434 | pm_exceedsWeeklyVolumeLimit_ee | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | EE292200000000121212 | pm_exceedsWeeklyTransactionLimit_ee | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | EE672200000002222227 | pm_insufficientFunds_ee | The payment fails with an `insufficient_funds` failure code. | ### FI | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FI2112345600000785 | pm_success_fi | The PaymentIntent status transitions from `processing` to `succeeded`. | | FI3712345600000788 | pm_successDelayed_fi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FI9112345600000786 | pm_failed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FI1012345600000789 | pm_failedDelayed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FI6412345600000787 | pm_disputed_fi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FI6712345600343434 | pm_exceedsWeeklyVolumeLimit_fi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FI2912345600121212 | pm_exceedsWeeklyTransactionLimit_fi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FI6712345602222227 | pm_insufficientFunds_fi | The payment fails with an `insufficient_funds` failure code. | ### FR | Account Number | Token | Description | | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FR1420041010050500013M02606 | pm_success_fr | The PaymentIntent status transitions from `processing` to `succeeded`. | | FR3020041010050500013M02609 | pm_successDelayed_fr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FR8420041010050500013M02607 | pm_failed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FR7920041010050500013M02600 | pm_failedDelayed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FR5720041010050500013M02608 | pm_disputed_fr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FR9720041010050000000343434 | pm_exceedsWeeklyVolumeLimit_fr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FR5920041010050000000121212 | pm_exceedsWeeklyTransactionLimit_fr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FR9720041010050000002222227 | pm_insufficientFunds_fr | The payment fails with an `insufficient_funds` failure code. | ### DE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | DE89370400440532013000 | pm_success_de | The PaymentIntent status transitions from `processing` to `succeeded`. | | DE08370400440532013003 | pm_successDelayed_de | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | DE62370400440532013001 | pm_failed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | DE78370400440532013004 | pm_failedDelayed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | DE35370400440532013002 | pm_disputed_de | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | DE65370400440000343434 | pm_exceedsWeeklyVolumeLimit_de | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | DE27370400440000121212 | pm_exceedsWeeklyTransactionLimit_de | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | DE65370400440002222227 | pm_insufficientFunds_de | The payment fails with an `insufficient_funds` failure code. | ### GI | Account Number | Token | Description | | ----------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GI60MPFS599327643783385 | pm_success_gi | The PaymentIntent status transitions from `processing` to `succeeded`. | | GI08RRNW626436291644533 | pm_successDelayed_gi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GI41SAFA461293238477751 | pm_failed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GI50LROG772261344693297 | pm_failedDelayed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GI26KJBC361883934534696 | pm_disputed_gi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GI14NWBK000000000343434 | pm_exceedsWeeklyVolumeLimit_gi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GI73NWBK000000000121212 | pm_exceedsWeeklyTransactionLimit_gi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GI14NWBK000000002222227 | pm_insufficientFunds_gi | The payment fails with an `insufficient_funds` failure code. | ### IE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | IE29AIBK93115212345678 | pm_success_ie | The PaymentIntent status transitions from `processing` to `succeeded`. | | IE24AIBK93115212345671 | pm_successDelayed_ie | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | IE02AIBK93115212345679 | pm_failed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | IE94AIBK93115212345672 | pm_failedDelayed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | IE51AIBK93115212345670 | pm_disputed_ie | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | IE10AIBK93115200343434 | pm_exceedsWeeklyVolumeLimit_ie | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | IE69AIBK93115200121212 | pm_exceedsWeeklyTransactionLimit_ie | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | IE10AIBK93115202222227 | pm_insufficientFunds_ie | The payment fails with an `insufficient_funds` failure code. | ### LI | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LI0508800636123378777 | pm_success_li | The PaymentIntent status transitions from `processing` to `succeeded`. | | LI4408800387787111369 | pm_successDelayed_li | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LI1208800143823175626 | pm_failed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LI4908800356441975566 | pm_failedDelayed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LI7708800125525347723 | pm_disputed_li | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LI2408800000000343434 | pm_exceedsWeeklyVolumeLimit_li | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LI8308800000000121212 | pm_exceedsWeeklyTransactionLimit_li | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LI2408800000002222227 | pm_insufficientFunds_li | The payment fails with an `insufficient_funds` failure code. | ### LT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LT121000011101001000 | pm_success_lt | The PaymentIntent status transitions from `processing` to `succeeded`. | | LT281000011101001003 | pm_successDelayed_lt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LT821000011101001001 | pm_failed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LT981000011101001004 | pm_failedDelayed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LT551000011101001002 | pm_disputed_lt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LT591000000000343434 | pm_exceedsWeeklyVolumeLimit_lt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LT211000000000121212 | pm_exceedsWeeklyTransactionLimit_lt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LT591000000002222227 | pm_insufficientFunds_lt | The payment fails with an `insufficient_funds` failure code. | ### LU | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LU280019400644750000 | pm_success_lu | The PaymentIntent status transitions from `processing` to `succeeded`. | | LU440019400644750003 | pm_successDelayed_lu | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LU980019400644750001 | pm_failed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LU170019400644750004 | pm_failedDelayed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LU710019400644750002 | pm_disputed_lu | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LU900010000000343434 | pm_exceedsWeeklyVolumeLimit_lu | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LU520010000000121212 | pm_exceedsWeeklyTransactionLimit_lu | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LU900010000002222227 | pm_insufficientFunds_lu | The payment fails with an `insufficient_funds` failure code. | ### NL | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NL39RABO0300065264 | pm_success_nl | The PaymentIntent status transitions from `processing` to `succeeded`. | | NL55RABO0300065267 | pm_successDelayed_nl | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NL91ABNA0417164300 | pm_failed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NL28RABO0300065268 | pm_failedDelayed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NL82RABO0300065266 | pm_disputed_nl | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NL27RABO0000343434 | pm_exceedsWeeklyVolumeLimit_nl | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NL86RABO0000121212 | pm_exceedsWeeklyTransactionLimit_nl | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NL55RABO0300065267 | pm_insufficientFunds_nl | The payment fails with an `insufficient_funds` failure code. | ### NO | Account Number | Token | Description | | --------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NO9386011117947 | pm_success_no | The PaymentIntent status transitions from `processing` to `succeeded`. | | NO8886011117940 | pm_successDelayed_no | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NO6686011117948 | pm_failed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NO6186011117941 | pm_failedDelayed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NO3986011117949 | pm_disputed_no | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NO0586010343434 | pm_exceedsWeeklyVolumeLimit_no | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NO0586010343434 | pm_exceedsWeeklyTransactionLimit_no | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NO0586012222227 | pm_insufficientFunds_no | The payment fails with an `insufficient_funds` failure code. | ### PT | Account Number | Token | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | PT50000201231234567890154 | pm_success_pt | The PaymentIntent status transitions from `processing` to `succeeded`. | | PT66000201231234567890157 | pm_successDelayed_pt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | PT23000201231234567890155 | pm_failed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | PT39000201231234567890158 | pm_failedDelayed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | PT93000201231234567890156 | pm_disputed_pt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | PT05000201230000000343434 | pm_exceedsWeeklyVolumeLimit_pt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | PT64000201230000000121212 | pm_exceedsWeeklyTransactionLimit_pt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | PT05000201230000002222227 | pm_insufficientFunds_pt | The payment fails with an `insufficient_funds` failure code. | ### ES | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ES0700120345030000067890 | pm_success_es | The PaymentIntent status transitions from `processing` to `succeeded`. | | ES2300120345030000067893 | pm_successDelayed_es | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | ES9121000418450200051332 | pm_failed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | ES9300120345030000067894 | pm_failedDelayed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | ES5000120345030000067892 | pm_disputed_es | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | ES1700120345000000343434 | pm_exceedsWeeklyVolumeLimit_es | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | ES7600120345000000121212 | pm_exceedsWeeklyTransactionLimit_es | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | ES1700120345000002222227 | pm_insufficientFunds_es | The payment fails with an `insufficient_funds` failure code. | ### SE | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SE3550000000054910000003 | pm_success_se | The PaymentIntent status transitions from `processing` to `succeeded`. | | SE5150000000054910000006 | pm_successDelayed_se | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | SE0850000000054910000004 | pm_failed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | SE2450000000054910000007 | pm_failedDelayed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | SE7850000000054910000005 | pm_disputed_se | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | SE2850000000000000343434 | pm_exceedsWeeklyVolumeLimit_se | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | SE8750000000000000121212 | pm_exceedsWeeklyTransactionLimit_se | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | SE2850000000000002222227 | pm_insufficientFunds_se | The payment fails with an `insufficient_funds` failure code. | ### CH | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | CH9300762011623852957 | pm_success_ch | The PaymentIntent status transitions from `processing` to `succeeded`. | | CH8656663438253651553 | pm_successDelayed_ch | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | CH5362200119938136497 | pm_failed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | CH1843597160341964438 | pm_failedDelayed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | CH1260378413965193069 | pm_disputed_ch | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | CH1800762000000343434 | pm_exceedsWeeklyVolumeLimit_ch | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | CH7700762000000121212 | pm_exceedsWeeklyTransactionLimit_ch | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | CH1800762000002222227 | pm_insufficientFunds_ch | The payment fails with an `insufficient_funds` failure code. | ### GB | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GB82WEST12345698765432 | pm_success_gb | The PaymentIntent status transitions from `processing` to `succeeded`. | | GB98WEST12345698765435 | pm_successDelayed_gb | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GB55WEST12345698765433 | pm_failed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GB71WEST12345698765436 | pm_failedDelayed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GB28WEST12345698765434 | pm_disputed_gb | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GB70WEST12345600343434 | pm_exceedsWeeklyVolumeLimit_gb | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GB32WEST12345600121212 | pm_exceedsWeeklyTransactionLimit_gb | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GB70WEST12345602222227 | pm_insufficientFunds_gb | The payment fails with an `insufficient_funds` failure code. | ## Optional: Establecer el período de facturación Al crear una suscripción, automáticamente se define el ciclo de facturación de forma predeterminada. Por ejemplo, si un cliente se suscribe a un plan mensual el 7 de septiembre, se le facturará el día 7 de cada mes posterior. Algunas empresas prefieren configurar el ciclo de facturación de forma manual, así pueden cobrarles a sus clientes en la misma fecha cada ciclo. El argumento [billing cycle anchor](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-billing_cycle_anchor) te permite hacer esto. ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d billing_cycle_anchor=1611008505 ``` Si se configura el ciclo de facturación manualmente, se le cobra al cliente de forma automática un importe prorrateado por el tiempo que pasó entre la creación de la suscripción y la delimitación del ciclo de facturación. Si no quieres cobrarles ese período a los clientes, puedes establecer el argumento [proration_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-proration_behavior) en `none`. También puedes combinar la delimitación del ciclo de facturación con [períodos de prueba](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#trial-periods) para brindarles a los usuarios acceso gratis a tu producto y después cobrarles un importe prorrateado. ## Optional: Períodos de prueba para suscripciones Las pruebas gratuitas le dan a los clientes acceso gratis a tu producto por un determinado tiempo. Usar períodos de prueba gratuitos no es lo mismo que establecer [proration_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-proration_behavior) en `none` porque puedes personalizar cuánto tiempo durará el período gratuito. Para definir este período, debes especificar una marca de tiempo de [finalización de la prueba](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-trial_end). ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d trial_end=1610403705 ``` También puedes combinar un [delimitador del ciclo de facturación](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#billing-cycle) con una prueba gratuita. Por ejemplo, es 15 de septiembre y quieres darle a tu cliente acceso a una prueba gratuita durante siete días y después comenzar el ciclo normal de facturación el 1 de octubre. Puedes establecer que la prueba gratuita finalice el 22 de septiembre y el ciclo de facturación en 1 de octubre. Esta opción le brinda al cliente una prueba gratuita por siete días y después se le cobrará un importe prorrateado por el tiempo transcurrido entre que finaliza la prueba gratuita y el 1 de octubre. El 1 de octubre le cobrarás el importe normal de la suscripción por el primer ciclo completo de facturación. ## Optional: Crear pagos con débito directo SEPA usando otros métodos de pago > Esta documentación hace referencia a una funcionalidad *heredada* (Technology that's no longer recommended) (el `idealBank` Element) que ya no está disponible en la última versión de Stripe.js. Te recomendamos usar [Payment Element](https://docs.stripe.com/payments/payment-element.md), un componente de interfaz de usuario (IU) para la web que acepta más de 40 métodos de pago, valida los datos ingresados y gestiona los errores. Puedes crear pagos con débito directo SEPA usando otros métodos de pago como [Bancontact](https://docs.stripe.com/payments/bancontact/set-up-payment.md) e [iDEAL](https://docs.stripe.com/payments/ideal/set-up-payment.md). El uso de estos métodos de pago requiere algunos pasos adicionales. Para iDEAL: 1. Usa un [idealBank Element](https://docs.stripe.com/js/elements_object/create_element?type=idealBank) para recopilar información de pago. 1. Confirma la suscripción mediante [confirmIdealPayment](https://docs.stripe.com/js/payment_intents/confirm_ideal_payment) o, para las suscripciones que no cobran un pago por adelantado, [confirmIdealSetup](https://docs.stripe.com/js/setup_intents/confirm_ideal_setup). 1. [Enumera los métodos de pago del cliente](https://docs.stripe.com/api/payment_methods/customer_list.md), busca el método de pago de débito directo SEPA y establécelo como [método de pago predeterminado](https://docs.stripe.com/billing/subscriptions/sepa-debit.md#set-default-payment-method) del cliente. En el caso de Bancontact, sustituye: - `confirmIdealPayment` para [confirmBancontactPayment](https://docs.stripe.com/js/payment_intents/confirm_bancontact_payment) - `confirmIdealSetup` para [confirmBancontactSetup](https://docs.stripe.com/js/setup_intents/confirm_bancontact_setup)