curl --request PATCH \
--url https://api.treasuryprime.com/digital_wallet_token/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "suspended"
}
'import requests
url = "https://api.treasuryprime.com/digital_wallet_token/{id}"
payload = { "status": "suspended" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'suspended'})
};
fetch('https://api.treasuryprime.com/digital_wallet_token/{id}', 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/digital_wallet_token/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'suspended'
]),
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/digital_wallet_token/{id}"
payload := strings.NewReader("{\n \"status\": \"suspended\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.treasuryprime.com/digital_wallet_token/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"suspended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/digital_wallet_token/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"suspended\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "card_11h5w1kwp9sabc",
"created_at": "2023-08-03T15:33:19Z",
"device": {
"device_id": "01230BDB794680012340018761933446E55590AA589D5E19",
"ip_address": "71.00.00.01",
"location": "40.00/-73.00",
"name": "iPhone",
"phone_number": "1234",
"type": "mobile_phone"
},
"fulfillment": {
"status": "provisioned"
},
"id": "dwt_11jcqme11p6yabc",
"status": "suspended",
"token_service_provider": {
"network": "mastercard",
"pan_reference_id": "FAPLMC00002647919b243196787642308f0e123f4e6a9ac2",
"token_pan_last4": "9123",
"token_reference_id": "DAPLMC0000264791b80d3526c86242dd854bf8345a4e3a12",
"token_requestor_id": "50110030273",
"token_requestor_name": "apple_pay"
},
"updated_at": "2023-08-03T15:33:20Z"
}Update a Token
curl --request PATCH \
--url https://api.treasuryprime.com/digital_wallet_token/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "suspended"
}
'import requests
url = "https://api.treasuryprime.com/digital_wallet_token/{id}"
payload = { "status": "suspended" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'suspended'})
};
fetch('https://api.treasuryprime.com/digital_wallet_token/{id}', 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/digital_wallet_token/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'suspended'
]),
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/digital_wallet_token/{id}"
payload := strings.NewReader("{\n \"status\": \"suspended\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.treasuryprime.com/digital_wallet_token/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"suspended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/digital_wallet_token/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"suspended\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "card_11h5w1kwp9sabc",
"created_at": "2023-08-03T15:33:19Z",
"device": {
"device_id": "01230BDB794680012340018761933446E55590AA589D5E19",
"ip_address": "71.00.00.01",
"location": "40.00/-73.00",
"name": "iPhone",
"phone_number": "1234",
"type": "mobile_phone"
},
"fulfillment": {
"status": "provisioned"
},
"id": "dwt_11jcqme11p6yabc",
"status": "suspended",
"token_service_provider": {
"network": "mastercard",
"pan_reference_id": "FAPLMC00002647919b243196787642308f0e123f4e6a9ac2",
"token_pan_last4": "9123",
"token_reference_id": "DAPLMC0000264791b80d3526c86242dd854bf8345a4e3a12",
"token_requestor_id": "50110030273",
"token_requestor_name": "apple_pay"
},
"updated_at": "2023-08-03T15:33:20Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Unique identifier for object
Body
The digital_wallet_token to update
One of: active, suspended, terminated. Patch this field to control the active or inactive state of the token
Response
The digital_wallet_token updated
The ID of the card object the token is associated with. Filterable.
Timestamp of when the object was created
An object that defines additional fields for the device that initiated tokenization
Show child attributes
Show child attributes
An object that defines additional fields for fulfillment of the token
Show child attributes
Show child attributes
Unique identifier for object
ID of the organization with which the object is associated. Filterable.
The status of the token. One of: active, requested, request_declined, suspended, terminated. Filterable.
An object that defines additional fields for requestor of the token
Show child attributes
Show child attributes
Timestamp of when the object was updated
Was this page helpful?