Pular para o conteúdo
Criar conta
ou
Entrar
O logotipo da documentação da Stripe
/
Pergunte à IA
Criar conta
Login
Comece já
Pagamentos
Receita
Plataformas e marketplaces
Gestão de valores
Recursos para desenvolvedores
Visão geral
Sobre os pagamentos da Stripe
Atualize sua integração
Análise de pagamentos
Pagamentos online
Visão geralEncontre seu caso de usoPagamentos gerenciados
Usar Payment Links
Crie uma página de checkout
Criar uma integração avançada
Crie uma integração no aplicativo
Formas de pagamento
Adicionar formas de pagamento
Gerenciar formas de pagamento
Checkout mais rápido com o Link
Interfaces de pagamento
Payment Links
Checkout
Web Elements
Elements no aplicativo
Cenários de pagamento
Gerenciar várias moedas
Fluxos de pagamento personalizados
Aquisição flexível
Orquestração
Pagamentos presenciais
Terminal
    Visão geral
    Aceite pagamentos presenciais
    Projeto de integração
    Selecione a máquina
    Projete uma integração
    Início rápido
    Exemplos de aplicativos
    Testes
    Configuração do Terminal
    Configure a integração
    Conectar a uma máquina
    Como aceitar um pagamento
    Receber pagamentos com cartão
    Formas de pagamento adicionais
    Aceitar pagamentos offline
    Pagamentos de pedidos por correio e por telefone
    Considerações regionais
    Durante o checkout
    Receber gorjetas
    Colete e salve dados de pagamento para uso futuro
    Autorizações flexíveis
    Após o checkout
    Reembolsar transações
    Fornecer recibos
    Personalize o Checkout
    Mostrar carrinho
    Coletar entradas na tela
    Coletar dados de tarja magnética
    Coletar dados de toque para instrumentos NFC
    Aplicativos em dispositivos
    Gerenciar máquinas
    Pedir, devolver ou substituir máquinas
    Registrar máquinas
    Gerenciar locais e zonas
    Configurar máquinas
    Monitorar máquinas
    Criptografia
    Referências
    Referências da API
    Máquinas móveis
    Máquinas de cartão inteligentes
    Guia de migração de SDK
    Lista de verificação da implantação
    Fichas técnicas de máquinas do Stripe Terminal
Muito mais que pagamentos
Abra sua empresa
Cripto
Financial Connections
Climate
Entenda as fraudes
Proteção contra fraudes do Radar
Gerenciar contestações
Verificar identidades
Página inicialPagamentosTerminal

Refund transactions

Cancel or refund Stripe Terminal payments.

Stripe Terminal supports both automatic and manual capture.

When the SDK returns a confirmed PaymentIntent to your app, the payment is authorized but not captured. You can cancel payments that are authorized and not captured. If the PaymentIntent has already been captured, you must refund the underlying charge created by the PaymentIntent, using the refunds API or Dashboard.

We recommend reconciling payments on your backend after a day’s activity to prevent unintended authorizations and uncollected funds.

Availability

Canceling payments is available on Visa, Mastercard, American Express, Discover, and girocard. For single-message payment methods like Interac and eftpos, PaymentIntents are automatically captured. In lieu of canceling PaymentIntents, make sure your application can allow initiating a refund at the end of the checkout flow.

Online refunds are available on all card networks except for Interac.

In-person refunds are only available on Interac.

Cancel payments Client-sideServer-side

SDK Reference

  • cancelPaymentIntent (iOS)
  • cancelPaymentIntent (Android)
  • cancelPaymentIntent (React Native)
  • cancelPaymentIntent (Java)

You can cancel a card_present PaymentIntent at any time before it has been captured. Canceling a PaymentIntent releases all uncaptured funds, and a canceled PaymentIntent can no longer be used to perform charges.

Use this when, for example, your customer decides to use a different payment method or pay with cash after the payment has been processed. In your application’s UI, consider allowing the user to cancel after they confirm the payment, and before you finalize it and notify your backend to capture.

Client-side

Cancel a PaymentIntent from your client using the iOS, Android, or React Native SDK:

Observação

Client-side PaymentIntent cancellation is possible with the iOS, Android, and React Native SDKs. If you’re using a server-driven integration, cancel the PaymentIntent server-side.

Server-side

API Reference

  • Cancel a PaymentIntent

The JavaScript SDK and server-driven integration require you to cancel the PaymentIntent on your server. For the other client SDKs, you can cancel the PaymentIntent on your server if the information required to start a payment isn’t readily available in your app.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl -X POST https://api.stripe.com/v1/payment_intents/pi_ANipwO3zNfjeWODtRPIg/cancel \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

Perform refunds Server-side

When you use a PaymentIntent to collect payment from a customer, Stripe creates a charge behind the scenes. To refund the customer’s payment after the PaymentIntent has succeeded, create a refund by passing in the PaymentIntent ID or the charge ID. You can also optionally refund part of a payment by specifying an amount.

You can perform refunds with the API or through the Dashboard. For Interac transactions in Canada, you can provide in-person refunds on the BBPOS WisePOS E reader, Stripe Reader S700, or Tay to Pay on iPhone.

Online refunds don’t require a cardholder to present their card again at the point of sale. The following example shows how to create a full refund by passing in the PaymentIntent ID.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/refunds \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d payment_intent=pi_Aabcxyz01aDfoo

To refund part of a PaymentIntent, provide an amount parameter, as an integer in cents (or the charge currency’s smallest currency unit):

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/refunds \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d payment_intent=pi_Aabcxyz01aDfoo \ -d amount=1000

Veja também

  • Cart display
  • Receipts
Esta página foi útil?
SimNão
  • Precisa de ajuda? Fale com o suporte.
  • Participe do nosso programa de acesso antecipado.
  • Confira nosso changelog.
  • Dúvidas? Fale com a equipe de vendas.
  • LLM? Read llms.txt.
  • Powered by Markdoc