Akkro PayAkkro PayDocumentação
POST/v1/checkout/sessions/{token}/coupon

Aplicar cupom na sessao

Autenticação

Acesso público pelo token da URL. Não exponha sua chave secreta.

Parâmetros

tokenURL · stringObrigatório

Corpo da requisição

application/json · Corpo obrigatório

codestringObrigatório

Codigo do cupom

Respostas

Entender erros e retentativas →
200Cupom aplicado

O contrato não publica um exemplo para esta resposta. Consulte a estrutura abaixo.

sessionIdstringObrigatório
subtotalAmountintegerObrigatório
discountAmountintegerObrigatório
totalAmountintegerObrigatório
couponobjectObrigatório
Ver campos: coupon
codestringOpcional
discountTypestringOpcional
appliedAmountintegerOpcional
400Dados inválidos ou regra da operação não atendida. Corrija o payload antes de repetir.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

403Acesso não permitido para este host ou configuração da empresa.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

404Sessão ou link não encontrado ou indisponível.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

409Sessão não modificável ou operação concorrente. Consulte o estado antes de repetir.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

410Sessão expirada ou indisponível para esta leitura.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

429Limite de chamadas atingido. Respeite Retry-After quando presente.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

500Erro interno. O resultado pode ser incerto; consulte o recurso antes de iniciar outra intenção.
successbooleanOpcional
errorobjectOpcional

Standard 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
codestringOpcional

Stable machine-readable error code (e.g. VALIDATION_ERROR, AUTHENTICATION_ERROR, DUPLICATE_WITHDRAWAL_RISK)

messagestringOpcional

Human-readable message without acquirer or PSP identifiers

detailsTipo não especificado no contratoOpcional

Optional structured payload: validation field list, retryAfter seconds, existingWithdrawalId for duplicate withdrawal risk, etc. Shape varies by code.

integrationErrorTipo não especificado no contratoOpcional

Optional structured integration hint (transactions). Same additive rules as details.

traceIdstringOpcional

Correlation / trace identifier for support and logs

timestampstringOpcional

When the error was materialized (ISO 8601)

Formato: "date-time"
pathstringOpcional

Request path that produced the error

As descrições técnicas da API são publicadas em português.

Aplicar cupom na sessao | AkkroPay Docs para Desenvolvedores