JavaScript
import Chron from '@chron/sdk';
const client = new Chron({
apiKey: 'My API Key',
});
const response = await client.cards.provision.google('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
clientDeviceID: 'clientDeviceID',
clientWalletAccountID: 'clientWalletAccountID',
clientWalletProvider: 'clientWalletProvider',
});
console.log(response.encryptedPaymentInstrument);curl --request POST \
--url https://api.chron.com/v1/cards/{cardId}/provision/google \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDeviceID": "<string>",
"clientWalletProvider": "<string>",
"clientWalletAccountID": "<string>"
}
'import requests
url = "https://api.chron.com/v1/cards/{cardId}/provision/google"
payload = {
"clientDeviceID": "<string>",
"clientWalletProvider": "<string>",
"clientWalletAccountID": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chron.com/v1/cards/{cardId}/provision/google",
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([
'clientDeviceID' => '<string>',
'clientWalletProvider' => '<string>',
'clientWalletAccountID' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chron.com/v1/cards/{cardId}/provision/google"
payload := strings.NewReader("{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chron.com/v1/cards/{cardId}/provision/google")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chron.com/v1/cards/{cardId}/provision/google")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"encryptedPaymentInstrument": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}API Reference
Provision Card to Google
Provisions a card for Google Pay by passing required client device and wallet parameters.
POST
/
v1
/
cards
/
{cardId}
/
provision
/
google
JavaScript
import Chron from '@chron/sdk';
const client = new Chron({
apiKey: 'My API Key',
});
const response = await client.cards.provision.google('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
clientDeviceID: 'clientDeviceID',
clientWalletAccountID: 'clientWalletAccountID',
clientWalletProvider: 'clientWalletProvider',
});
console.log(response.encryptedPaymentInstrument);curl --request POST \
--url https://api.chron.com/v1/cards/{cardId}/provision/google \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDeviceID": "<string>",
"clientWalletProvider": "<string>",
"clientWalletAccountID": "<string>"
}
'import requests
url = "https://api.chron.com/v1/cards/{cardId}/provision/google"
payload = {
"clientDeviceID": "<string>",
"clientWalletProvider": "<string>",
"clientWalletAccountID": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chron.com/v1/cards/{cardId}/provision/google",
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([
'clientDeviceID' => '<string>',
'clientWalletProvider' => '<string>',
'clientWalletAccountID' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chron.com/v1/cards/{cardId}/provision/google"
payload := strings.NewReader("{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chron.com/v1/cards/{cardId}/provision/google")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chron.com/v1/cards/{cardId}/provision/google")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientDeviceID\": \"<string>\",\n \"clientWalletProvider\": \"<string>\",\n \"clientWalletAccountID\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"encryptedPaymentInstrument": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}{
"errorCode": "<string>",
"message": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for the card.
Body
application/json
Response
Card provisioned to Google successfully.
The encrypted payment instrument data returned by Google.
⌘I