Editar cartão de cobrança

Esse recurso só pode ser chamado quando o cartão a ser editado teve a transação não autorizada.

patch
https://api.stone.com.br/core/v5/charges/{charge_id}/card

Path Parameters

charge_idstringrequired

Código da cobrança.

Body

application/json
update_subscriptionstring

Indica se o cartão da assinatura deve ser atualizado

Default:false

card_idstring

Código do cartão.

cardobject

Dados do cartão. Saiba mais sobre cartões.

Show Child Parameters
card_tokenstring

Token do cartão

initiated_typestring

Identificador do tipo de transação avulsa. Valores possíveis: partial_shipment (Remessa Parcial), related_or_delayed_charge (Cobrança Atrasada), no_show (Multa) ou retry (Retentativa). Mais detalhes.

recurrence_modelstring

Identificador do tipo de recorrência. Valores possíveis: standing_order (Ordem Permanente), instalment (Parcelamento) ou subscription (Assinatura convencional com valor e frequência fixa). Mais detalhes.

payment_originobject

Identificador da primeira cobrança de uma recorrência. Mais detalhes.

Show Child Parameters

Response

application/json

200

idstring

Example:ch_B4rpRdfBxsVv0NQo

codestring

Example:98ZZUL0F8Z

amountinteger

Default:0

Example:1490

paid_amountinteger

Default:0

Example:1490

statusstring

Example:paid

currencystring

Example:BRL

payment_methodstring

Example:credit_card

paid_atstring

Example:2019-01-22T14:40:47Z

created_atstring

Example:2019-01-22T14:39:35Z

updated_atstring

Example:2019-01-22T14:40:47Z

customerobject
Show Child Parameters
last_transactionobject
Show Child Parameters
metadataobject
Show Child Parameters
patch/charges/{charge_id}/card

Body

{ "card": { "number": "4000000000000010", "holder_name": "Tony Stark", "exp_month": 1, "exp_year": 30, "cvv": "3531", "billing_address": { "line_1": "10880, Malibu Point, Malibu Central", "zip_code": "90265", "city": "Malibu", "state": "CA", "country": "US" } } }
 
application/json

Editar data de vencimento da cobrança

patch
https://api.stone.com.br/core/v5/charges/{charge_id}/due-date

Path Parameters

charge_idstringrequired

Código da cobrança.

Body

application/json
due_atstring(date)required

Data de vencimento.

Response

application/json

200

idstring

Example:ch_9R6419s6Btvp4ykO

codestring

Example:R8VI5WU79R

gateway_idstring

Example:efda8d57-50d8-4b19-b2d4-873bee2e1b62

amountinteger

Default:0

Example:14900000

statusstring

Example:pending

currencystring

Example:BRL

payment_methodstring

Example:boleto

due_atstring

Example:2017-04-04T00:00:00

created_atstring

Example:2017-04-04T21:34:32

updated_atstring

Example:2017-04-04T21:44:05

customerobject
Show Child Parameters
last_transactionobject
Show Child Parameters
metadataobject
Show Child Parameters
patch/charges/{charge_id}/due-date

Body

{ "due_at": "due_at" }
 
application/json

Editar método de pagamento

patch
https://api.stone.com.br/core/v5/charges/{charge_id}/payment-method

Path Parameters

charge_idstringrequired

Código da cobrança.

Body

application/json
update_subscriptionstring

Indica se o meio de pagamento da assinatura deve ser atualizado

payment_methodstringrequired

Meio de pagamento. Valores possíveis: credit_card, boleto, voucher, bank_transfer ou safety_pay

credit_cardobject

Dados sobre o pagamento com cartão de crédito (obrigatório caso payment_method seja credit_card).

Show Child Parameters
voucherobject

Dados sobre o pagamento com voucher (obrigatório caso payment_method seja voucher)

Show Child Parameters
boletoobject

Dados sobre o pagamento com boleto (obrigatório caso payment_method seja boleto).

Show Child Parameters
bank_transferobject

Dados sobre o pagamento com transferência entre contas bancárias. (obrigatório caso payment_method seja bank_transfer).

Show Child Parameters
Pixobject

Dados sobre o pagamento com Pix (obrigatório caso payment_method seja Pix).

Show Child Parameters
reuse_splitboolean

Informa se vamos repassar as regras de split para proxima transação

Response

application/json

200

idstring

Example:ch_PA2gLJYc9hDxRrXV

codestring

Example:DPRWS1C38N

gateway_idstring

Example:c22a0e61-2e3e-4317-b11f-08d03046a1a8

amountinteger

Default:0

Example:1490000

statusstring

Example:pending

currencystring

Example:BRL

payment_methodstring

Example:boleto

created_atstring

Example:2017-10-05T19:16:51Z

updated_atstring

Example:2017-10-05T19:18:39Z

customerobject
Show Child Parameters
last_transactionobject
Show Child Parameters
metadataobject
Show Child Parameters
patch/charges/{charge_id}/payment-method

Body

{ "payment_method": "boleto", "boleto": { "bank": "033", "instructions": "Pagar até o vencimento", "due_at": "2020-12-31" }, "reuse_split": true }
 
application/json

Retentar uma cobrança manualmente

post
https://api.stone.com.br/core/v5/charges/{charge_id}/retry

Path Parameters

charge_idstringrequired

Código da cobrança.

Response

application/json

200

idstring

Example:ch_exRAY21fvNFVD9EX

codestring

Example:8M2OT2SRX8

gateway_idstring

Example:c5d71b01-174e-453f-8563-fd089cf7b39b

amountinteger

Default:0

Example:14900000

statusstring

Example:failed

currencystring

Example:BRL

payment_methodstring

Example:credit_card

due_atstring

Example:2017-04-04T00:00:00

created_atstring

Example:2017-04-04T22:29:33

updated_atstring

Example:2017-04-04T22:29:54

customerobject
Show Child Parameters
last_transactionobject
Show Child Parameters
metadataobject
Show Child Parameters
post/charges/{charge_id}/retry
 
application/json

Confirmar cobrança (cash)

Para a confirmação de cobranças com meio de pagamento cash com o status pending.

post
https://api.stone.com.br/core/v5/charges/{charge_id}/confirm-payment

Path Parameters

charge_idstringrequired

Código da cobrança.

Body

application/json
amountinteger(int32)

Valor a ser confirmado. Caso não seja informado, será considerado o valor total da cobrança

codestring

Código da cobrança no sistema da loja. Irá atualizar o valor informado na criação da cobrança. Max: 52 caracteres

descriptionstring

Descrição

Response

application/json

200

idstring

Example:ch_7YBoBPWCVKS3QdyM

codestring

Example:WZQS3LHEKW

gateway_idstring

Example:42c243c4-0b52-49f3-ba92-e8661ebc7916

amountinteger

Default:0

Example:1490

statusstring

Example:paid

currencystring

Example:BRL

payment_methodstring

Example:credit_card

due_atstring

Example:2017-04-04T00:00:00

paid_atstring

Example:2017-04-04T20:06:14

created_atstring

Example:2017-04-04T20:05:39

updated_atstring

Example:2017-04-04T20:06:14

customerobject
Show Child Parameters
last_transactionobject
Show Child Parameters
metadataobject
Show Child Parameters
post/charges/{charge_id}/confirm-payment

Body

{}
 
application/json