Esse método permite guardar as informações do cartão para que seja utilizado no processo de adesão. Endpoint de homologaçãohttps://api-recorrencia.staging.totvs.app/api/v1/rac/payment-token Parâmetros de Entrada Obs.: Todas as informações das requisições são fictícias e não teram valor de processamento. Procedimento de criação da tokenização do cartão. Usando o POST Payment-Token para associar o id do Customers. Insira o id do Customers nesse exemplo iremos utilizar o 4292..... Bloco de código |
---|
language | yml |
---|
title | POST payment-token |
---|
| {
"customerId": "3fa85f64429203e1-57173261-456245a7-b3fcb83c-2c963f66afa69eb78deb9fca" //Id gerado na criação do Customers
} |
Parâmetros de SaídaSaída Armazena o Id disponibilizado no campo url: e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639 Bloco de código |
---|
language | yml |
---|
title | RESPONSE Payment-Token |
---|
| {
"id": "341b5962e5ceab4d-2023f0d9-45c7484b-932fa6cb-ac836e34f477d3b8ee8ca639", //Id gerado pelo payment-token
"status": "Received", //Status
"url": "/api/v1/payment-token/341b5962e5ceab4d-2023f0d9-45c7484b-932fa6cb-ac836e34f477d3b8ee8ca639", //Rota para inserir os dados do cartão.
"date": "2023-0209-10T1327T19:4115:5129.52394093039488+00:00" //Data de geração.
}
} |
Coletando o id para realizar a gravação do cartão. Parâmetros de Entrada Cole o id do campo url logo após o nome payment-token, exemplo abaixo: Bloco de código |
---|
language | yml |
---|
title | GET Payment-Token |
---|
| https://api-recorrencia.staging.totvs.app/api/v1/payment-tokenrac/payment-token/341b5962e5ceab4d-2023f0d9-45c7484b-932fa6cb-ac836e34f477d3b8ee8ca639 |
Parâmetros de Saída Bloco de código |
---|
language | yml |
---|
title | RESPONSE Payment-Token |
---|
| {
"id": "341b5962e5ceab4d-2023f0d9-45c7484b-932fa6cb-ac836e34f477d3b8ee8ca639",
"customerId": "021eb296429203e1-b80e3261-4c5e45a7-bdfbb83c-4131459b37049eb78deb9fca",
"nickname": null,
"lastFourDigits": null,
"checkoutPageLink": "https://dev.thex.cloud/checkout/page?t=eyJkYXRhIjoiVTJGc2RHVmtY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3FlSDQ3SjhTN3crTm1ra2tEZm9xRjE1TFgyc21lZmhxY2FWaHJ6NVEvNVl0N3ZpN1IvcThBUmdZRHNjYmR6SElhOU5EU2g3cFRUU3hGeVpBSXdLU0NISTNDMjNuZ2k1Qk1aL0N1MmhRSm15NGlMRHhubzFtVi96aW0rSytrTGQvUDQ4TUtwVXZ2YWE1YzM1VzdsZ0h5cW5UckZsMjRhcEJDeU03UGtyaFhWTTFnMDl3Y2tJc2c4b0g1dTJlSTZWZ1FydURTZDRzWFI1UmpORXhoNm4wUEJsdWMwNlRFaG4zdTNFc2tnbHNxbk9DNTFMRzBGL0loY3RzMnJ5bnNCNWtEb21lQlJwOVd3ZkZkanFFMmR4c0NNYnNobTd6d3M5RTFYTzNaRVRDNENxWlJRS0pCd0kvMWlaZXRSWEZMT3N1ZmI1UDVGYlJsNjcrWnNONW9Jd3lvNUF4WUtneFNkWi9OcDBVQzZDMkJFZkZWbXFsUEVWTm5CdW5lWEE5OWxjclphbVcvQUJQVGJ2ekEzbm5vTG5HVktpVjd0bDVHMTA2TVNDbHI2NjlsWVk0bGZ0ZzZpOWFhdERoOFA3TVJ1cUJ1b21uVzIwTWcifQ==",
"status": 2,
"acquirer"provider": 1,
"providerDescription": 2"Provedor",
"message": "Gerado link para a Tokenização",
"dateAdd": "20232022-0209-10T1327T19:4115:5129.52394303948",
"isActive": false
} | Aviso |
---|
title | Armazenamento do ID | Armazene o Id, pois será utilizado no momento da realização da subscrição. Nesse exemplo: "id": "341b5962-2023-45c7-932f-ac836e34f477" |
Acessar o link informado no campo checkoutPageLink, em seguida realize o preenchimento dos campos e clique em "Guardar Cartão"
Com o Id do Customers e Id do Payment-Token armazenados, será possivel realizar a subscrição com o cartão tokenizado, segue procedimento para os campos que serão atualizados: Maiores duvidas sobre a Subscrição, acesse. POST api/v1/Subscriptions customerId - informar o id customers; - "customerId": "429203e1-3261-45a7-b83c-9eb78deb9fca"
paymentTokenId - id Payment-Token; - "paymentTokenId": "e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639"
|