Ir a contenido
Crea una cuenta
o
Inicia sesión
Logotipo de Stripe Docs
/
Pregúntale a la IA
Crear una cuenta
Iniciar sesión
Empieza ahora
Pagos
Automatización contable
Plataformas y marketplaces
Gestión del dinero
Herramientas para desarrolladores
Empieza ahora
Pagos
Automatización contable
Empieza ahora
Pagos
Automatización contable
Plataformas y marketplaces
Gestión del dinero
ResumenConoce todos los productos
Empieza a desarrollar
Empezar a desarrollar
Proyectos de muestra
Acerca de las API
    Visita a las API
    API Payment Intents
    API Setup Intents
    Métodos de pago
    Productos y precios
    API anteriores
      Cargos
        Migrar a las nuevas API
        Aceptar un pago con tarjeta
        Guardar una tarjeta
        Bloquear un importe en una tarjeta
        Charges con Connect
      Sources
    Fases de lanzamiento
Build with LLMs
Utiliza Stripe sin necesidad de programación
Configura Stripe
Crea una cuenta.
Dashboard web
Dashboard móvil
Migra a Stripe
Gestiona el riesgo de fraude
Comprender el fraude
Protección contra fraudes de Radar
Gestionar disputas
Verificar identidades
InicioEmpieza ahoraAbout the APIsOlder APIsCharges

Nota

Esta página aún no está disponible en este idioma. Estamos trabajando intensamente para que nuestra documentación esté disponible en más idiomas. Ofreceremos la traducción en cuanto esté disponible.

Placing a hold on a cardCharges API

Copiar página

Legacy API

The content of this section refers to a Legacy feature. Use the Payment Intents API instead.

The Charges API doesn’t support the following features, many of which are required for credit card compliance:

  • Merchants in India
  • Bank requests for card authentication
  • Strong Customer Authentication

Use the Charges API to authorize a payment now, capture funds later.

Stripe supports two-step card payments so you can first authorize a charge, then wait to settle (capture) it later. When a charge is authorized, the card issuer guarantees the funds and holds the amount on the customer’s card for, usually, up to 7 days, or 2 days for in-person payments using Terminal. The payment_method_details.card.capture_before attribute on the charge indicates the time when the authorization expires.

If the charge isn’t captured within this time, the authorization is canceled and funds released.

Authorize a payment

To authorize a payment without capturing it, make a charge request that also includes the capture parameter with a value of false. This instructs Stripe to only authorize the amount on the customer’s card.

Precaución

Only some payment methods support separate authorization and capture. For example, card payments, Afterpay, and Klarna support separating these steps. With payment methods that don’t support this functionality, like ACH or iDEAL, you can’t capture manually. Refer to the full list of payment methods that support manual capture.

If you need to cancel an authorization, you can release it by refunding the relevant Charge object.

Command Line
curl
curl https://api.stripe.com/v1/charges \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "amount"=999 \ -d "currency"="usd" \ -d "description"="Example charge" \ -d "source"="tok_visa" \ -d "capture"="false"

Capture the funds

To settle an authorized charge, make a capture charge request. The total authorized amount is captured by default, and you can’t capture more than this. To capture less than the initial amount (for example, 8 USD of a 10 USD authorization), pass the amount parameter. Partially capturing a charge automatically releases the remaining amount.

Command Line
cURL
curl -X POST https://api.stripe.com/v1/charges/{{CHARGE_ID}}/capture \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

Card statements from some issuers do not distinguish between authorizations and captured (settled) charges, which can sometimes lead to confusion for your customers. In addition, authorized charges can only be captured once. If you partially capture a charge, you can’t perform another capture for the difference. Depending on your requirements, you may be better served by saving customer’s card details for later and creating charges as needed.

¿Te fue útil esta página?
SíNo
¿Necesitas ayuda? Ponte en contacto con soporte.
Únete a nuestro programa de acceso anticipado.
Echa un vistazo a nuestro registro de cambios.
¿Tienes alguna pregunta? Contacto.
¿LLM? Lee llms.txt.
Con tecnología de Markdoc