Saltar al contenido principal
POST
Create tax quote
Cotiza el impuesto del primer pago de una suscripción de Stripe Billing, para la dirección de facturación del cliente y, en el caso de una empresa, su identificación fiscal. La cotización usa Stripe Tax con los registros de tu cuenta de Stripe. Consulta Precio local e impuestos.
Habilitado por organizaciónEl cobro de impuestos se habilita por organización y necesita el onboarding de Stripe Billing con Stripe Tax activo. Contacta a tu Key Account Manager (KAM) para habilitarlo.
  • Vuelve a cotizar cada vez que cambien el país, el código postal o la identificación fiscal. Una cotización es válida por 30 minutos.
  • El código postal es obligatorio para Estados Unidos y Canadá. Los demás países solo necesitan el país.
  • Cobra total y envía cada línea de la cotización en additional_data.order.taxes del pago con source: YUNO_TAX_QUOTE y el tax_quote_id (tax_base es el taxable_amount de la línea). Después de que el pago es aprobado, Yuno crea la suscripción en Stripe con el mismo impuesto en su primera factura.
  • status es NO_TAX cuando no se aplica ningún impuesto (no_tax_reason indica el motivo, por ejemplo REVERSE_CHARGE para una empresa con una identificación fiscal válida, o NOT_SUBJECT_TO_TAX cuando tu cuenta de Stripe no tiene registro).

Encabezados

PUBLIC-API-KEY
string
requerido

Your public API key.

PRIVATE-SECRET-KEY
string

Your private secret key, when you quote from your backend. Never expose it client-side.

X-Account-Code
string

The account the quote is for.

Cuerpo

application/json
address
object
requerido

Where the subscription is consumed.

account_id
string

Required with a secret key and must be the authenticated account. Optional with a public key, where it must match the checkout session.

checkout_session
string

Required with a public key: the checkout session with tax_collection, whose external_subscription is quoted. Not allowed with a secret key.

country
string

Optional. With a public key it must match the checkout session.

external_subscription
object

Required with a secret key, not allowed with a public key. The subscription to quote.

tax_information
object

Optional. The buyer's tax ID, used for business treatment such as reverse charge and saved on the Stripe customer with the subscription.

Respuesta

Tax quote

tax_quote_id
string
status
enum<string>
Opciones disponibles:
TAX_APPLIED,
NO_TAX,
NOT_CALCULATED
no_tax_reason
enum<string>
Opciones disponibles:
REVERSE_CHARGE,
NOT_COLLECTING,
EXEMPT,
ZERO_RATED,
NOT_SUBJECT_TO_TAX,
OTHER
currency
string
subtotal
number
tax
number
total
number
lines
object[]