Search code examples
bluesnap

How can I save my shoppers' credit cards in Bluesnap?


I'm integrating bluesnap's payment API with my website. How do I store the card information in bluesnap so that I don't have to do it in my own database?


Solution

  • If you are using the Payment API, you can save credit card data at the shopper level. To do this, you create a saved shopper in BlueSnap and include the card data for that shopper. You can also include information like the shopper's name and address.

    For example:

    <vaulted-shopper xmlns="http://ws.plimus.com">
       <first-name>FirstName</first-name>
       <last-name>LastName</last-name>
       <payment-sources>
          <credit-card-info>
             <credit-card>
                <card-number>4263982640269299</card-number>
                <security-code>837</security-code>
                <expiration-month>02</expiration-month>
                <expiration-year>2018</expiration-year>
             </credit-card>
             <billing-contact-info>
                <first-name>billingFirstName</first-name>
                <last-name>billingLastName</last-name>
                <country>US</country>
                <state>MA</state>
                <address1>10 Main St</address1>
                <address2>Apt 1</address2>
                <email>email@example.com</email>
                <zip>01752</zip>
             </billing-contact-info>
          </credit-card-info>
       </payment-sources>
    </vaulted-shopper>
    

    More information and examples are here: http://developers.bluesnap.com/v2.0/docs/create-vaulted-shopper