Create Wallet

Definition

https://sandbox.bluesnap.com/services/2/wallets


Documentation

The Create Wallet request is where you provide the initial parameters required by the wallet processor to launch the wallet's payment page. The response includes the wallet token.

👍

This currently supports Apple Pay on the web and the Visa Checkout wallet. For detailed setup instructions, see:

For information on Google Pay, refer to our Google Pay™ Guide.


Apple Pay

JSON Request Content

Send a wallet object, with the following:

      walletType     string    required

      validationUrl     string    required

      domainName     string    required

      displayName     string    optional

JSON Response Details

If successful, the response HTTP status code is 200 OK.
The response includes the wallet object with the following:

      walletType     string

      walletToken     string


JSON Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/wallets \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "walletType": "APPLE_PAY", 
  "validationUrl": "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession", 
  "domainName": "merchant.com"
}'

Response Examples

{
    "walletType": "APPLE_PAY",
    "walletToken":"ImRhdGEiOiJuY1AvRitIUy8zeG5ISk1pSm9RbXhCMFd"
}

Example Descriptions

Apple Pay Wallet

For Apple Pay, the request includes the walletType, validationUrl, and domainName. The response includes the walletToken. For more information, see Apple Pay in your website.

Note: Be sure that the domainName is the domain you registered during domain verification.

Visa Checkout

JSON Request Content

Send a wallet object, with the following:

      walletType     string    required

      callId     string    required

JSON Response Details

If successful, the response HTTP status code is 200 OK.
The response includes the wallet object with the following:

      walletId     long

      firstName     string

      lastName     string

      email     string

      country     string

      phone     string

      creditCard     object

      billingContactInfo     object

      shippingContactInfo     object


JSON Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/wallets \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "callId": 5549711876630985101,
    "walletType": "VISA_CHECKOUT"
}'

Response Examples

{
    "country": "us",
    "walletId": 2203,
    "firstName": "Ben",
    "lastName": "Li",
    "billingContactInfo": {
        "zip": 12324,
        "country": "us",
        "firstName": "Ben",
        "lastName": "Li",
        "city": "Santa Barbara",
        "address1": "BlueSnap Street",
        "state": "CA"
    },
    "phone": 5032541004,
    "shippingContactInfo": {
        "zip": 12324,
        "country": "us",
        "firstName": "Ben",
        "lastName": "Li",
        "city": "Santa Barbara",
        "phone": 5032541004,
        "address1": "BlueSnap Street",
        "state": "CA"
    },
    "creditCard": {
        "expirationYear": 2020,
        "cardLastFourDigits": 4821,
        "cardType": "VISA",
      	"cardSubType": "CREDIT", 
      	"cardCategory": "CLASSIC",
        "expirationMonth": 8
    },
    "email": "ben.li@bluesnap.com"
}

Example Descriptions

Visa Checkout Wallet

For Visa Checkout, the request includes the callId. The response content includes the wallet ID and the checkout details.
For more information, see Implementing Visa Checkout.


Apple Pay

XML Request Content

Send a wallet object, with the following:

      wallet-type     string    required

      validation-url     string    required

      domain-name     string    required

      display-name     string    optional

XML Response Details

If successful, the response HTTP status code is 200 OK.
The response includes the wallet object with the following:

      wallet-type     string

      wallet-token     string


XML Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/wallets \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<wallet xmlns="http://ws.plimus.com">
   <wallet-type>APPLE_PAY</wallet-type>
   <validation-url>https://apple-pay-gateway-cert.apple.com/paymentservices/startSession</validation-url>
   <display-name>My store</display-name>
</wallet>'

Response Examples

<wallet xmlns="http://ws.plimus.com">
  <wallet-type>APPLE_PAY</wallet-type>
  <wallet-token>ImRhdGEiOiJuY1AvRitIUy8zeG5ISk1pSm9RbXhCMFd</wallet-token>
</wallet>

Example Descriptions

Apple Pay Wallet

For Apple Pay, the request includes the wallet-type, validation-url, and domain-name. The response includes the wallet-token. For more information, see Apple Pay in your website.

Note: Be sure that the domain-name is the domain you registered during domain verification.

Visa Checkout

XML Request Content

wallet container    required, contains the following properties (see wallet):

      wallet-type     string    required

      store-id     string    required - Extended Payment API only

      call-id     string    required

XML Response Details

If successful, the response HTTP status code is 200 OK.
The response includes the wallet resource with the following:

      wallet-id     long

      first-name     string

      last-name     string

      email     string

      country     string

      phone     string

      credit-card     container

      billing-contact-info     container

      shipping-contact-info     container


XML Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/wallets \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<wallet xmlns="http://ws.plimus.com">
   <wallet-type>VISA_CHECKOUT</wallet-type>
   <call-id>5549711876630985101</call-id>
</wallet>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/wallets \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<wallet xmlns="http://ws.plimus.com">
   <wallet-type>VISA_CHECKOUT</wallet-type>
   <store-id>16500</store-id>
   <call-id>5549711876630985101</call-id>
</wallet>'

Response Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wallet xmlns="http://ws.plimus.com">
    <wallet-id>2203</wallet-id>
    <first-name>Ben</first-name>
    <last-name>Li</last-name>
    <email>ben.li&#x40;bluesnap.com</email>
    <country>us</country>
    <phone>5032541004</phone>
    <credit-card>
        <card-last-four-digits>4821</card-last-four-digits>
        <card-type>VISA</card-type>
        <card-sub-type>CREDIT</card-sub-type>
      	<card-category>CLASSIC</card-category>
        <expiration-month>8</expiration-month>
        <expiration-year>2020</expiration-year>
    </credit-card>
    <billing-contact-info>
        <first-name>Ben</first-name>
        <last-name>Li</last-name>
        <address1>BlueSnap Street</address1>
        <city>Santa Barbara</city>
        <state>CA</state>
        <zip>12324</zip>
        <country>us</country>
    </billing-contact-info>
    <shipping-contact-info>
        <first-name>Ben</first-name>
        <last-name>Li</last-name>
        <address1>BlueSnap Street</address1>
        <city> Santa Barbara </city>
        <state>CA</state>
        <zip>12324</zip>
        <country>us</country>
        <phone>5032541004</phone>
    </shipping-contact-info>
</wallet>

Example Descriptions

Visa Checkout Wallet

For Visa Checkout, the request includes the call-id. The response content includes the wallet ID and the checkout details.
For more information, see Implementing Visa Checkout.


Back to Top
Language
Authorization
:
Click Try It! to start a request and see the response here!