Informations de reçu

GET
https://www.digicert.com/services/v2/finance/receipt/{{receipt_id}}

Appelez ce point de terminaison pour obtenir les informations relatives à un reçu.

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/finance/receipt/{{receipt_id}}' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/finance/receipt/{{receipt_id}}"

payload = ""
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/finance/receipt/{{receipt_id}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
NodeJS
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/finance/receipt/{{receipt_id}}',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
  "id": "112233",
  "date_time": "2018-12-08 07:39:06",
  "acct_amount": "0.00",
  "cc_amount": "376.00",
  "cc_last4": "1111",
  "cc_exp_date": "0123",
  "cc_type": "visa",
  "bill_name": "Janna Roe",
  "bill_addr1": "123 Fake Street",
  "bill_city": "Lehi",
  "bill_state": "ut",
  "bill_zip": "84043",
  "bill_country": "us",
  "bill_email": "janna.roe@digicert.com"
}

Paramètres de réponse

Nom Type Description
id string ID du reçu
date_time string Horodatage du reçu
Format : yyyy-MM-dd HH:mm:ss
acct_amount Chaîne
cc_amount string Montant facturé sur la carte bancaire
cc_last4 string Quatre derniers chiffres de la carte bancaire utilisée
cc_exp_date string Année d’expiration de la carte bancaire utilisée
cc_type string Émetteur de la carte bancaire
Valeurs possibles : amex, discover, mastercard, visa, other
bill_name string Nom du contact de facturation
bill_addr1 string Adresse du contact de facturation
bill_city string Ville du contact de facturation
bill_state string État du contact de facturation
bill_zip string Code postal du contact de facturation
bill_country string Pays du contact de facturation
bill_email string Adresse électronique du contact de facturation