/v1/checkout/sessions/{token}/couponAplicar cupom na sessao
Autenticação
Acesso público pelo token da URL. Não exponha sua chave secreta.
Parâmetros
tokenURL · stringObrigatórioCorpo da requisição
application/json · Corpo obrigatório
codestringObrigatórioCodigo do cupom
Respostas
Entender erros e retentativas →200Cupom aplicado
O contrato não publica um exemplo para esta resposta. Consulte a estrutura abaixo.
sessionIdstringObrigatóriosubtotalAmountintegerObrigatóriodiscountAmountintegerObrigatóriototalAmountintegerObrigatóriocouponobjectObrigatórioVer campos: coupon
codestringOpcionaldiscountTypestringOpcionalappliedAmountintegerOpcional400Dados inválidos ou regra da operação não atendida. Corrija o payload antes de repetir.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
403Acesso não permitido para este host ou configuração da empresa.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
404Sessão ou link não encontrado ou indisponível.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
409Sessão não modificável ou operação concorrente. Consulte o estado antes de repetir.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
410Sessão expirada ou indisponível para esta leitura.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
429Limite de chamadas atingido. Respeite Retry-After quando presente.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
500Erro interno. O resultado pode ser incerto; consulte o recurso antes de iniciar outra intenção.
successbooleanOpcionalerrorobjectOpcionalStandard API error object. Fields traceId, timestamp, path, and details are optional and additive for integrators. Messages are provider-agnostic (no acquirer/PSP brand names); use error.code, details, and traceId when contacting support.
Ver campos: error
codestringOpcionalStable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)
messagestringOpcionalHuman-readable message without acquirer or PSP identifiers
detailsTipo não especificado no contratoOpcionalOptional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.
integrationErrorTipo não especificado no contratoOpcionalOptional structured integration hint (transactions). Same additive rules as details.
traceIdstringOpcionalCorrelation / trace identifier for support and logs
timestampstringOpcionalWhen the error was materialized (ISO 8601)
pathstringOpcionalRequest path that produced the error
As descrições técnicas da API são publicadas em português.

