Esse método permite guardar as informações do cartão para que seja utilizado no processo de adesão. 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": "429203e1-3261-45a7-b83c-9eb78deb9fca" //Id gerado na criação do Customers
} |
Parâmetros de Saída Armazena o Id disponibilizado no campo url: e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639 Bloco de código |
---|
language | yml |
---|
title | RESPONSE Payment-Token |
---|
| {
"id": "e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639",
"status": "Received",
"url": "/api/v1/payment-token/e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639",
"date": "2023-09-27T19:15:29.3039488+00:00"
} |
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.totvs.app/api/v1/rac/payment-token/e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639 |
Parâmetros de Saída Bloco de código |
---|
language | yml |
---|
title | RESPONSE Payment-Token |
---|
| {
"id": "e5ceab4d-f0d9-484b-a6cb-d3b8ee8ca639",
"customerId": "429203e1-3261-45a7-b83c-9eb78deb9fca",
"nickname": null,
"lastFourDigits": null,
"checkoutPageLink": "https://dev.thex.cloud/checkout/page?t=eyJkYXRhIjoiVTJGc2RHVmtYMS9Db0pEMVNJZjlPQ3pPRXFSNnpuUTNXYTI4cW4wSUhOQmF4cGFqMjBmYzhVNjlUVXJTRFN0JjUTJlalB2a2ZvYlk5Z1RYblVMTUc3QzlmWEZjNEwwQWRHSExGTHpCVmNQb21kQWqK042NHdJYWphdmhPektOMjRhTVlFcEE1YUJCU3gzbnVYdUNROHlMOUQ1WDdJeTlPZU03VHFmVncwVE92OUF4aHVGeDNVQ2svQW1F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HSmgwK1FFTGFhS24xd1cwNkhMc080N0F4ODRkV0I1T3FlSDQ3SjhTN3crTm1ra2tEZm9xRjE1TFgyc21lZmhxY2FWaHJ6NVEvNVl0N3ZpN1IvcThBUmdZRHNjYmR6SElhOU5EU2g3cFRUU3hGeVpBSXdLU0NISTNDMjNuZ2k1Qk1aL0N1MmhRSm15NGlMRHhubzFtVi96aW0rSytrTGQvUDQ4TUtwVXZ2YWE1YzM1VzdsZ0h5cW5UckZsMjRhcEJDeU03UGtyaFhWTTFnMDl3Y2tJc2c4b0g1dTJlSTZWZ1FydURTZDRzWFI1UmpORXhoNm4wUEJsdWMwNlRFaG4zdTNFc2tnbHNxbk9DNTFMRzBGL0loY3RzMnJ5bnNCNWtEb21lQlJwOVd3ZkZkanFFMmR4c0NNYnNobTd6d3M5RTFYTzNaRVRDNENxWlJRS0pCd0kvMWlaZXRSWEZMT3N1ZmI1UDVGYlJsNjcrWnNONW9Jd3lvNUF4WUtneFNkWi9OcDBVQzZDMkJFZkZWbXFsUEVWTm5CdW5lWEE5OWxjclphbVcvQUJQVGJ2ekEzbm5vTG5HVktpVjd0bDVHMTA2TVNDbHI2NjlsWVk0bGZ0ZzZpOWFhdERoOFA3TVJ1cUJ1b21uVzIwTWcifQ==",
"status": 2,
"provider": 1,
"providerDescription": "Provedor",
"message": "Gerado link para a Tokenização",
"dateAdd": "2022-09-27T19:15:29.303948",
"isActive": false
} |
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"
|