Passa al contenuto
Crea account
o
Accedi
Il logo della documentazione Stripe
/
Chiedi all'IA
Crea un account
Accedi
Inizia
Pagamenti
Ricavi
Per piattaforme e marketplace
Gestione del denaro
Risorse per sviluppatori
Panoramica
Informazioni sui pagamenti con Stripe
Eseguire l'upgrade dell'integrazione
Analisi dei dati sui pagamenti
Pagamenti online
PanoramicaTrovare il caso d'uso più adattoManaged Payments
Utilizzare Payment Links
Creare una pagina di pagamento
    Panoramica
    Guide rapide
    Personalizzare l'aspetto
    Raccogliere informazioni aggiuntive
    Riscuotere le imposte
    Aggiornare la procedura di pagamento in modo dinamico
    Gestire il catalogo dei prodotti
    Abbonamenti
      Creare un'integrazione per abbonamenti
      Configurare prove gratuite
      Consentire ai clienti un abbonamento al massimo
      Impostare la data del ciclo di addebito
    Gestire i metodi di pagamento
    Consentire ai clienti di pagare nella loro valuta locale
    Aggiungere sconti, upsell e voci facoltative
    Configura pagamenti futuri
    Salvare i dati di pagamento durante il pagamento
    Approvare manualmente i pagamenti sul tuo server
    Dopo il pagamento
    Elements con log delle modifiche beta per l'API Checkout Sessions
    Migrare da una procedura di pagamento esistente
    Migrare Checkout per utilizzare Prices
Creare un'integrazione iniziale
Creare un'integrazione in-app
Metodi di pagamento
Aggiungere modalità di pagamento
Gestire i metodi di pagamento
Pagare più velocemente con Link
Interfacce di pagamento
Payment Links
Checkout
Elements per il Web
Elements in-app
Scenari di pagamento
Gestire più valute
Flussi di pagamento personalizzati
Acquisizione flessibile
Orchestrazione
Pagamenti di persona
Terminal
Oltre i pagamenti
Costituire un'azienda
Criptovaluta
Financial Connections
Climate
Informazioni sulle frodi
Protezione contro le frodi di Radar
Gestisci le contestazioni
Verificare l'identità
Pagina inizialePagamentiBuild a checkout pageSubscriptions

Set the billing cycle date

Set a subscription's billing cycle anchor to a fixed date.

You can explicitly set a subscription’s billing cycle anchor to a fixed date (for example, the 1st of the next month) when creating a Checkout Session. The billing cycle anchor determines the first full invoice date, when customers are billed the full subscription amount. The billing cycle anchor and the recurring interval of its price also determine a subscription’s future billing dates. For example, a monthly subscription created on May 15 with an anchor at June 1 is billed on May 15, then always on the 1st of the month.

For the initial billing period up until the first full invoice date, you can customize how to handle prorations with the proration_behavior parameter. By default, proration_behavior is set to create_prorations, and customers receive a prorated invoice. If proration_behavior is none, customers receive the initial period up to the first full invoice date for free.

Create a Checkout Session with a billing cycle anchor

To configure a billing cycle anchor, set the subscription_data.billing_cycle_anchor parameter when you create a Checkout Session in subscription mode. The anchor must be a future UNIX timestamp before the next natural subscription billing date.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d mode=subscription \ --data-urlencode success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ -d "subscription_data[billing_cycle_anchor]"=1611008505

If the billing cycle anchor is during a session’s active period and a customer attempts payment after it has passed, Checkout displays and charges for the full period starting with the billing cycle anchor instead of the prorated period before the billing cycle anchor.

Disable prorations

To disable prorations, set the subscription_data.proration_behavior parameter to none when creating a Checkout Session.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d mode=subscription \ --data-urlencode success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \ -d "subscription_data[billing_cycle_anchor]"=1611008505 \ -d "subscription_data[proration_behavior]"=none

Similar to a free trial, the initial period up to the billing cycle anchor is free. Unlike a trial, no 0 USD invoice is generated. Customers receive an invoice with the full subscription amount on the billing cycle anchor date.

In the Checkout Session response object, amounts attached to the line items and total details are always 0 when prorations are disabled. Additionally, the payment status of the Session is set to no_payment_required to reflect that payment is delayed to a future date.

Limitations

  • You can’t use trials in Checkout Sessions with a billing cycle anchor.
  • You can’t use one-time prices in Checkout Sessions when proration_behavior is none.
  • You can’t apply amount_off coupons to Checkout Sessions with a default proration_behavior of create_prorations.

Vedi anche

  • Prorations
Questa pagina è stata utile?
SìNo
  • Hai bisogno di aiuto? Contatta l'assistenza clienti.
  • Partecipa al nostro programma di accesso anticipato.
  • Dai un'occhiata al nostro registro delle modifiche.
  • Domande? Contattaci.
  • LLM? Leggi llms.txt.
  • Realizzato da Markdoc