Ativar certificado
curl --request POST \
--url https://api.uvvipay.com.br/v1/certificates/{id}/activate \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"certificate": "<string>"
}
'import requests
url = "https://api.uvvipay.com.br/v1/certificates/{id}/activate"
payload = { "certificate": "<string>" }
headers = {
"client-secret": "<api-key>",
"client-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-secret': '<api-key>',
'client-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({certificate: '<string>'})
};
fetch('https://api.uvvipay.com.br/v1/certificates/{id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uvvipay.com.br/v1/certificates/{id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'certificate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uvvipay.com.br/v1/certificates/{id}/activate"
payload := strings.NewReader("{\n \"certificate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client-secret", "<api-key>")
req.Header.Add("client-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.uvvipay.com.br/v1/certificates/{id}/activate")
.header("client-secret", "<api-key>")
.header("client-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/certificates/{id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-secret"] = '<api-key>'
request["client-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"certificate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "apple_pay_payment_processing",
"status": "issued",
"signingRequestPem": "<string>",
"publicKeyFingerprint": "<string>",
"notBefore": "2023-11-07T05:31:56Z",
"notAfter": "2023-11-07T05:31:56Z",
"activatedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z"
}Certificados
Ativar certificado
Ativa o certificado com o arquivo emitido pela autoridade (ex.: apple_pay.cer). Só é aceito um certificado criado a partir do CSR emitido neste registro; a chave pública precisa corresponder ao par sob nossa custódia.
POST
/
v1
/
certificates
/
{id}
/
activate
Ativar certificado
curl --request POST \
--url https://api.uvvipay.com.br/v1/certificates/{id}/activate \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"certificate": "<string>"
}
'import requests
url = "https://api.uvvipay.com.br/v1/certificates/{id}/activate"
payload = { "certificate": "<string>" }
headers = {
"client-secret": "<api-key>",
"client-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-secret': '<api-key>',
'client-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({certificate: '<string>'})
};
fetch('https://api.uvvipay.com.br/v1/certificates/{id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uvvipay.com.br/v1/certificates/{id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'certificate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uvvipay.com.br/v1/certificates/{id}/activate"
payload := strings.NewReader("{\n \"certificate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client-secret", "<api-key>")
req.Header.Add("client-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.uvvipay.com.br/v1/certificates/{id}/activate")
.header("client-secret", "<api-key>")
.header("client-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"certificate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/certificates/{id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-secret"] = '<api-key>'
request["client-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"certificate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "apple_pay_payment_processing",
"status": "issued",
"signingRequestPem": "<string>",
"publicKeyFingerprint": "<string>",
"notBefore": "2023-11-07T05:31:56Z",
"notAfter": "2023-11-07T05:31:56Z",
"activatedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z"
}Headers
Secret da credencial do merchant
ID público da credencial do merchant
Path Parameters
Body
application/json
Certificado emitido pela autoridade a partir do nosso CSR, em PEM ou base64 do arquivo .cer
Response
Certificado ativo; já vale para novas transações
Available options:
apple_pay_payment_processing issued: CSR emitido, aguardando ativação; active: em uso; revoked: desativado
Available options:
issued, active, revoked CSR em PEM. Presente quando o fluxo do tipo passa por autoridade certificadora (Apple Pay); envie-o à autoridade
SHA-256 (base64) da chave pública do par
Dados específicos do tipo (Apple Pay: merchantIdHash)

