curl --request POST \
--url https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"certificates": [
"MIIEgjCCBCmgAwIBAgI",
"MIIDxTCCA2ugAwIBAgI"
],
"nonce": "3vT9Kw==",
"nonce_signature": "R0hJSktMTU5PUFE="
}
'import requests
url = "https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}"
payload = {
"certificates": ["MIIEgjCCBCmgAwIBAgI", "MIIDxTCCA2ugAwIBAgI"],
"nonce": "3vT9Kw==",
"nonce_signature": "R0hJSktMTU5PUFE="
}
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({
certificates: ['MIIEgjCCBCmgAwIBAgI', 'MIIDxTCCA2ugAwIBAgI'],
nonce: '3vT9Kw==',
nonce_signature: 'R0hJSktMTU5PUFE='
})
};
fetch('https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}', 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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}",
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([
'certificates' => [
'MIIEgjCCBCmgAwIBAgI',
'MIIDxTCCA2ugAwIBAgI'
],
'nonce' => '3vT9Kw==',
'nonce_signature' => 'R0hJSktMTU5PUFE='
]),
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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}"
payload := strings.NewReader("{\n \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}")
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 \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\n}"
response = http.request(request)
puts response.read_body{
"wallet": "apple_pay",
"provisioning_payload": {
"activation_data": "<string>",
"encrypted_pass_data": "<string>",
"ephemeral_public_key": "<string>"
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}Add a payment method to a device wallet
Provisions the payment method into the device wallet named by the wallet path parameter, returning the encrypted payload the platform wallet SDK needs to finish adding the card. apple_pay expects the PassKit handshake; google_wallet expects the Google Unified Push Provisioning wallet and device identifiers. google_pay is the Legacy Google Pay integration and expects only the Google wallet and device identifiers.
For apple_pay, your app must obtain the PassKit handshake before calling this endpoint. The certificates, nonce, and nonce_signature values come from the PKAddPaymentPassViewControllerDelegate callback and must be Base64-encoded — PassKit supplies them as Data, not strings.
For google_wallet, call Imprint from Google’s payment-credentials callback with the active wallet ID and stable device ID. Pass through Google’s googleOpaquePaymentCardRequested value and, when it is true, the callback’s serverSessionId.
google_pay (Legacy) accepts the active wallet ID and stable device ID before the legacy TapAndPay push-tokenization call.
The returned payloads across all wallets are single-use. Hand it straight to the wallet SDK; do not cache, log, or persist it. See the Add to Wallet guide for the full integration flow.
Required scope: CARD_WRITE
curl --request POST \
--url https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"certificates": [
"MIIEgjCCBCmgAwIBAgI",
"MIIDxTCCA2ugAwIBAgI"
],
"nonce": "3vT9Kw==",
"nonce_signature": "R0hJSktMTU5PUFE="
}
'import requests
url = "https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}"
payload = {
"certificates": ["MIIEgjCCBCmgAwIBAgI", "MIIDxTCCA2ugAwIBAgI"],
"nonce": "3vT9Kw==",
"nonce_signature": "R0hJSktMTU5PUFE="
}
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({
certificates: ['MIIEgjCCBCmgAwIBAgI', 'MIIDxTCCA2ugAwIBAgI'],
nonce: '3vT9Kw==',
nonce_signature: 'R0hJSktMTU5PUFE='
})
};
fetch('https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}', 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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}",
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([
'certificates' => [
'MIIEgjCCBCmgAwIBAgI',
'MIIDxTCCA2ugAwIBAgI'
],
'nonce' => '3vT9Kw==',
'nonce_signature' => 'R0hJSktMTU5PUFE='
]),
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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}"
payload := strings.NewReader("{\n \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\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://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}/provision/{wallet}")
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 \"certificates\": [\n \"MIIEgjCCBCmgAwIBAgI\",\n \"MIIDxTCCA2ugAwIBAgI\"\n ],\n \"nonce\": \"3vT9Kw==\",\n \"nonce_signature\": \"R0hJSktMTU5PUFE=\"\n}"
response = http.request(request)
puts response.read_body{
"wallet": "apple_pay",
"provisioning_payload": {
"activation_data": "<string>",
"encrypted_pass_data": "<string>",
"ephemeral_public_key": "<string>"
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}{
"error": {
"code": "device_ineligible",
"message": "this device cannot accept this card",
"details": {}
}
}Authorizations
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Path Parameters
The unique identifier of the payment method
"9ED4FE47-8E9C-48E9-BBEF-094DF1789012"
The target device wallet.
apple_pay, google_wallet, google_pay "apple_pay"
Body
- Apple Pay (apple_pay)
- Google Wallet UPP (google_wallet)
- Google Pay Legacy (google_pay)
Select the request body that matches the wallet path value: Option 1 is Apple Pay (apple_pay), Option 2 is Google Wallet UPP (google_wallet), and Option 3 is Google Pay Legacy (google_pay). Fields from the options cannot be mixed.
The Base64-encoded DER certificate chain from the PassKit delegate (generateRequestWithCertificateChain:), leaf first, then intermediate. PassKit supplies these as [Data] — Base64-encode each element.
1[
"MIIEgjCCBCmgAwIBAgI",
"MIIDxTCCA2ugAwIBAgI"
]
The Base64-encoded nonce from PassKit.
"3vT9Kw=="
The Base64-encoded nonce signature from PassKit.
"R0hJSktMTU5PUFE="
Response
Provisioning payload for the selected wallet SDK.
- Apple Pay (apple_pay)
- Google Wallet UPP (google_wallet)
- Google Pay Legacy (google_pay)
The response shape matches the selected wallet: Option 1 is Apple Pay (apple_pay), Option 2 is Google Wallet UPP (google_wallet), and Option 3 is Google Pay Legacy (google_pay).