Push to Wallet
Mobile Wallets are digital wallets held on mobile devices that transact with merchants by turning Native Card Primary Account Numbers (PANs) into digital tokens (e.g. for use with Apple Pay, G
post
https://api.synapsefi.com
/v3.1/users/:user_id/nodes/:node_id/subnets/:subnet_id/push
Push

Example Request

HTTP
cURL
Python
JS
PHP
GO
1
POST /v3.1/users/5fd7acfd8677040053ad486d/nodes/5fd901bb20b3aa0bc7caee85/subnets/5fe28e3e7dac291e78cb4d74/push HTTP/1.1
2
Host: uat-api.synapsefi.com
3
X-SP-USER-IP: 255.127.79.76
4
X-SP-USER: oauth_A0GrzQJKInyljsCtNV37MbeF4ZTYxau9o1WSkdpq|e83cf6ddcf778e37bfe3d48fc78a6502062fc
5
Content-Type: application/json
6
7
{
8
"type": "APPLE_PUSH",
9
"nonce": "RH0jOQ==",
10
"nonce_signature": "QNyNZuyDOO3yu5ymQacY8TjecyYOZP/HraOrc6X4FzNfXZNWG+Om/ocPGg/mQxnmYi2ldudvtny57rLOsiWa5zelzdjUnq0sgpz8kgkEFg/Q",
11
"certificates": [
12
"MIICzDCCAnKgAwIBAgICEAEwCgYIKoZIzj0EAwIwcDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExEDAOBgNVBAoMB1N5bmFwc2UxOjA4BgNVBAMMMVN5bmFwc2UgSW50ZXJtZWRpYXRlIENlcnRpZmljYXRlIEF1dGhvcml0eSAoVGVzdCkwHhcNMjAwNTEwMTY0MDAyWhcNMjEwNTEwMTY0MDAyWjBjMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEQMA4GA1UECgwHU3luYXBzZTEtMCsGA1UEAwwkU3luYXBzZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgKFRlc3QpMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnYyH0+ctc8rB60T7NFiokvseIlKqXaCNfxr0ui4WBZymQ/5K7+BGJy0hBtLKxOowqXvQB0jhX1NJsfzEpuZoN6OCAQcwgg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l1P4haaekp0HZDWJ7bYzgu3uCy6u/gIhAMTAkXwMlm+9iGLSj+ofgsMXPIIz5+LOQgC1OM/8OPQ7"
14
]
15
}
Copied!
1
curl --location --request POST 'https://uat-api.synapsefi.com/v3.1/users/5fd7acfd8677040053ad486d/nodes/5fd901bb20b3aa0bc7caee85/subnets/5fe28e3e7dac291e78cb4d74/push' \
2
--header 'X-SP-USER-IP: 255.127.79.76' \
3
--header 'X-SP-USER: oauth_A0GrzQJKInyljsCtNV37MbeF4ZTYxau9o1WSkdpq|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
4
--header 'Content-Type: application/json' \
5
--header 'Cookie: __cfduid=d8d8fd4abbd2cc9946b8f9e91b46812cc1608683042' \
6
--data-raw '{
7
"type": "APPLE_PUSH",
8
"nonce": "RH0jOQ==",
9
"nonce_signature": "QNyNZuyDOO3yu5ymQacY8TjecyYOZP/HraOrc6X4FzNfXZNWG+Om/ocPGg/mQxnmYi2ldudvtny57rLOsiWa5zelzdjUnq0sgpz8kgkEFg/Q",
10
"certificates": [
11
"MIICzDCCAnKgAwIBAgICEAEwCgYIKoZIzj0EAwIwcDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExEDAOBgNVBAoMB1N5bmFwc2UxOjA4BgNVBAMMMVN5bmFwc2UgSW50ZXJtZWRpYXRlIENlcnRpZmljYXRlIEF1dGhvcml0eSAoVGVzdCkwHhcNMjAwNTEwMTY0MDAyWhcNMjEwNTEwMTY0MDAyWjBjMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEQMA4GA1UECgwHU3luYXBzZTEtMCsGA1UEAwwkU3luYXBzZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgKFRlc3QpMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnYyH0+ctc8rB60T7NFiokvseIlKqXaCNfxr0ui4WBZymQ/5K7+BGJy0hBtLKxOowqXvQB0jhX1NJsfzEpuZoN6OCAQc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JGl1P4haaekp0HZDWJ7bYzgu3uCy6u/gIhAMTAkXwMlm+9iGLSj+ofgsMXPIIz5+LOQgC1OM/8OPQ7"
13
]
14
}'
Copied!
1
//
Copied!
1
//
Copied!
1
//
Copied!
1
//
Copied!

Notes on Apple Pay

Please review Apple's documentation for additional information on how to implement push provisioning in your iOS app. Apple has 3 different "Payment Data Configurations" - Synapse uses Configuration 1.
Below is an overview of the data you must pass from Synapse's API response to Apple's PKAddPaymentPassRequest:
    activationData: This is the activation_data returned in Synapse's API response.
    encryptedPassData: This is the encrypted_data returned in Synapse's API response.
    ephemeralPublicKey: This is the public_key returned in Synapse's API response.

Notes on Google Pay

Please review Google's documentation for additional information on how to implement push provisioning in your Android app.
The Opaque Payment Card ('OPC') object is a combination of the encrypted_data and activation_data returned in Synapse's API response, and can be constructed as follows:
1
{
2
<encrypted_data>,
3
"tokenizationAuthenticationValue": <activation_data>
4
}
Copied!
Here is an example:
1
{
2
"fundingAccountInfo": {
3
"encryptedPayload": {
4
"encryptedData": "e471f285c5",
5
"encryptedKey": "a0d1746cf0d110abae",
6
"iv": "7777606a400",
7
"oaepHashingAlgorithm": "SHA256",
8
"publicKeyFingerprint": "e980877c757"
9
}
10
},
11
"tokenizationAuthenticationValue": "activation_data"
12
}
Copied!
Once you have the OPC object, you should encode it as Base64. The above object would be:
1
eyJmdW5kaW5nQWNjb3VudEluZm8iOiB7ImVuY3J5cHRlZFBheWxvYWQiOiB7ImVuY3J5cHRlZERhdGEiOiAiZTQ3MWYyODVjNSIsICJlbmNyeXB0ZWRLZXkiOiAiYTBkMTc0NmNmMGQxMTBhYmFlIiwgIml2IjogIjc3Nzc2MDZhNDAwIiwgIm9hZXBIYXNoaW5nQWxnb3JpdGhtIjogIlNIQTI1NiIsICJwdWJsaWNLZXlGaW5nZXJwcmludCI6ICJlOTgwODc3Yzc1NyJ9fSwgInRva2VuaXphdGlvbkF1dGhlbnRpY2F0aW9uVmFsdWUiOiAiYWN0aXZhdGlvbl9kYXRhIn0=
Copied!
Finally, this is the call your app would make to Google:
1
UserAddress userAddress = UserAddress.newBuilder()
2
.setAddress1("123 Mission St.")
3
.setAddress2("#100")
4
.setCountryCode("US")
5
.setLocality("San Francisco")
6
.setAdministrativeArea("CA")
7
.setName("Synabot")
8
.setPhoneNumber("4155550000")
9
.setPostalCode("94105")
10
.build();
11
12
# this is the Base64 encoded JSON object we created above
13
string opc_string = “eyJmdW5kaW5nQWNjb3VudEluZm8iOiB7ImVuY3J5cHRlZFBheWxvYWQiOiB7ImVuY3J5cHRlZERhdGEiOiAiZTQ3MWYyODVjNSIsICJlbmNyeXB0ZWRLZXkiOiAiYTBkMTc0NmNmMGQxMTBhYmFlIiwgIml2IjogIjc3Nzc2MDZhNDAwIiwgIm9hZXBIYXNoaW5nQWxnb3JpdGhtIjogIlNIQTI1NiIsICJwdWJsaWNLZXlGaW5nZXJwcmludCI6ICJlOTgwODc3Yzc1NyJ9fSwgInRva2VuaXphdGlvbkF1dGhlbnRpY2F0aW9uVmFsdWUiOiAiYWN0aXZhdGlvbl9kYXRhIn0=
14
15
byte [] opc = opc_string.getBytes()
16
PushTokenizeRequest pushTokenizeRequest =
17
new PushTokenizeRequest.Builder()
18
.setOpaquePaymentCard(opc)
19
.setNetwork(TapAndPay.CARD_NETWORK_MASTERCARD)
20
.setTokenServiceProvider(TapAndPay.TOKEN_PROVIDER_MASTERCARD)
21
.setDisplayName(“My Synapse Card")
22
.setLastDigits(1234")
23
.setUserAddress(userAddress)
24
.build();
Copied!
Last modified 4mo ago