Skip to main content

Documentation

Creating a Hosted Page With 3DS Authentication

This procedure describes how to create a hosted page for a card payment that uses Rapyd's 3DS authentication. This procedure is relevant to the production environment.

Note

  • The card issuer might require 3DS even when it is not specified in the payment request.

  • Transactions with 3DS authentication must be authenticated within 15 minutes.

Related Information

Prerequisites

  • A payment method that supports 3DS authentication. If the response to Get Payment Method Required Fields includes payment_method_options.3d_required, 3DS is supported.

  • Keys to the production environment for your user.

How
  1. Create a hosted page for a card payment as described in Create Checkout Page, with the following settings:

    • amount - Specify the amount of the transaction.

    • country - Specify the country for the payment method type.

    • currency - Specify a currency that the payment method type supports.

    • payment_method_type - Specify the code for the payment method type.

      • Request

        • curl -X post
          https://sandboxapi.rapyd.net/v1/checkout/
          -H 'access_key: your-access-key-here'
          -H 'Content-Type: application/json'
          -H 'idempotency: your-idempotency-parameter-here'
          -H 'salt: your-random-string-here'
          -H 'signature: your-calculated-signature-here'
          -H 'timestamp: your-unix-timestamp-here'
          -d '{
              "amount": 450,
              "country": "IS",
              "currency": "ISK",
              "payment_method_type": "is_visa_card"
          }'
      • Response

        • {
              "status": {
                  "error_code": "",
                  "status": "SUCCESS",
                  "message": "",
                  "response_code": "",
                  "operation_id": "03c67c12-b0db-4c1f-be51-52dba46806fa"
              },
              "data": {
                  "id": "checkout_622156b26292ed4b3c146c99a7560918",
                  "status": "NEW",
                  "language": null,
                  "merchant_color": "323fff",
                  "merchant_logo": null,
                  "merchant_website": "https://example1234.net",
                  "merchant_customer_support": {
                      "url": "https://example1234.net",
                      "email": "support@example1234.net",
                      "phone_number": "121255551213"
                  },
                  "merchant_alias": "Doc Team",
                  "merchant_terms": "https://example1234.net/terms_and_conditions",
                  "merchant_privacy_policy": "https://example1234.net/privacy_policy",
                  "page_expiration": 1752146713,
                  "redirect_url": "https://sandboxcheckout.rapyd.net/?token=checkout_622156b26292ed4b3c146c99a7560918",
                  "merchant_main_button": "place_your_order",
                  "recurrence_type": null,
                  "cancel_checkout_url": "https://example1234.net",
                  "complete_checkout_url": "https://example1234.net",
                  "country": "IS",
                  "currency": "ISK",
                  "amount": 450,
                  "payment": {
                      "id": null,
                      "amount": 450,
                      "original_amount": 0,
                      "is_partial": false,
                      "currency_code": "ISK",
                      "country_code": "IS",
                      "status": null,
                      "description": "Payment via Checkout",
                      "merchant_reference_id": null,
                      "customer_token": null,
                      "payment_method": null,
                      "payment_method_data": {},
                      "expiration": 0,
                      "captured": false,
                      "refunded": false,
                      "refunded_amount": 0,
                      "receipt_email": null,
                      "redirect_url": null,
                      "complete_payment_url": null,
                      "error_payment_url": null,
                      "receipt_number": null,
                      "flow_type": null,
                      "address": null,
                      "statement_descriptor": null,
                      "transaction_id": null,
                      "created_at": 0,
                      "updated_at": 0,
                      "metadata": null,
                      "failure_code": null,
                      "failure_message": null,
                      "paid": false,
                      "paid_at": 0,
                      "dispute": null,
                      "refunds": null,
                      "order": null,
                      "outcome": null,
                      "visual_codes": {},
                      "textual_codes": {},
                      "instructions": {},
                      "ewallet_id": null,
                      "ewallets": [],
                      "payment_method_options": {},
                      "payment_method_type": null,
                      "payment_method_type_category": null,
                      "fx_rate": null,
                      "merchant_requested_currency": null,
                      "merchant_requested_amount": null,
                      "fixed_side": null,
                      "payment_fees": null,
                      "invoice": null,
                      "escrow": null,
                      "group_payment": null,
                      "cancel_reason": null,
                      "initiation_type": null,
                      "mid": null,
                      "next_action": "not_applicable"
                  },
                  "payment_method_type": "is_visa_card",
                  "payment_method_type_categories": null,
                  "payment_method_types_include": null,
                  "payment_method_types_exclude": null,
                  "account_funding_transaction": null,
                  "customer": null,
                  "custom_elements": {
                      "hide_save_card": false,
                      "save_card_default": false,
                      "display_description": false,
                      "payment_fees_display": true,
                      "merchant_currency_only": false,
                      "billing_address_collect": false,
                      "dynamic_currency_conversion": false
                  },
                  "timestamp": 1750937113,
                  "payment_expiration": null,
                  "cart_items": [],
                  "escrow": null,
                  "escrow_release_days": null,
                  "require_card_cvv": false
              }
          }
  2. Send the redirect URL to the customer.

  3. The customer opens the URL. An authentication page opens and the buyer receives an authentication code.

  4. The buyer enters the code on the authentication page. Rapyd completes the payment and sends the PAYMENT_COMPLETED webhook.