{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/vaulted-shoppers","auth":"optional","method":"post","examples":{"codes":[]},"settings":"57ee593a21ceb20e0061959e","results":{"codes":[{"language":"text","code":""}]},"params":[]},"next":{"description":"","pages":[]},"title":"Create Vaulted Shopper","type":"endpoint","slug":"create-vaulted-shopper","excerpt":"","body":"The Create Vaulted Shopper request enables you to store a shopper's details (including payment info) securely in BlueSnap. BlueSnap will provide a token (`vaultedShopperId`) for that saved shopper.\n\nYou can then use the `vaultedShopperId` 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 `vaultedShopperId` for a returning shopper, see [Returning shopper tutorial](doc:returning-shopper-tutorial).\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"* Each vaulted shopper can have multiple credit cards and multiple ACH accounts.\\n* If you add a credit card to a vaulted shopper, BlueSnap will validate the card before adding it to the shopper. \\n* 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:\\n * [Masterpass Guide](/docs/masterpass)\\n * [Visa Checkout Guide](/docs/visa-checkout)\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend a **[vaultedShopper](doc:vaulted-shopper)** object with the following:\n\n `paymentSources` *object* optional (see [paymentSources](doc:payment-sources))\n `firstName` *string* <span style=\"color:#F37500\">**required** if `walletId` is not sent</span>\n `lastName` *string* <span style=\"color:#F37500\">**required** if `walletId` is not sent</span>\n `softDescriptor` *string* optional\n `descriptorPhoneNumber` *string* optional\n `merchantShopperId` *string* optional\n `country` *string* optional\n `state` *string* optional\n `city` *string* optional\n `address` *string* optional\n `address2` *string* optional\n `email` *string* optional\n `zip` *string* optional\n `phone` *string* optional\n `companyName` *string* <span style=\"color:#F37500\">**required** for Corporate ECP accounts</span>\n `shopperCurrency` *string* optional\n `shippingContactInfo` *object* optional (see [shippingContactInfo](doc:shipping-contact-info))\n `walletId` *long* optional Include if adding details for Masterpass or Visa Checkout \n `transactionFraudInfo` *object* optional (see [transactionFraudInfo](doc:transaction-fraud-info))\n `transactionOrderSource` *string* optional\n `threeDSecure` *object* optional (see [threeDSecure](https://developers.bluesnap.com/v8976-JSON/docs/threedsecure))\n\n###Response Details\nThe response content depends on which version of the API you are using (see [Authentication & headers](/docs/authentication)), as follows:\n\n* **API version 3.0**\nIf successful, the response HTTP status code is 200 OK.\nIf you use ACH/ECP, the response includes the [ecpDetails](doc:ecpdetails) object, which replaces the ecpInfo object, allowing for multiple ACH accounts to be stored for the shopper.\n\n* **API version 2.0**\nIf successful, the response HTTP status code is 200 OK.\nThe response includes the [vaultedShopper](doc:vaulted-shopper) object, which contains all details that are saved for that shopper.\nThe `vaultedShopperId` appears in the response body, as well as in the URL in the location header. In the example below, the `vaultedShopperId` is **20848977**.\n\n* **API version 1.0**\nIf successful, the response HTTP status code is 201 Created.\nThe `vaultedShopperId` appears in the URL in the location header. In the example below, the `vaultedShopperId` is **19549020**.\nThere is no content in the response body. \n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n}\",\n \"language\": \"curl\",\n \"name\": \"Create Vaulted Shopper Request: basic\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"country\\\": \\\"us\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardNumber\\\": \\\"4111 1111 1111 1111\\\",\\n \\\"securityCode\\\": \\\"123\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\"\\n }\\n }\\n ]\\n \\n }\\n}\",\n \"language\": \"curl\",\n \"name\": \"with credit card and billing info\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\n \\\"billingContactInfo\\\": {\\n \\\"zip\\\": \\\"01752\\\",\\n \\\"country\\\": \\\"US\\\",\\n \\\"firstName\\\": \\\"billingFirstName\\\",\\n \\\"lastName\\\": \\\"billingLastName\\\",\\n \\\"address2\\\": \\\"Apt 1\\\",\\n \\\"address1\\\": \\\"10 Main St\\\",\\n \\\"state\\\": \\\"MA\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"expirationYear\\\": \\\"2023\\\",\\n \\\"securityCode\\\": \\\"837\\\",\\n \\\"expirationMonth\\\": \\\"02\\\",\\n \\\"cardNumber\\\": \\\"4263982640269299\\\"\\n }\\n }]},\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"transactionFraudInfo\\\": {\\n \\\"shopperIpAddress\\\": \\\"123.12.134.1\\\",\\n \\\"fraudSessionId\\\": \\\"1234\\\",\\n \\\"company\\\": \\\"company\\\",\\n \\\"shippingContactInfo\\\": {\\n \\\"zip\\\": \\\"shippingZip\\\",\\n \\\"country\\\": \\\"US\\\",\\n \\\"firstName\\\": \\\"shippingLastName\\\",\\n \\\"lastName\\\": \\\"shippingFirstName\\\",\\n \\\"city\\\": \\\"shippingCity\\\",\\n \\\"address2\\\": \\\"shippingAddress2\\\",\\n \\\"address1\\\": \\\"shippingAddress1\\\",\\n \\\"state\\\": \\\"AL\\\"\\n }\\n }\\n}\",\n \"language\": \"curl\",\n \"name\": \"with credit card, billing info and fraud info\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\\"creditCard\\\": {\\n \\\"expirationYear\\\": \\\"2023\\\",\\n \\\"encryptedCardNumber\\\": \\\"$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=\\\",\\n \\\"encryptedSecurityCode\\\": \\\"$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"expirationMonth\\\": \\\"07\\\"\\n }}]},\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n}\",\n \"language\": \"curl\",\n \"name\": \"with encrypted card details\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"walletId\\\": \\\"21\\\"}\",\n \"language\": \"curl\",\n \"name\": \"with wallet ID\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"pfToken\\\" : \\\"2b1383fa5f25c819bee03e01e060b2c0efae00dfdd963a62c6e106829d727b63_\\\"\\n }\\n ]\\n \\n }\\n}\",\n \"language\": \"curl\",\n \"name\": \"with Hosted Payment Fields token\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\\"creditCard\\\": {\\n \\\"expirationYear\\\": \\\"2023\\\",\\n \\\"securityCode\\\": \\\"837\\\",\\n \\\"expirationMonth\\\": \\\"02\\\",\\n \\\"cardNumber\\\": \\\"4263982640269299\\\"\\n }}]},\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"softDescriptor\\\": \\\"MYCOMPANY\\\"\\n}\",\n \"language\": \"curl\",\n \"name\": \"with credit card and soft descriptor\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"Jane\\\", \\n \\\"lastName\\\": \\\"Shopper\\\", \\n \\\"zip\\\": \\\"12345\\\", \\n \\\"country\\\": \\\"fr\\\",\\n \\\"phone\\\": \\\"1234567890\\\", \\n \\\"paymentSources\\\": {\\n \\\"sepaDirectDebitInfo\\\": [{ \\\"sepaDirectDebit\\\": {\\n \\\"iban\\\": \\\"DE09100100101234567893\\\"\\n }}]}\\n}\",\n \"language\": \"curl\",\n \"name\": \"with SEPA Direct Debit\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"us\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": { \\n \\\"ecpDetails\\\":[ \\n { \\n \\\"ecp\\\":{ \\n \\\"routingNumber\\\":\\\"011075150\\\",\\n \\\"accountType\\\":\\\"CONSUMER_CHECKING\\\",\\n \\\"accountNumber\\\":\\\"4099999992\\\"\\n }\\n }\\n ]\\n }\\n}'\",\n \"language\": \"curl\",\n \"name\": \"with ACH/ECP\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{ \\n \\\"zip\\\":\\\"12345\\\",\\n \\\"country\\\":\\\"us\\\",\\n \\\"paymentSources\\\":{ \\n \\\"ecpDetails\\\":[ \\n { \\n \\\"ecp\\\":{ \\n \\\"routingNumber\\\":\\\"011075150\\\",\\n \\\"accountType\\\":\\\"CONSUMER_CHECKING\\\",\\n \\\"accountNumber\\\":\\\"4099999992\\\"\\n }\\n },\\n { \\n \\\"ecp\\\":{ \\n \\\"routingNumber\\\":\\\"011075151\\\",\\n \\\"accountType\\\":\\\"CONSUMER_SAVINGS\\\",\\n \\\"accountNumber\\\":\\\"4099999993\\\"\\n }\\n }\\n ]\\n },\\n \\\"firstName\\\":\\\"FirstName\\\",\\n \\\"lastName\\\":\\\"LastName\\\",\\n \\\"phone\\\":\\\"1234567890\\\"\\n}\\n\\n\",\n \"language\": \"curl\",\n \"name\": \"with multiple ACH accounts\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"transactionOrderSource\\\" : \\\"MOTO\\\",\\n \\\"paymentSources\\\": {\\n \\t\\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"country\\\": \\\"us\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardNumber\\\": \\\"4111 1111 1111 1111\\\",\\n \\\"securityCode\\\": \\\"123\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\"\\n }\\n }\\n ]\\n \\t\\n }\\n}\",\n \"language\": \"curl\",\n \"name\": \"with transaction order source: MOTO\"\n },\n {\n \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"creditCard\\\": {\\n \\\"encryptedCardNumber\\\": \\\"$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=\\\",\\n \\\"encryptedSecurityCode\\\": \\\"$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\"\\n }\\n }\\n ]\\n },\\n \\\"threeDSecure\\\": {\\n \\\"threeDSecureResultToken\\\": \\\"eyJhbGciOiJIUzI1NiJ9.eyJpc...\\\"\\n }\\n}\",\n \"language\": \"curl\",\n \"name\": \"with encrypted card details and 3DS\"\n }\n ]\n}\n[/block]\n###Response Examples\n**For API Version 3.0**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"vaultedShopperId\\\": 19574802,\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"softDescriptor\\\": \\\"BLS*BS\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"country\\\": \\\"us\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"1111\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"binCategory\\\": \\\"CONSUMER\\\",\\n \\\"cardRegulated\\\": \\\"N\\\",\\n \\\"issuingBank\\\": \\\"JPMORGAN CHASE BANK, N.A.\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\",\\n \\\"issuingCountryCode\\\": \\\"US\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeZip\\\": \\\"M\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"M\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\",\\n \\\"networkTransactionId\\\": \\\"759211614372286\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/30/2020\\\",\\n \\\"timeCreated\\\": \\\"05:59:40\\\"\\n }\\n ]\\n },\\n \\\"fraudResultInfo\\\": {\\n \\\"deviceDataCollector\\\": \\\"N\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"13:41:10\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"Create Vaulted Shopper Response: 200 OK\"\n },\n {\n \"code\": \"{\\n \\\"vaultedShopperId\\\": 19574600,\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"softDescriptor\\\": \\\"BLS*BS\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"country\\\": \\\"us\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"1111\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"binCategory\\\": \\\"CONSUMER\\\",\\n \\\"cardRegulated\\\": \\\"N\\\",\\n \\\"issuingBank\\\": \\\"JPMORGAN CHASE BANK, N.A.\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\",\\n \\\"issuingCountryCode\\\": \\\"US\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeZip\\\": \\\"M\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"M\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\",\\n \\\"networkTransactionId\\\": \\\"759205478861907\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"10:41:12\\\"\\n }\\n ]\\n },\\n \\\"fraudResultInfo\\\": {\\n \\\"deviceDataCollector\\\": \\\"N\\\"\\n },\\n \\\"transactionOrderSource\\\": \\\"MOTO\\\",\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"13:41:10\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"with MOTO and NTI\"\n },\n {\n \"code\": \"{\\n \\\"vaultedShopperId\\\": 19574636,\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"fr\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"softDescriptor\\\": \\\"BLS*BS\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"country\\\": \\\"fr\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"1000\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"binCategory\\\": \\\"CONSUMER\\\",\\n \\\"cardRegulated\\\": \\\"N\\\",\\n \\\"expirationMonth\\\": \\\"01\\\",\\n \\\"expirationYear\\\": \\\"2022\\\",\\n \\\"issuingCountryCode\\\": \\\"US\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"cvvResponseCode\\\": \\\"NR\\\",\\n \\\"avsResponseCodeZip\\\": \\\"N\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"N\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\",\\n \\\"networkTransactionId\\\": \\\"019072416172166\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/30/2020\\\",\\n \\\"timeCreated\\\": \\\"05:59:40\\\"\\n }\\n ]\\n },\\n \\\"threeDSecure\\\": {\\n \\\"authenticationResult\\\": \\\"AUTHENTICATION_SUCCEEDED\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"13:41:10\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"Create Vaulted Shopper with 3DS Response\"\n },\n {\n \"code\": \"{\\n \\\"vaultedShopperId\\\": 19569754,\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"country\\\": \\\"us\\\",\\n \\\"zip\\\": \\\"12345\\\",\\n \\\"phone\\\": \\\"1234567890\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"ecpDetails\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n },\\n \\\"ecp\\\": {\\n \\\"accountType\\\": \\\"CONSUMER_CHECKING\\\",\\n \\\"publicAccountNumber\\\": \\\"99992\\\",\\n \\\"publicRoutingNumber\\\": \\\"75150\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/30/2020\\\",\\n \\\"timeCreated\\\": \\\"05:48:18\\\"\\n },\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n },\\n \\\"ecp\\\": {\\n \\\"accountType\\\": \\\"CONSUMER_SAVINGS\\\",\\n \\\"publicAccountNumber\\\": \\\"99993\\\",\\n \\\"publicRoutingNumber\\\": \\\"75151\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/30/2020\\\",\\n \\\"timeCreated\\\": \\\"05:48:18\\\"\\n }\\n ]\\n },\\n \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"Y\\\"},\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"13:41:10\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"with ACH/ECP\"\n },\n {\n \"code\": \"{\\n \\\"vaultedShopperId\\\": 19582622,\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"softDescriptor\\\": \\\"BLS*BS\\\",\\n \\\"shopperCurrency\\\": \\\"USD\\\",\\n \\\"paymentSources\\\": {\\n \\\"creditCardInfo\\\": [\\n {\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n },\\n \\\"creditCard\\\": {\\n \\\"cardLastFourDigits\\\": \\\"1091\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"binCategory\\\": \\\"CONSUMER\\\",\\n \\\"expirationMonth\\\": \\\"07\\\",\\n \\\"expirationYear\\\": \\\"2023\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"cvvResponseCode\\\": \\\"NR\\\",\\n \\\"avsResponseCodeZip\\\": \\\"U\\\",\\n \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\",\\n \\\"networkTransactionId\\\": \\\"020020314211584\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/30/2020\\\",\\n \\\"timeCreated\\\": \\\"05:59:40\\\"\\n }\\n ]\\n },\\n \\\"fraudResultInfo\\\": {\\n \\\"deviceDataCollector\\\": \\\"N\\\"\\n },\\n \\\"threeDSecure\\\": {\\n \\\"authenticationResult\\\": \\\"AUTHENTICATION_SUCCEEDED\\\"\\n },\\n \\\"dateCreated\\\": \\\"09/22/2020\\\",\\n \\\"timeCreated\\\": \\\"13:41:10\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"with encrypted card details and 3DS\"\n }\n ]\n}\n[/block]\n**Responses for previous API versions**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\n \\\"billingContactInfo\\\": {\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"city\\\": \\\"\\\",\\n \\\"companyName\\\": \\\"JohnDoeAndSons\\\"\\n },\\n \\\"processingInfo\\\": {\\n \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n \\\"cvvResponseCode\\\": \\\"MA\\\",\\n \\\"avsResponseCodeName\\\": \\\"U\\\",\\n \\\"avsResponseCodeZip\\\": \\\"U\\\"\\n },\\n \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"N\\\"},\\n \\\"creditCard\\\": {\\n \\\"expirationYear\\\": 2023,\\n \\\"cardLastFourDigits\\\": 9299,\\n \\\"cardSubType\\\": \\\"CREDIT\\\",\\n \\\"cardType\\\": \\\"VISA\\\",\\n \\\"cardCategory\\\": \\\"CLASSIC\\\",\\n \\\"expirationMonth\\\": \\\"02\\\"\\n }\\n }]},\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\",\\n \\\"vaultedShopperId\\\": 20848977,\\n \\\"shopperCurrency\\\": \\\"USD\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"200 OK - API v2.0\"\n },\n {\n \"code\": \"HTTP/ 1.1 201 Created\\nLocation: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549020\",\n \"language\": \"http\",\n \"name\": \"201 Created - API v1.0\"\n }\n ]\n}\n[/block]\n\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\n\n###Basic Create Vaulted Shopper\nThis example shows a basic Create Vaulted Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.\n\n###Create Vaulted Shopper with credit card\nTo save credit card information for the shopper, you'll need to include the `creditCardInfo` property within the `paymentSources` object in your request. Note that you must meet specific [PCI compliance](/docs/pci-compliance) requirements in order to send unencrypted card details.\n\nAbove is an example of a request with an unencrypted credit card number.\n\n###Create Vaulted Shopper with credit card and billing info\nOptionally, you can include the shopper's billing info in the `creditCardInfo` property within the `paymentSources` object in your request. This can help improve the experience for returning shoppers, because you can save time by pre-populating the checkout form with their billing details.\n\nAbove is an example of a request with credit card details along with billing info.\n\n###Create Vaulted Shopper with credit card, billing info and fraud info\nOptionally, 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.\n\nAbove is an example of a request with that includes fraud info such as the shopper's IP address and shipping address.\n\n###Create Vaulted Shopper with encrypted credit card\nYour [PCI compliance](/docs/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 the`encryptedCardNumber` and `encryptedSecurityCode` properties within the `creditCardInfo` object in your request.\n\nAbove is an example of a request with an encrypted credit card number.\n\n###Create Vaulted Shopper with wallet\nTo create a shopper with wallet details, including the payment info and billing and shipping info, you will simply include the `walletId` in the request. No other elements are required. \n\nFor details, see:\n * [Masterpass Guide](/docs/masterpass)\n * [Visa Checkout Guide](/docs/visa-checkout)\n\nAbove is an example of a request with a wallet ID.\n\n###Create Vaulted Shopper with Hosted Payment Fields token\nIf you are using BlueSnap's [Hosted Payment Fields](/v8976-Tools/docs/hosted-payment-fields), you can save the shopper's payment information from the Hosted Payment Fields by including the token within the `pfToken` property in your request.\n\nAbove is an example of a request with the Hosted Payment Fields token.\n\n\n###Create Vaulted Shopper with credit card and soft descriptor\nThe 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. \n\n###Create Vaulted Shopper with SEPA Direct Debit \nThe above example shows a Create Vaulted Shopper request with bank account details for the [SEPA Direct Debit](/docs/sepa-direct-debit) payment method. Include the shopper's bank account details within `paymentSources` > `sepaDirectDebitInfo` > `sepaDirectDebit`. The shopper may have more than one saved bank accounts with the SEPA Direct Debit payment method. \n\n###Create Vaulted Shopper with ACH/ECP info\nTo save ACH/ECP account info for a shopper, include the [ecpInfo](doc:ecp-info) element in your request. Only one ACH/ECP account can be saved per shopper.\n\n###Create Vaulted Shopper with multiple ACH accounts\nThe above example shows a Create Vaulted Shopper request for shoppers who have multiple ACH accounts. Include the shopper's account details within `paymentSources` > `ecpDetails`.\n\n###Create Vaulted Shopper with MOTO and NTI\nThe `transactionOrderSource` identifies the order as Mail Order Telephone Order. The response includes the `networkTransactionId` for the transaction.\n\n###Create Vaulted Shopper with 3DS\nThe response includes the 3DS result and the NTI (`networkTransactionId`) for the transaction. Save this for future transactions.\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**Tip**: Use the JSON 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.*\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\\"creditCard\\\": {\\n \\\"expirationYear\\\": 2023,\\n \\\"securityCode\\\": 837,\\n \\\"expirationMonth\\\": \\\"02\\\",\\n \\\"cardNumber\\\": 4263982640269299\\n }}]},\\n \\\"firstName\\\": \\\"FirstName\\\",\\n \\\"lastName\\\": \\\"LastName\\\"\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","updates":[],"order":0,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5ff39c12e2e8fa00503ad5ca","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.36.1 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5ff39c12e2e8fa00503ad52d","5ff39c12e2e8fa00503ad52e","5ff39c12e2e8fa00503ad52f","5ff39c12e2e8fa00503ad530","5ff39c12e2e8fa00503ad531","5ff39c12e2e8fa00503ad532","5ff39c12e2e8fa00503ad533","5ff39c12e2e8fa00503ad534","5ff39c12e2e8fa00503ad535","5ff39c12e2e8fa00503ad536","5ff39c12e2e8fa00503ad537","5ff39c12e2e8fa00503ad538","5ff39c12e2e8fa00503ad539","5ff39c12e2e8fa00503ad53a","5ff39c12e2e8fa00503ad53b","5ff39c12e2e8fa00503ad53c","5ff39c12e2e8fa00503ad53d","5ff39c12e2e8fa00503ad53e","5ff39c12e2e8fa00503ad53f"],"_id":"5ff39c12e2e8fa00503ad5e4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5fc6c6094cb8fa066b0d2ea3","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Vaulted Shoppers","slug":"vaulted-shopper-service","order":9,"from_sync":false,"reference":true,"_id":"5ff39c12e2e8fa00503ad533","version":"5ff39c12e2e8fa00503ad5e4","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-19T18:31:30.299Z","__v":0},"user":"5beb1b96bc2003003ecd645e","createdAt":"2019-07-24T16:04:53.201Z","__v":0,"parentDoc":null}
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 (vaultedShopperId
) for that saved shopper.
You can then use the vaultedShopperId
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 vaultedShopperId
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:
Request Content
Send a vaultedShopper object with the following:
paymentSources
object optional (see paymentSources)
firstName
string required if walletId
is not sent
lastName
string required if walletId
is not sent
softDescriptor
string optional
descriptorPhoneNumber
string optional
merchantShopperId
string optional
country
string optional
state
string optional
city
string optional
address
string optional
address2
string optional
email
string optional
zip
string optional
phone
string optional
companyName
string required for Corporate ECP accounts
shopperCurrency
string optional
shippingContactInfo
object optional (see shippingContactInfo)
walletId
long optional Include if adding details for Masterpass or Visa Checkout
transactionFraudInfo
object optional (see transactionFraudInfo)
transactionOrderSource
string optional
threeDSecure
object optional (see threeDSecure)
Response Details
The response content depends on which version of the API you are using (see Authentication & headers), as follows:
API version 3.0
If successful, the response HTTP status code is 200 OK.
If you use ACH/ECP, the response includes the ecpDetails object, which replaces the ecpInfo object, allowing for multiple ACH accounts to be stored for the shopper.API version 2.0
If successful, the response HTTP status code is 200 OK.
The response includes the vaultedShopper object, which contains all details that are saved for that shopper.
ThevaultedShopperId
appears in the response body, as well as in the URL in the location header. In the example below, thevaultedShopperId
is 20848977.API version 1.0
If successful, the response HTTP status code is 201 Created.
ThevaultedShopperId
appears in the URL in the location header. In the example below, thevaultedShopperId
is 19549020.
There is no content in the response body.
Examples
Request Examples
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"zip": "12345",
"country": "us"
},
"creditCard": {
"cardNumber": "4111 1111 1111 1111",
"securityCode": "123",
"expirationMonth": "07",
"expirationYear": "2023"
}
}
]
}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"paymentSources": {"creditCardInfo": [{
"billingContactInfo": {
"zip": "01752",
"country": "US",
"firstName": "billingFirstName",
"lastName": "billingLastName",
"address2": "Apt 1",
"address1": "10 Main St",
"state": "MA"
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
}
}]},
"firstName": "FirstName",
"lastName": "LastName",
"transactionFraudInfo": {
"shopperIpAddress": "123.12.134.1",
"fraudSessionId": "1234",
"company": "company",
"shippingContactInfo": {
"zip": "shippingZip",
"country": "US",
"firstName": "shippingLastName",
"lastName": "shippingFirstName",
"city": "shippingCity",
"address2": "shippingAddress2",
"address1": "shippingAddress1",
"state": "AL"
}
}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"paymentSources": {"creditCardInfo": [{"creditCard": {
"expirationYear": "2023",
"encryptedCardNumber": "$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=",
"encryptedSecurityCode": "$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=",
"cardType": "VISA",
"expirationMonth": "07"
}}]},
"firstName": "FirstName",
"lastName": "LastName"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"walletId": "21"}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"pfToken" : "2b1383fa5f25c819bee03e01e060b2c0efae00dfdd963a62c6e106829d727b63_"
}
]
}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"paymentSources": {"creditCardInfo": [{"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
}}]},
"firstName": "FirstName",
"lastName": "LastName",
"softDescriptor": "MYCOMPANY"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "Jane",
"lastName": "Shopper",
"zip": "12345",
"country": "fr",
"phone": "1234567890",
"paymentSources": {
"sepaDirectDebitInfo": [{ "sepaDirectDebit": {
"iban": "DE09100100101234567893"
}}]}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"country": "us",
"zip": "12345",
"phone": "1234567890",
"shopperCurrency": "USD",
"paymentSources": {
"ecpDetails":[
{
"ecp":{
"routingNumber":"011075150",
"accountType":"CONSUMER_CHECKING",
"accountNumber":"4099999992"
}
}
]
}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"zip":"12345",
"country":"us",
"paymentSources":{
"ecpDetails":[
{
"ecp":{
"routingNumber":"011075150",
"accountType":"CONSUMER_CHECKING",
"accountNumber":"4099999992"
}
},
{
"ecp":{
"routingNumber":"011075151",
"accountType":"CONSUMER_SAVINGS",
"accountNumber":"4099999993"
}
}
]
},
"firstName":"FirstName",
"lastName":"LastName",
"phone":"1234567890"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"shopperCurrency": "USD",
"transactionOrderSource" : "MOTO",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"zip": "12345",
"country": "us"
},
"creditCard": {
"cardNumber": "4111 1111 1111 1111",
"securityCode": "123",
"expirationMonth": "07",
"expirationYear": "2023"
}
}
]
}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"paymentSources": {
"creditCardInfo": [
{
"creditCard": {
"encryptedCardNumber": "$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=",
"encryptedSecurityCode": "$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=",
"cardType": "VISA",
"expirationMonth": "07",
"expirationYear": "2023"
}
}
]
},
"threeDSecure": {
"threeDSecureResultToken": "eyJhbGciOiJIUzI1NiJ9.eyJpc..."
}
}
{
"vaultedShopperId": 19574802,
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"softDescriptor": "BLS*BS",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"zip": "12345",
"country": "us"
},
"creditCard": {
"cardLastFourDigits": "1111",
"cardType": "VISA",
"cardSubType": "CREDIT",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"issuingBank": "JPMORGAN CHASE BANK, N.A.",
"expirationMonth": "07",
"expirationYear": "2023",
"issuingCountryCode": "US"
},
"processingInfo": {
"cvvResponseCode": "MA",
"avsResponseCodeZip": "M",
"avsResponseCodeAddress": "M",
"avsResponseCodeName": "U",
"networkTransactionId": "759211614372286"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:59:40"
}
]
},
"fraudResultInfo": {
"deviceDataCollector": "N"
},
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
{
"vaultedShopperId": 19574600,
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"softDescriptor": "BLS*BS",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"zip": "12345",
"country": "us"
},
"creditCard": {
"cardLastFourDigits": "1111",
"cardType": "VISA",
"cardSubType": "CREDIT",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"issuingBank": "JPMORGAN CHASE BANK, N.A.",
"expirationMonth": "07",
"expirationYear": "2023",
"issuingCountryCode": "US"
},
"processingInfo": {
"cvvResponseCode": "MA",
"avsResponseCodeZip": "M",
"avsResponseCodeAddress": "M",
"avsResponseCodeName": "U",
"networkTransactionId": "759205478861907"
},
"dateCreated": "09/22/2020",
"timeCreated": "10:41:12"
}
]
},
"fraudResultInfo": {
"deviceDataCollector": "N"
},
"transactionOrderSource": "MOTO",
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
{
"vaultedShopperId": 19574636,
"firstName": "FirstName",
"lastName": "LastName",
"country": "fr",
"zip": "12345",
"phone": "1234567890",
"softDescriptor": "BLS*BS",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"zip": "12345",
"country": "fr"
},
"creditCard": {
"cardLastFourDigits": "1000",
"cardType": "VISA",
"cardSubType": "CREDIT",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"expirationMonth": "01",
"expirationYear": "2022",
"issuingCountryCode": "US"
},
"processingInfo": {
"cvvResponseCode": "NR",
"avsResponseCodeZip": "N",
"avsResponseCodeAddress": "N",
"avsResponseCodeName": "U",
"networkTransactionId": "019072416172166"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:59:40"
}
]
},
"threeDSecure": {
"authenticationResult": "AUTHENTICATION_SUCCEEDED"
},
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
{
"vaultedShopperId": 19569754,
"firstName": "FirstName",
"lastName": "LastName",
"country": "us",
"zip": "12345",
"phone": "1234567890",
"shopperCurrency": "USD",
"paymentSources": {
"ecpDetails": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName"
},
"ecp": {
"accountType": "CONSUMER_CHECKING",
"publicAccountNumber": "99992",
"publicRoutingNumber": "75150"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:48:18"
},
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName"
},
"ecp": {
"accountType": "CONSUMER_SAVINGS",
"publicAccountNumber": "99993",
"publicRoutingNumber": "75151"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:48:18"
}
]
},
"fraudResultInfo": {"deviceDataCollector": "Y"},
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
{
"vaultedShopperId": 19582622,
"firstName": "FirstName",
"lastName": "LastName",
"softDescriptor": "BLS*BS",
"shopperCurrency": "USD",
"paymentSources": {
"creditCardInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName"
},
"creditCard": {
"cardLastFourDigits": "1091",
"cardType": "VISA",
"cardSubType": "CREDIT",
"binCategory": "CONSUMER",
"expirationMonth": "07",
"expirationYear": "2023"
},
"processingInfo": {
"cvvResponseCode": "NR",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U",
"networkTransactionId": "020020314211584"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:59:40"
}
]
},
"fraudResultInfo": {
"deviceDataCollector": "N"
},
"threeDSecure": {
"authenticationResult": "AUTHENTICATION_SUCCEEDED"
},
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
Responses for previous API versions
{
"paymentSources": {"creditCardInfo": [{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"city": "",
"companyName": "JohnDoeAndSons"
},
"processingInfo": {
"avsResponseCodeAddress": "U",
"cvvResponseCode": "MA",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "U"
},
"fraudResultInfo": {"deviceDataCollector": "N"},
"creditCard": {
"expirationYear": 2023,
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC",
"expirationMonth": "02"
}
}]},
"firstName": "FirstName",
"lastName": "LastName",
"vaultedShopperId": 20848977,
"shopperCurrency": "USD"
}
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549020
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 creditCardInfo
property within the paymentSources
object in your request. 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 creditCardInfo
property within the paymentSources
object in your request. 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 theencryptedCardNumber
and encryptedSecurityCode
properties within the creditCardInfo
object 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 walletId
in the request. No other elements are required.
For details, see:
Above is an example of a request with a wallet ID.
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 pfToken
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 paymentSources
> sepaDirectDebitInfo
> sepaDirectDebit
. 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 ecpInfo 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 paymentSources
> ecpDetails
.
Create Vaulted Shopper with MOTO and NTI
The transactionOrderSource
identifies the order as Mail Order Telephone Order. The response includes the networkTransactionId
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
To test out a call, enter the request content below and then click Try it!
Tip: Use the JSON 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.
{
"paymentSources": {"creditCardInfo": [{"creditCard": {
"expirationYear": 2023,
"securityCode": 837,
"expirationMonth": "02",
"cardNumber": 4263982640269299
}}]},
"firstName": "FirstName",
"lastName": "LastName"
}