Provision with Google Pay
curl --request POST \
--url https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"card_id": "card_291u96075mva",
"device_id": "W85OGhjZTk2dsr452dgsr51j",
"device_type": "mobile_phone",
"provisioning_app_version": "2.13.3",
"wallet_account_id": "ae25OGhjZTk2dsr452dgsr51"
}
'import requests
url = "https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay"
payload = {
"card_id": "card_291u96075mva",
"device_id": "W85OGhjZTk2dsr452dgsr51j",
"device_type": "mobile_phone",
"provisioning_app_version": "2.13.3",
"wallet_account_id": "ae25OGhjZTk2dsr452dgsr51"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card_id: 'card_291u96075mva',
device_id: 'W85OGhjZTk2dsr452dgsr51j',
device_type: 'mobile_phone',
provisioning_app_version: '2.13.3',
wallet_account_id: 'ae25OGhjZTk2dsr452dgsr51'
})
};
fetch('https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay', 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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay",
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([
'card_id' => 'card_291u96075mva',
'device_id' => 'W85OGhjZTk2dsr452dgsr51j',
'device_type' => 'mobile_phone',
'provisioning_app_version' => '2.13.3',
'wallet_account_id' => 'ae25OGhjZTk2dsr452dgsr51'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay"
payload := strings.NewReader("{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "card_291u96075mva",
"device_type": "mobile_phone",
"provisioning_app_version": "2.0",
"push_tokenize_request_data": {
"display_name": "Visa Card",
"last_digits": "1234",
"network": "Visa",
"opaque_payment_card": "eyJraWQiOiIxVjMwT1ZCUTNUMjRZMVFBVFRRUza",
"token_service_provider": "TOKEN_PROVIDER_VISA",
"user_address": {
"address1": "1 Market St",
"address2": "Suite 42",
"city": "San Francisco",
"country": "US",
"name": "George Washington",
"phone": "4154845555",
"postal_code": "94104",
"state": "CA"
}
}
}Digital Wallet Tokens
Provision with Google Pay
POST
/
card
/
{card_id}
/
digital_wallet_token
/
google_pay
Provision with Google Pay
curl --request POST \
--url https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"card_id": "card_291u96075mva",
"device_id": "W85OGhjZTk2dsr452dgsr51j",
"device_type": "mobile_phone",
"provisioning_app_version": "2.13.3",
"wallet_account_id": "ae25OGhjZTk2dsr452dgsr51"
}
'import requests
url = "https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay"
payload = {
"card_id": "card_291u96075mva",
"device_id": "W85OGhjZTk2dsr452dgsr51j",
"device_type": "mobile_phone",
"provisioning_app_version": "2.13.3",
"wallet_account_id": "ae25OGhjZTk2dsr452dgsr51"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card_id: 'card_291u96075mva',
device_id: 'W85OGhjZTk2dsr452dgsr51j',
device_type: 'mobile_phone',
provisioning_app_version: '2.13.3',
wallet_account_id: 'ae25OGhjZTk2dsr452dgsr51'
})
};
fetch('https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay', 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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay",
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([
'card_id' => 'card_291u96075mva',
'device_id' => 'W85OGhjZTk2dsr452dgsr51j',
'device_type' => 'mobile_phone',
'provisioning_app_version' => '2.13.3',
'wallet_account_id' => 'ae25OGhjZTk2dsr452dgsr51'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay"
payload := strings.NewReader("{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/card/{card_id}/digital_wallet_token/google_pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_id\": \"card_291u96075mva\",\n \"device_id\": \"W85OGhjZTk2dsr452dgsr51j\",\n \"device_type\": \"mobile_phone\",\n \"provisioning_app_version\": \"2.13.3\",\n \"wallet_account_id\": \"ae25OGhjZTk2dsr452dgsr51\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "card_291u96075mva",
"device_type": "mobile_phone",
"provisioning_app_version": "2.0",
"push_tokenize_request_data": {
"display_name": "Visa Card",
"last_digits": "1234",
"network": "Visa",
"opaque_payment_card": "eyJraWQiOiIxVjMwT1ZCUTNUMjRZMVFBVFRRUza",
"token_service_provider": "TOKEN_PROVIDER_VISA",
"user_address": {
"address1": "1 Market St",
"address2": "Suite 42",
"city": "San Francisco",
"country": "US",
"name": "George Washington",
"phone": "4154845555",
"postal_code": "94104",
"state": "CA"
}
}
}Authorizations
basicAuthapiKey
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The ID card being added to the wallet
Body
application/json
The google-pay-token-request to create
The ID card being added to the wallet
The user’s Android device ID; the device’s unique identifier
One of mobile_phone, watch, or tablet
Version of the application making the provisioning request
The user’s Google wallet account ID
Response
200 - application/json
The google-pay-token-request created
The ID card being added to the wallet
The user’s Android device ID; the device’s unique identifier
One of mobile_phone, watch, or tablet
Version of the application making the provisioning request
The user’s Google wallet account ID
Was this page helpful?
⌘I