Deposit funds

POST
https://www.digicert.com/services/v2/finance/deposit

Use this endpoint to deposit funds into your account balance.

cURL
curl -X POST \
  https://www.digicert.com/services/v2/finance/deposit \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
  "amount": 1000,
  "payment_method": "card",
  "profile_id": 67849,
  "credit_card": {
    "number": "4111111111111111",
    "cvv": 723,
    "expiration_month": 2,
    "expiration_year": 2022,
    "cardholder_name": "John Digismith"
  },
  "billing_address": {
    "address": "21 Jump St",
    "address2": "Ste. 227",
    "city": "New York",
    "state": "ny",
    "zip": 10177,
    "country": "US"
  }
}'
Python
import requests

url = "https://www.digicert.com/services/v2/finance/deposit"

payload = "{\n  \"amount\": 1000,\n  \"payment_method\": \"card\",\n  \"profile_id\": 67849,\n  \"credit_card\": {\n    \"number\": \"4111111111111111\",\n    \"cvv\": 723,\n    \"expiration_month\": 2,\n    \"expiration_year\": 2022,\n    \"cardholder_name\": \"John Digismith\"\n  },\n  \"billing_address\": {\n    \"address\": \"21 Jump St\",\n    \"address2\": \"Ste. 227\",\n    \"city\": \"New York\",\n    \"state\": \"ny\",\n    \"zip\": 10177,\n    \"country\": \"US\"\n  }\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

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

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/finance/deposit"

	payload := strings.NewReader("{\n  \"amount\": 1000,\n  \"payment_method\": \"card\",\n  \"profile_id\": 67849,\n  \"credit_card\": {\n    \"number\": \"4111111111111111\",\n    \"cvv\": 723,\n    \"expiration_month\": 2,\n    \"expiration_year\": 2022,\n    \"cardholder_name\": \"John Digismith\"\n  },\n  \"billing_address\": {\n    \"address\": \"21 Jump St\",\n    \"address2\": \"Ste. 227\",\n    \"city\": \"New York\",\n    \"state\": \"ny\",\n    \"zip\": 10177,\n    \"country\": \"US\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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: 'POST',
  url: 'https://www.digicert.com/services/v2/finance/deposit',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { amount: 1000,
     payment_method: 'card',
     profile_id: 67849,
     credit_card: 
      { number: '4111111111111111',
        cvv: 723,
        expiration_month: 2,
        expiration_year: 2022,
        cardholder_name: 'John Digismith' },
     billing_address: 
      { address: '21 Jump St',
        address2: 'Ste. 227',
        city: 'New York',
        state: 'ny',
        zip: 10177,
        country: 'US' } },
  json: true };

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

  console.log(body);
});
204 No Content
// empty

Request parameters

Use the List payment profiles endpoint to get the profile_id when using the profile payment method.

Name Req/Opt Type Description
amount required float Amount to deposit in US dollars.
payment_method required string Payment method to use.
Allowed values: card, profile
profile_id optional int Payment profile to use for the deposit.
Required if profile is used for the payment_method.
credit_card optional object Credit card details.
Required if card is used for the payment_method.
.. number required string Credit card number.
Do not use dashes or spaces. Use only numbers.
.. cvv required int Card verification value (CVV) number.
.. expiration_month required int Expiration month of the credit card.
.. expiration_year required int Expiration year of the credit card.
.. cardholder_name required string Name on the credit card.
billing_address optional object Billing address details.
.. address required string
.. address2 optional string
.. city required string
.. state required string Billing state or province.
Optional for some countries.
.. zip required int Zip/postal code.
Optional for some countries.
.. country required string