Obter cartão

Possibilita a recuperação de um card através dos identificadores do cartão (card_id) e do cliente associado (customer_id), informados por parâmetro.

get
https://api.stone.com.br/core/v5/customers/{customer_id}/cards/{card_id}

Path Parameters

customer_idstringrequired

Código do cliente. Formato: cus_XXXXXXXXXXXXXXXX.

card_idstringrequired

Código do cartão. Formato: card_XXXXXXXXXXXXXXXX.

Response

application/json

200

idstring

Example:card_ej6MVD4sYLUBVy92

first_six_digitsstring

Example:400000

last_four_digitsstring

Example:0010

brandstring

Example:Visa

holder_namestring

Example:Tony Stark

holder_documentstring

Example:93095135270

exp_monthinteger

Default:0

Example:1

exp_yearinteger

Default:0

Example:2030

statusstring

Example:active

typestring

Example:credit

created_atstring

Example:2023-03-17T14:01:48Z

updated_atstring

Example:2023-03-17T14:01:48Z

billing_addressobject
Show Child Parameters
network_tokenobject
Show Child Parameters
customerobject
Show Child Parameters
get/customers/{customer_id}/cards/{card_id}
 
application/json

Editar cartão

Com o verbo HTTP PUT, através do identificador do cartão (card_id) e do identificador do cliente ao qual o mesmo está associado (customer_id) é possível alterar dados do cartão informado.

put
https://api.stone.com.br/core/v5/customers/{customer_id}/cards/{card_id}

Path Parameters

customer_idstringrequired

Código do cliente. Formato: cus_XXXXXXXXXXXXXXXX

card_idstringrequired

Código do Cartão. Formato: card_XXXXXXXXXXXXXXXX.

Body

application/json
holder_namestring

Nome do portador como está impresso no cartão. Máximo de 64 caracteres (Caracteres especiais e números não são aceitos)

holder_documentstring

CPF ou CNPJ do portador do cartão. Obrigatório caso o tipo do cartão seja voucher (bandeiras VR ou Pluxee).

exp_monthinteger(int32)required

Mês de validade do cartão. Valor entre 1 e 12 (inclusive)

exp_yearinteger(int32)required

Ano de validade do cartão. Formatos yy ou yyyy. Ex: 23 ou 2023.

billing_address_idstring

Código do endereço de cobrança. Max: 36 caracteres.<>Opcional, pode ser utilizado no lugar do billing_address.

billing_addressobject

Endereço de cobrança.

metadataobject

Objeto chave/valor utilizado para armazenar informações adicionais sobre o cartão. Saiba mais sobre metadata

Response

application/json

200

idstring

Example:card_oXpOkr1Sy3UQm7P9

first_six_digitsstring

Example:542501

last_four_digitsstring

Example:7793

brandstring

Example:Mastercard

holder_namestring

Example:Peter Parker

exp_monthinteger

Default:0

Example:12

exp_yearinteger

Default:0

Example:2030

statusstring

Example:active

created_atstring

Example:2018-04-03T20:54:58Z

updated_atstring

Example:2018-04-04T12:25:32Z

billing_addressobject
Show Child Parameters
customerobject
Show Child Parameters
typestring

Example:credit

put/customers/{customer_id}/cards/{card_id}

Body

{ "holder_name": "Peter Parker", "exp_month": 12, "exp_year": 2030, "billing_address": { "line_1": "375, Av. General Osorio, Centro", "line_2": "7º Andar", "zip_code": "220000111", "city": "Rio de Janeiro", "state": "RJ", "country": "BR" } }
 
application/json

Excluir cartão

Com o verbo HTTP DELETE, através do identificador do cartão (card_id) e do identificador do cliente (customer_id) ao qual o cartão está associado, é possível remover o cartão da Wallet do cliente.

delete
https://api.stone.com.br/core/v5/customers/{customer_id}/cards/{card_id}

Path Parameters

customer_idstringrequired

Código do cliente. Formato: cus_XXXXXXXXXXXXXXXX.

card_idstringrequired

Código do cartão. Formato: card_XXXXXXXXXXXXXXXX.

Response

application/json

200

One Of
idstring

Example:card_OBojZD1IvGcPq8gl

first_six_digitsstring

Example:542501

last_four_digitsstring

Example:7793

brandstring

Example:Mastercard

holder_namestring

Example:Tony Stark

exp_monthinteger

Default:0

Example:1

exp_yearinteger

Default:0

Example:2022

statusstring

Example:deleted

created_atstring

Example:2018-04-04T12:43:16Z

updated_atstring

Example:2018-04-04T12:43:30Z

deleted_atstring

Example:2018-04-04T12:43:30Z

billing_addressobject
Show Child Parameters
customerobject
Show Child Parameters
typestring

Example:credit

delete/customers/{customer_id}/cards/{card_id}
 
application/json

Renovar cartão

Com o verbo HTTP POST, através do identificador do cartão (card_id) e do identificador do cliente (customer_id) ao qual o cartão está associado, é possível renovar o cartão da Wallet do cliente, utilizando a funcionalidade manual do Card Updater.

post
https://api.stone.com.br/core/v5/customers/{customer_id}/cards/{card_id}/renew

Path Parameters

customer_idstringrequired

Código do cliente. Formato: cus_XXXXXXXXXXXXXXXX.

card_idstringrequired

Código do cartão. Formato: card_XXXXXXXXXXXXXXXX.

Response

application/json

200

idstring

Example:card_MgwPAXnU7rHW5mNj

first_six_digitsstring

Example:519645

last_four_digitsstring

Example:5475

brandstring

Example:Mastercard

holder_namestring

Example:Tony Stark

exp_monthinteger

Default:0

Example:3

exp_yearinteger

Default:0

Example:2020

statusstring

Example:active

typestring

Example:credit

is_renewedboolean

Default:true

Example:true

created_atstring

Example:2018-06-22T22:49:48Z

updated_atstring

Example:2018-06-22T22:49:48Z

billing_addressobject
Show Child Parameters
customerobject
Show Child Parameters
post/customers/{customer_id}/cards/{card_id}/renew
 
application/json

Criar Token cartão

post
https://api.stone.com.br/core/v5/tokens

Query Parameters

appIdstringrequired

Chave publica da conta.

Body

application/json
typestringrequired

Tipo do cartão

cardobjectrequired

Informações do cartão a ser tokenizado.

Show Child Parameters

Response

application/json

200

idstring

Example:token_zVw7rqvHEPH8XlbE

typestring

Example:card

created_atstring

Example:2018-06-18T18:48:58Z

expires_atstring

Example:2018-06-18T18:49:58Z

cardobject
Show Child Parameters
post/tokens

Body

{ "type": "card", "card": { "number": "4000000000000010", "holder_name": "Tony Stark", "exp_month": 1, "exp_year": 30, "cvv": "651", "label": "Sua bandeira" } }
 
application/json