skip to Main Content

How to Save Your Card Details

developer laptop save card details using API
  • Blog
  • How to Save Your Card Details

Save your customer card details for future use. 

Credit cards account for 41% of online transactions and are prevalent in ecommerce markets in Europe and the Americas. For instance in Mexico, card payments account for 45% of all transactions, totaling $10.2 billion in sales. Accepting credit cards will continue to be a widely used payment method even with digital wallets and bank transfers on the rise. Card payment methods have required fields for the customer to fill out. Streamlining your card acceptance methods with Rapyd’s Save Card Details API will help improve your success rates for card transactions and decrease cart abandonment. The steps below will use a local Visa debit card as an example (e.g mx_visa_card) and include some of the required fields for the payment method.

Step 1: Sign up in Client Portal  

Go to your Client Portal account and grab your rapyd_access_key and rapyd_secret_key within the Developers tab

Step 2: Setup Your Postman Environment

Download our Postman Collection and input your rapyd_access_key and rapyd_secret_key in the Postman environment titles Rapyd Sandbox Environment as shown below. 

Step 3: List Payment Method

Find the payment method you will accept in your desired country with List Payment Methods By Country API. Choose a payment method option for the customer to add on the hosted page. For example, using mx_visa_card will create the card fields as shown in the visual following these steps.  

Step 4: Create a Wallet 

Use the Create Wallet API to step up a wallet contact to create a customer for your profile to save the card details. Your wallet ID given in the API response will begin with ewallet_.

Step 5: Create Customer without Payment Method 

Use the Create Customer API and the Rapyd wallet ID starting with ewallet_  from step 4 in the request body. Your customer ID in the response body will begin with cus_. This will be for creating a Save Card details page, however, you can create a request page without payment method type. If you add a payment method at customer creation, then the payment method will show up on the page with an option to add additional methods. 

Step 6: Create Save Card Details Page

Use the Save Card Details page API call to create your hosted page to save your customer’s card details. The following example request body uses country, currency, and customer ID. The payment method type is an optional parameter.  

Congrats, you did it! Your customers will be thankful for storing their card details with you to have faster checkouts without having to enter in their details for each purchase. 

You can check out the following examples or learn more on our documentation – Save Card Details with Rapyd Checkout. 

 

Example Request Body

Example Response Body

Example Response Body for Saving Card Details in Sandbox - JPEG

 

Screen showing card information entry details

Sources Cited:

Rapyd. “Accept International Credit Card Payments”. https://www.rapyd.net/blog/accept-international-credit-card-payments/ 

Rapyd. “Top Four Local Payment Methods in Mexico”.https://www.rapyd.net/blog/the-top-four-local-payment-methods-in-mexico/ 

Photo from Unsplash

Back To Top xandr