Mobile SDK

postCreate Vaulted Shopper

Definition

Documentation

The Create Vaulted Shopper request enables you to store a shopper's details (including payment info) securely in BlueSnap. BlueSnap will provide a token (vaulted-shopper-id) for that saved shopper.

You can then use the vaulted-shopper-id in order to complete payment transactions, improve the checkout experience for a returning shopper, and update the shopper's payment details. For an example of using the vaulted-shopper-id for a returning shopper, see Returning shopper tutorial.

Each vaulted shopper can have multiple credit cards and multiple ACH accounts.

If you add a credit card to a vaulted shopper, BlueSnap will validate the card before adding it to the shopper.

To create a shopper with wallet details for Masterpass or Visa Checkout, including the payment info and billing and shipping info, you will simply include the walletId in the request. For details, see:

Response Details

API version 3.0If successful, the response HTTP status code is 200 OK.If you use ACH/ECP, the response includes the ecp-details container, which replaces the ecp-info resource, allowing for multiple ACH accounts to be stored for the shopper.

API version 2.0If successful, the response HTTP status code is 200 OK.The response body includes the vaulted-shopper resource, which contains all details saved for that shopper.The vaulted-shopper-id appears in the response body, as well as in the URL in the location header. In the example below, the vaulted-shopper-id is 20848977.

API version 1.0If successful, the response HTTP status code is 201 Created.The vaulted-shopper-id appears in the URL in the location header. In the example below, the vaulted-shopper-id is 19549020.There is no content in the response body.

Example Descriptions

Basic Create Vaulted Shopper

This example shows a basic Create Vaulted Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.

Create Vaulted Shopper with credit card

To save credit card information for the shopper, you'll need to include the credit-card-info property within the payment-sources resource in your request. See credit-card-info. Note that you must meet specific PCI compliance requirements in order to send unencrypted card details.

Above is an example of a request with an unencrypted credit card number.

Create Vaulted Shopper with credit card and billing info

Optionally, you can include the shopper's billing info in the credit-card-info property within the payment-sources resource in your request. See credit-card-info. This can help improve the experience for returning shoppers, because you can save time by pre-populating the checkout form with their billing details.

Above is an example of a request with credit card details along with billing info.

Create Vaulted Shopper with credit card, billing info and fraud info

Optionally, you can include fraud info in the request, so that your fraud checks can run and verify that you are not saving a shopper with payment info that is suspected to be fraudulent.

Above is an example of a request with that includes fraud info such as the shopper's IP address and shipping address.

Create Vaulted Shopper with encrypted credit card

Your PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include theencrypted-card-number and encrypted-security-code properties within the credit-card-info resource in your request.

Above is an example of a request with an encrypted credit card number.

Create Vaulted Shopper with encrypted credit card

Your PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include theencrypted-card-number and encrypted-security-code properties within the credit-card-info resource in your request.

Above is an example of a request with an encrypted credit card number.

Create Vaulted Shopper with wallet

To create a shopper with wallet details, including the payment info and billing and shipping info, you will simply include the wallet-id in the request. No other elements are required.

Create Vaulted Shopper with Hosted Payment Fields token

If you are using BlueSnap's Hosted Payment Fields, you can save the shopper's payment information from the Hosted Payment Fields by including the token within the pf-token property in your request.

Above is an example of a request with the Hosted Payment Fields token.

Create Vaulted Shopper with credit card and soft descriptor

The above example shows how to create a shopper with a credit card and soft descriptor, which is the description that may appear on the shopper's bank statement when BlueSnap validates the card before adding it to the shopper.

Create Vaulted Shopper with SEPA Direct Debit

The above example shows a Create Vaulted Shopper request with bank account details for the SEPA Direct Debit payment method. Include the shopper's bank account details within payment-sources > sepa-direct-debit-info > sepa-direct-debit. The shopper may have more than one saved bank accounts with the SEPA Direct Debit payment method.

Create Vaulted Shopper with ACH/ECP info

To save ACH/ECP account info for a shopper, include the ecp-info element in your request. Only one ACH/ECP account can be saved per shopper.

Create Vaulted Shopper with multiple ACH accounts

The above example shows a Create Vaulted Shopper request for shoppers who have multiple ACH accounts. Include the shopper's account details within payment-sources > ecp-details.

Create Vaulted Shopper with MOTO and NTI

The transaction-order-source identifies the order as Mail Order Telephone Order. The response includes the network-transaction-id for the transaction.

Create Vaulted Shopper with 3DS

The response includes the 3DS result and the NTI (networkTransactionId) for the transaction. Save this for future transactions.

API Explorer (API version 2.0)

To test out a call, enter the XML portion of the request below and then click Try it!

Tip: Copy the XML portion from one of the example requests above, or use the XML code below as a starting point. You can enter different parameters and test credit card numbers to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.