{"_id":"5c6c23e4735b81006177d09e","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5bedd214812951004a2ad9df","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z","categories":["5c6c23e4735b81006177d006","5c6c23e4735b81006177d007","5c6c23e4735b81006177d008","5c6c23e4735b81006177d009","5c6c23e4735b81006177d00a","5c6c23e4735b81006177d00b","5c6c23e4735b81006177d00c","5c6c23e4735b81006177d00d","5c6c23e4735b81006177d00e","5c6c23e4735b81006177d00f","5c6c23e4735b81006177d010","5c6c23e4735b81006177d011","5c6c23e4735b81006177d012","5c6c23e4735b81006177d013","5c6c23e4735b81006177d014"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Main","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"category":{"_id":"5c6c23e4735b81006177d00c","version":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-19T18:31:30.299Z","from_sync":false,"order":6,"slug":"vaulted-shopper-service","title":"Vaulted Shoppers"},"user":"5beb1b96bc2003003ecd645e","__v":4,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-12-19T15:26:33.482Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"language":"text","code":""}]},"method":"put","examples":{"codes":[]},"settings":"57ee593a21ceb20e0061959e","auth":"optional","params":[{"_id":"56ab9094f25f160d00e17f11","ref":"","in":"path","required":false,"desc":"vaultedShopperId received from BlueSnap","default":"","type":"string","name":"vaultedShopperId"}],"url":"/vaulted-shoppers/:vaultedShopperId"},"isReference":true,"order":1,"body":"The Update Vaulted Shopper request enables you to update an existing vaulted shopper by changing their contact info, adding and deleting payment methods, or adding wallet details. \n\n**Note**: We recommend that you first retrieve the vaulted shopper and then modify the desired property.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"* Each vaulted shopper can have multiple credit cards.\\n\\n* If you send a credit card number that does not yet exist in that vaulted shopper, BlueSnap validates the card as part of adding it to the shopper.\\n\\n* If you send a credit card number that does exist in that vaulted shopper, BlueSnap validates the card and updates the shopper with any changes to that card's expiration date.\\n\\n* You will obtain the `walletId` when the shopper successfully completes the Masterpass payment step. For a complete walkthrough of the flow for Masterpass, see [Implementing Masterpass via the API](/docs/masterpass#section-implementing-masterpass-via-the-api).\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer-api-version-2-0-\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\n\nSend a **[vaultedShopper](doc:vaulted-shopper)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`paymentSources` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional, can contain `creditCardInfo` (see [paymentSources](doc:payment-sources))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`firstName` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** if `walletId` is not sent</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`lastName` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** if `walletId` is not sent</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantShopperId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`softDescriptor` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`descriptorPhoneNumber` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`country` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`state` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`address` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`address2` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`email` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`zip` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`phone` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`companyName` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp; optional &nbsp; Include if adding Corporate ECP account details\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shopperCurrency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shippingContactInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [shippingContactInfo](doc:shipping-contact-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`walletId` &nbsp;&nbsp;&nbsp; *long* &nbsp;&nbsp;&nbsp;optional &nbsp; Include if adding wallet details for Masterpass or Visa Checkout\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionFraudInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionFraudInfo](doc:transaction-fraud-info))\n\n###Response Details\n\nThe response content depends on which version of the API you are using (see [Authentication & headers](/docs/authentication)), as follows:\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.\n\n**API version 1.0**\nIf successful, the response HTTP status code is 204 No Content.\n\n<hr>\n \n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\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\": \"Update Vaulted Shopper Request: add credit card\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\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 PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\n         \\\"pfToken\\\": \\\"9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_\\\"\\n    }]},\\n    \\\"firstName\\\": \\\"FirstName\\\",\\n    \\\"lastName\\\": \\\"LastName\\\"\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with Hosted Payment Fields token \"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \\\\\\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        \\t\\\"iban\\\": \\\"DE09100100101234567893\\\"\\n          }}]}\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with SEPA Direct Debit\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \\\\\\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            \\\"billingContactInfo\\\":{  \\n               \\\"firstName\\\":\\\"FirstName 2\\\",\\n               \\\"lastName\\\":\\\"LastName 2\\\"\\n            },\\n            \\\"ecp\\\":{  \\n               \\\"routingNumber\\\":\\\"011075150\\\",\\n               \\\"accountType\\\":\\\"CONSUMER_SAVINGS\\\",\\n               \\\"accountNumber\\\":\\\"4099999992\\\"\\n            }\\n         }\\n      ]\\n   },\\n   \\\"firstName\\\":\\\"FirstName\\\",\\n   \\\"lastName\\\":\\\"LastName\\\",\\n   \\\"phone\\\":\\\"1234567890\\\"\\n}\\n\",\n      \"language\": \"curl\",\n      \"name\": \"add new ACH\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\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\\\": {\\\"creditCardInfo\\\": [{\\\"creditCard\\\": {\\n    \\\"cardType\\\": \\\"VISA\\\",\\n    \\\"cardLastFourDigits\\\": \\\"9299\\\"\\n    },\\n    \\\"status\\\": \\\"D\\\"}]}\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"delete credit card\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"vaultedShopperId\\\": 19570266,\\n    \\\"firstName\\\": \\\"John\\\",\\n    \\\"lastName\\\": \\\"Doe\\\",\\n    \\\"zip\\\": \\\"12345\\\",\\n    \\\"phone\\\": \\\"1234567890\\\",\\n    \\\"shopperCurrency\\\": \\\"USD\\\",\\n    \\\"paymentSources\\\": {\\n        \\\"ecpDetails\\\": [\\n            {\\n                \\\"billingContactInfo\\\": {\\n                    \\\"firstName\\\": \\\"John\\\",\\n                    \\\"lastName\\\": \\\"Doe\\\",\\n                    \\\"zip\\\": \\\"12345\\\"\\n                },\\n                \\\"ecp\\\": {\\n                    \\\"accountType\\\": \\\"CONSUMER_CHECKING\\\",\\n                    \\\"publicAccountNumber\\\": \\\"99992\\\",\\n                    \\\"publicRoutingNumber\\\": \\\"75150\\\"\\n                },\\n                \\\"status\\\":\\\"D\\\"\\n            }\\n        ]\\n    }\\n}\\n\",\n      \"language\": \"curl\",\n      \"name\": \"delete ACH/ECP\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"vaultedShopperId\\\": 19570278,\\n    \\\"firstName\\\": \\\"FirstName\\\",\\n    \\\"lastName\\\": \\\"LastName\\\",\\n    \\\"country\\\": \\\"fr\\\",\\n    \\\"zip\\\": \\\"12345\\\",\\n    \\\"phone\\\": \\\"1234567890\\\",\\n    \\\"shopperCurrency\\\": \\\"USD\\\",\\n    \\\"paymentSources\\\": {\\n        \\\"sepaDirectDebitInfo\\\": [\\n            {\\n                \\\"billingContactInfo\\\": {\\n                    \\\"firstName\\\": \\\"FirstName\\\",\\n                    \\\"lastName\\\": \\\"LastName\\\"\\n                },\\n                \\\"sepaDirectDebit\\\": {\\n                    \\\"ibanFirstFour\\\": \\\"DE09\\\",\\n                    \\\"ibanLastFour\\\": \\\"7893\\\"\\n                },\\n                \\\"status\\\":\\\"D\\\"\\n            }\\n        ]\\n    }\\n}\\n\",\n      \"language\": \"curl\",\n      \"name\": \"delete SEPA\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"vaultedShopperId\\\":19570126,\\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         },\\n         {  \\n            \\\"billingContactInfo\\\":{  \\n               \\\"firstName\\\":\\\"FirstName 2\\\",\\n               \\\"lastName\\\":\\\"LastName 2\\\"\\n            },\\n            \\\"ecp\\\":{  \\n               \\\"accountType\\\":\\\"CONSUMER_SAVINGS\\\",\\n               \\\"publicAccountNumber\\\":\\\"99992\\\",\\n               \\\"publicRoutingNumber\\\":\\\"75150\\\"\\n            }\\n         }\\n      ]\\n   },\\n    \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"Y\\\"}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Update Vaulted Shopper Response: 200 OK - API v3.0 add new ACH\"\n    },\n    {\n      \"code\": \"{\\n    \\\"paymentSources\\\": {\\\"creditCardInfo\\\": [{\\n        \\\"billingContactInfo\\\": {\\n            \\\"firstName\\\": \\\"FirstName\\\",\\n            \\\"lastName\\\": \\\"LastName\\\",\\n            \\\"city\\\": \\\"\\\"\\n        },\\n        \\\"processingInfo\\\": {\\n            \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n            \\\"cvvResponseCode\\\": \\\"MA\\\",\\n            \\\"avsResponseCodeName\\\": \\\"U\\\",\\n            \\\"avsResponseCodeZip\\\": \\\"U\\\"\\n        },\\n        \\\"creditCard\\\": {\\n            \\\"expirationYear\\\": 2023,\\n            \\\"cardLastFourDigits\\\": 9299,\\n            \\\"cardSubType\\\": \\\"CREDIT\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"expirationMonth\\\": \\\"02\\\"\\n        }\\n    }]},\\n    \\\"firstName\\\": \\\"FirstName\\\",\\n    \\\"lastName\\\": \\\"LastName\\\",\\n    \\\"vaultedShopperId\\\": 19549048,\\n    \\\"shopperCurrency\\\": \\\"USD\\\",\\n    \\\"lastPaymentInfo\\\": {\\n        \\\"paymentMethod\\\": \\\"CC\\\",\\n        \\\"creditCard\\\": {\\n            \\\"cardLastFourDigits\\\": \\\"0026\\\",\\n            \\\"cardType\\\": \\\"VISA\\\",\\n            \\\"cardCategory\\\": \\\"CLASSIC\\\"\\n        }\\n    },\\n    \\\"fraudResultInfo\\\": {\\\"deviceDataCollector\\\": \\\"N\\\"}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK - API v2.0\"\n    },\n    {\n      \"code\": \"HTTP/ 1.1 204 No Content\",\n      \"language\": \"json\",\n      \"name\": \"204 No Content - API v1.0\"\n    }\n  ]\n}\n[/block]\n##Example Descriptions\n###Add Credit Card\nThis example request shows how to add another credit card to an existing vaulted shopper.\n\n###Add Wallet Details using Wallet ID\nThis example request adds details from a wallet (e.g. Masterpass). This will add the credit card info from the wallet to the vaulted shopper.\n\n###Add Payment Details using Hosted Payment Fields token\nThis example request adds payment details collected by Hosted Payment Fields to the vaulted shopper.\n\n###Add bank account details for SEPA Direct Debit payment method \nThis example request adds bank account details for the [SEPA Direct Debit](/docs/sepa-direct-debit) payment method.\n\n###Delete**&ast;** credit card\nThis example request shows how to delete a credit card from a vaulted shopper. Include the `status` property in the request and set its value to **D**. Specify the card to be deleted by including `cardType` and `cardLastFourDigits`.\n\n###Delete**&ast;** ACH/ECP\nThis example request shows how to delete an ACH/ECP payment method from a vaulted shopper. Include the `status` property in the request and set its value to **D**. Specify the `ecpDetails` to be deleted by including `accountType`, `publicAccountNumber`, and `publicRoutingNumber`. \n\n###Delete**&ast;** SEPA\nThis example request shows how to delete a SEPA payment method from a vaulted shopper. Include the `status` property in the request and set its value to **D**. Specify the `sepaDirectDebit` to be deleted by including `ibanFirstFour` and `ibanLastFour`. \n\n#####**&ast;** Notes on deleting a payment method\n\n* If you attempt to delete a payment method that is linked to a subscription, an error occurs. Send an Update Subscription request to either switch the shopper's payment source or to cancel the subscription, and then retry the Update Vaulted Shopper request to delete the payment method.\n\n* You cannot delete a payment method if there is a payment pending approval for the payment method.\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, in the `vaultedShopperId` field, enter the ID of an existing vaulted shopper. In the Body Content field, paste in the JSON portion of the request 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]","excerpt":"","slug":"update-vaulted-shopper","type":"endpoint","title":"Update Vaulted Shopper"}

putUpdate Vaulted Shopper


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

vaultedShopperId:
string
vaultedShopperId received from BlueSnap

Documentation

The Update Vaulted Shopper request enables you to update an existing vaulted shopper by changing their contact info, adding and deleting payment methods, or adding wallet details.

Note: We recommend that you first retrieve the vaulted shopper and then modify the desired property.

  • Each vaulted shopper can have multiple credit cards.

  • If you send a credit card number that does not yet exist in that vaulted shopper, BlueSnap validates the card as part of adding it to the shopper.

  • If you send a credit card number that does exist in that vaulted shopper, BlueSnap validates the card and updates the shopper with any changes to that card's expiration date.

  • You will obtain the walletId when the shopper successfully completes the Masterpass payment step. For a complete walkthrough of the flow for Masterpass, see Implementing Masterpass via the API.

Try it in the API Explorer

Request Content

Send a vaultedShopper object, with the following:

      paymentSources     object    optional, can contain creditCardInfo (see paymentSources)
      firstName     string    required if walletId is not sent
      lastName     string    required if walletId is not sent
      merchantShopperId     string    optional
      softDescriptor     string    optional
      descriptorPhoneNumber string    optional
      country     string    optional
      state     string    optional
      address     string    optional
      address2     string    optional
      email     string    optional
      zip     string    optional
      phone     string    optional
      companyName     string     optional   Include if adding Corporate ECP account details
      shopperCurrency     string    optional
      shippingContactInfo     object    optional (see shippingContactInfo)
      walletId     long    optional   Include if adding wallet details for Masterpass or Visa Checkout
      transactionFraudInfo     object    optional (see transactionFraudInfo)

Response Details

The response content depends on which version of the API you are using (see Authentication & headers), as follows:

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.

API version 1.0
If successful, the response HTTP status code is 204 No Content.


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-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 PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"walletId": 21}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "paymentSources": {"creditCardInfo": [{
         "pfToken": "9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_"
    }]},
    "firstName": "FirstName",
    "lastName": "LastName"
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \
-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 PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "zip":"12345",
   "country":"us",
   "paymentSources":{  
      "ecpDetails":[  
         {  
            "billingContactInfo":{  
               "firstName":"FirstName 2",
               "lastName":"LastName 2"
            },
            "ecp":{  
               "routingNumber":"011075150",
               "accountType":"CONSUMER_SAVINGS",
               "accountNumber":"4099999992"
            }
         }
      ]
   },
   "firstName":"FirstName",
   "lastName":"LastName",
   "phone":"1234567890"
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "firstName": "FirstName",
  "lastName": "LastName",
  "paymentSources": {"creditCardInfo": [{"creditCard": {
    "cardType": "VISA",
    "cardLastFourDigits": "9299"
    },
    "status": "D"}]}
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "vaultedShopperId": 19570266,
    "firstName": "John",
    "lastName": "Doe",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "ecpDetails": [
            {
                "billingContactInfo": {
                    "firstName": "John",
                    "lastName": "Doe",
                    "zip": "12345"
                },
                "ecp": {
                    "accountType": "CONSUMER_CHECKING",
                    "publicAccountNumber": "99992",
                    "publicRoutingNumber": "75150"
                },
                "status":"D"
            }
        ]
    }
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "vaultedShopperId": 19570278,
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "fr",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "sepaDirectDebitInfo": [
            {
                "billingContactInfo": {
                    "firstName": "FirstName",
                    "lastName": "LastName"
                },
                "sepaDirectDebit": {
                    "ibanFirstFour": "DE09",
                    "ibanLastFour": "7893"
                },
                "status":"D"
            }
        ]
    }
}

Response Examples

{  
   "vaultedShopperId":19570126,
   "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"
            }
         },
         {  
            "billingContactInfo":{  
               "firstName":"FirstName 2",
               "lastName":"LastName 2"
            },
            "ecp":{  
               "accountType":"CONSUMER_SAVINGS",
               "publicAccountNumber":"99992",
               "publicRoutingNumber":"75150"
            }
         }
      ]
   },
    "fraudResultInfo": {"deviceDataCollector": "Y"}
}
{
    "paymentSources": {"creditCardInfo": [{
        "billingContactInfo": {
            "firstName": "FirstName",
            "lastName": "LastName",
            "city": ""
        },
        "processingInfo": {
            "avsResponseCodeAddress": "U",
            "cvvResponseCode": "MA",
            "avsResponseCodeName": "U",
            "avsResponseCodeZip": "U"
        },
        "creditCard": {
            "expirationYear": 2023,
            "cardLastFourDigits": 9299,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "expirationMonth": "02"
        }
    }]},
    "firstName": "FirstName",
    "lastName": "LastName",
    "vaultedShopperId": 19549048,
    "shopperCurrency": "USD",
    "lastPaymentInfo": {
        "paymentMethod": "CC",
        "creditCard": {
            "cardLastFourDigits": "0026",
            "cardType": "VISA",
            "cardCategory": "CLASSIC"
        }
    },
    "fraudResultInfo": {"deviceDataCollector": "N"}
}
HTTP/ 1.1 204 No Content

Example Descriptions

Add Credit Card

This example request shows how to add another credit card to an existing vaulted shopper.

Add Wallet Details using Wallet ID

This example request adds details from a wallet (e.g. Masterpass). This will add the credit card info from the wallet to the vaulted shopper.

Add Payment Details using Hosted Payment Fields token

This example request adds payment details collected by Hosted Payment Fields to the vaulted shopper.

Add bank account details for SEPA Direct Debit payment method

This example request adds bank account details for the SEPA Direct Debit payment method.

Delete* credit card

This example request shows how to delete a credit card from a vaulted shopper. Include the status property in the request and set its value to D. Specify the card to be deleted by including cardType and cardLastFourDigits.

Delete* ACH/ECP

This example request shows how to delete an ACH/ECP payment method from a vaulted shopper. Include the status property in the request and set its value to D. Specify the ecpDetails to be deleted by including accountType, publicAccountNumber, and publicRoutingNumber.

Delete* SEPA

This example request shows how to delete a SEPA payment method from a vaulted shopper. Include the status property in the request and set its value to D. Specify the sepaDirectDebit to be deleted by including ibanFirstFour and ibanLastFour.

* Notes on deleting a payment method
  • If you attempt to delete a payment method that is linked to a subscription, an error occurs. Send an Update Subscription request to either switch the shopper's payment source or to cancel the subscription, and then retry the Update Vaulted Shopper request to delete the payment method.

  • You cannot delete a payment method if there is a payment pending approval for the payment method.



Back to Top


API Explorer

To test out a call, in the vaultedShopperId field, enter the ID of an existing vaulted shopper. In the Body Content field, paste in the JSON portion of the request 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"
}

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}