Skip to main content

Documentation

Hosted Save Card Details Page

A secured page to save your card details.

The Hosted Save Card Details page allows you to securely store your customer’s card information. The Save Card Details page tokenizes the card details so that sensitive payment information is handled according to PCI-DSS standards. Rapyd conducts a $0 auth to verify the card.

Saving card details can enable a more streamlined payment experience. Your customer can add, save or delete multiple cards on file. You can use the saved payment information for future customer payments.

  1. Enter your card information.

    hosted-save-card-details-flow-1.png
  2. Click Save Card.

    hosted-save-card-details-flow-2.png
  3. Complete 3DS Verification if required.

  4. Redirect to the card management page.

    hosted-save-card-details-flow-3.png
  5. Click + Add New Card to save the details of additional cards.

  6. (Optional) Click the Delete icon next to the card number to delete a saved card.

    hosted-save-card-details-flow-4.png
  7. Click Close to exit the hosted page.

hosted-save-card-details-flow-5.png
  1. You request Rapyd to generate a Hosted Save Card Details Page.

  2. Rapyd processes your request and sends the response with the redirect URL.

  3. You display the redirect URL to the customer.

  4. The customer saves their card details on the hosted page.

You need to complete the following steps in order to generate a Hosted Save Card Details Page:

  1. Create a Customer (API Integration or via the Client Portal)

  2. Generate a Hosted Save Card Details Page (API Integration or via the Client Portal)

Description of Body Parameters

See Create Card Token for additional details about the parameters.

Body Parameter

Required

Description

country

yes

The two-letter ISO 3166-1 ALPHA-2 code for the country.

currency

no

When specified in the request, defines a currency that is not the country's default currency. When not specified in the request, the country's default currency. Three-letter ISO 4217 code.

customer

yes

ID of the customer, a string starting with cus_.

Generate Hosted Save Card Details Page Request
    • Request

      • // Request URL: POST https://sandboxapi.rapyd.net/v1/hosted/collect/card                                        
        // Message body: 
                                                    
        {
            "country": "US",
            "currency": "USD",
            "customer": "cus_ecfab8b87e2fa11d66b95cc1f2c94037"
        }
Generate Hosted Save Card Details Page Response

Create Card Token describes the fields in the response.

    • Response

      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "e303abfa-f6c5-4906-b002-a1afdd4b1ee1"
            },
            "data": {
                "id": "hp_card_915d39ecc38cd02cd0c29d13ea8dc94e",
                "status": "NEW",
                "cancel_url": "https://www.rapyd.net",
                "complete_url": "https://www.rapyd.net",
                "language": null,
                "merchant_color": null,
                "merchant_logo": null,
                "merchant_website": "https://www.rapyd.net",
                "merchant_customer_support": {},
                "merchant_alias": "N/A",
                "page_expiration": 1708557501,
                "redirect_url": "https://sandboxhosted.rapyd.net/collect/card?token=hp_card_915d39ecc38cd02cd0c29d13ea8dc94e",
                "category": "card",
                "country": "US",
                "currency": "USD",
                "customer": "cus_ecfab8b87e2fa11d66b95cc1f2c94037",
                "payment_method_type": null,
                "payment_params": {
                    "complete_payment_url": null,
                    "error_payment_url": null
                },
                "billing_address_collect": false,
                "customer_card_payment_methods": null
            }
        }