Webtect
Webtect

Reputation: 839

Using Braintree with Laravel to create customer id to use for future purchases

Not too long ago Payment gateways allowed you to create customer profile accounts and store their credit card info with the gateway and use the returned customer id to make future purchases with ease.

I am trying to do this with Laravel cashier and Braintree. I followed the docs here https://laravel.com/docs/5.5/billing#braintree-configuration and it set up fine. I am able to do one time charges and subscriptions.

Is there a way to store the customers credit card info on Braintree ( Vault? ) and retrieve it using their customer id everytime they want to buy something?

I can retrieve the Payment Nonce but that seems to be for a one time use.

Upvotes: 1

Views: 943

Answers (1)

Lairen
Lairen

Reputation: 551

Since the Laravel Cashier API wrapper provides the ability to create subscriptions within Braintree, it is certainly creating customers with saved payment methods prior to creating the subscriptions, since that is a Braintree requirement.

The Laravel Cashier docs don't show a standalone customer create call, so you may need to use the Braintree Customer Create API Call.

Upvotes: 2

Related Questions