Skip to main content


Hosted Checkout Page Integration

Follow these steps and quickly add Rapyd Hosted Checkout to your website.

Log into the Rapyd Client Portal and start building your own checkout experience. Add your own colors, logo, and select all the payment methods that you would like to accept.

Customize Your Checkout Page

Checkout enables you to customize the look and feel to match your brand and website experience.

  1. Once you create a Rapyd account, sign in to the Client Portal as described in Accessing the Client Portal and navigate to Settings > Branding.


    Select Your Hosted Page to View

    The Preview bar, located above the preview window, will display a preview of your Hosted Checkout page branding. You can toggle between the Hosted Checkout, Save Card Details Page, and Beneficiary Account Details page. Branding settings affect all Hosted pages including Rapyd Collect, Disburse, and Issuing.

  2. On the Brand elements pane on the left side of the page, tap the Upload logo icon and upload an image file (png, jpg, jpeg, gif) containing your company logo.

  3. Tap the Brand color field to select the color of the buttons on the display.

  4. In the Fallback URL field, enter the URL of the page that appears when the process is completed or canceled when complete_checkout_url or cancel_checkout_url is not specified.


    Complete and Cancel URLs

    Other Hosted pages may have different fields such as complete_url and cancel_url

    • Beneficiary Tokenization Page

    • Rapyd Verify Hosted Page

    • Hosted IDV Page

    • Hosted Page Card Token Object

  5. Remove any Payment Methods you will not accept (Hosted Checkout only).

    • Bank - Includes Bank Redirect and Bank Transfer

    • Card

    • Cash

    • eWallet

  6. Choose your button text from the drop down (Hosted Checkout only).

  7. Customer Support Details - You can add your customer support contact information (optional) to be displayed on your hosted pages.

  8. Tap the Save changes button at the bottom right corner of the screen.

Preview Your Hosted Page

On the Branding page, switch between the mobile icon or desktop icon to view the preview of your hosted page.


To generate your Rapyd Checkout page, use the Create Checkout Page method.

  1. Before you send your first API request to the Rapyd platform, you need to set up your Authentication Headers including your Request Signatures, and then send a HTTPS POST Request to Rapyd, which will generate the Rapyd Checkout page.

    Note: See Make Your First API Call to set this up if you haven’t yet done so.

  2. Once your Headers and Signature setup is complete, request the Checkout Body. The following three required parameters are required for creating a checkout page:

    • Amount

    • Country

    • Currency

The example below shows a list of required and optional parameters used in the body of a Create Checkout Page request. The request should contain at least the three required parameters mentioned above:

Description of Parameters



amount (required)

The amount of the payment, in units of the currency defined in currency. Decimal.

country (required)

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

currency (required)

Three-letter ISO 4217 code for the currency used in the amount field. Uppercase.


URL where the customer is redirected when checkout is successful. This page can be set dynamically for each generated checkout page as it overrides the fallback URL that was set in the Client Portal.


URL where the customer is redirected after pressing Back to Website to exit the hosted page. This URL overrides the merchant_website URL.

Does not support localhost URLs.


List of payment methods that are displayed on the checkout page.


Identifier for the transaction. Defined by the merchant. Can be used for reconciliation.


Determines the currency that the customer will use to pay, when it is different from the currency that the merchant wants to receive. Three-letter ISO 4217 code. When this field is set, the checkout page displays the following information:

  • Original amount and currency.

  • The converted amount in the requested currency.

  • The exchange rate.


The amount of currency to subtract from the payment. Decimal. A parameter in the cart_items object. This parameter cannot be passed with the percent_off parameter.


A discount measured in percent. A parameter in the cart_items object. This parameter cannot be passed with the amount_off parameter.

Third Party Payment Flow

When the payment_flow_type of the payment method/s that you provide to your customers is a third party redirect, make sure to provide URLs in the complete_payment_url and error_payment_url parameters.

The customer will be redirected to these URLs after completing a payment.

To determine the payment_flow_type, see List Payment Methods by Country.

Example of a Request Body
    • JSON

      • // Request URL: POST
        // Message body:
            "amount": 100,
            "country": "SG",
            "currency": "SGD",
            "requested_currency": "USD",
            "complete_checkout_url": "",
            "merchant_reference_id": "950ae8c6-76",
            "payment_method_types_include": [
    • .Net

      • using System;
         using System.Text.Json;
         namespace RapydApiRequestSample
            class Program
                static void Main(string[] args)
                        string[] payment_method_types_include = new string[] { "sg_credit_mastercard_card", "sg_credit_visa_card" };
                        var requestObj = new
                            amount = 100,
                            complete_checkout_url = "",
                            country = "SG",
                            currency = "SGD",
                         requested_currency = “USD”,
                            merchant_reference_id = "950ae8c6-76",
                        string request = JsonSerializer.Serialize(requestObj);
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/checkout", request);
                    catch (Exception e)
                        Console.WriteLine("Error completing request: " + e.Message);
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        async function main() {
          try {
            const body = {
              amount: 100,
              complete_checkout_url: '',
              country: ‘SG’,
              currency: 'SGD',
              requested_currency: ‘USD’,
              merchant_reference_id: '950ae8c6-76',
              payment_method_types_include: [‘sg_credit_mastercard_card’, ‘sg_credit_visa_card’]
            const result = await makeRequest('POST', '/v1/checkout', body);
          } catch (error) {
            console.error('Error completing request', error);
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        $body = [
            "amount" => 100,
            "complete_checkout_url" => "",
            "country" => "SG",
            "currency" => "SGD",
            “requested_currency” => “USD”,
            "merchant_reference_id" => "950ae8c6-76",
            "payment_method_types_include" => [
        try {
            $object = make_request('post', '/v1/checkout', $body);
        } catch (Exception $e) {
            echo "Error: $e";
    • Python

      • from pprint import pprint
        from utilities import make_request
        checkout_page = {
            "amount": 100,
            "complete_checkout_url": "",
            "country": "SG",
            "currency": "SGD",
            "merchant_reference_id": "950ae8c6-76",
            "payment_method_types_include": [
        results = make_request(method="post",

You can include the customer ID starting with cus_ and save_card_default to include a filled "save card" checkbox as described in Create Checkout Page.

Pre-Fill Checkout Fields

You can pre-fill, or exempt select checkout fields by including them in the merchant_fields object in your API request. The fields will not appear on the hosted page.

The sample list below shows the body of the response which contains the following fields as described in Create Checkout Page:

Description of Fields




ID of the Rapyd Checkout page.


The amount of the payment, in units of the currency defined in currency.


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


Three-letter ISO 4217 code for the currency used in the amount field.


ID of the 'customer' object. String starting with cus_. Relevant when the customer is already signed up and stored on the Rapyd platform.


URL of the merchant’s website, provided by the merchant. Relevant when cancel_checkout_url or complete_checkout_url are unset. Configured in the Client Portal when setting the Fallback URL field as described in Customizing Your Hosted Page.


URL of the merchant’s logo, provided by the merchant.


URL of the redirect for the Rapyd Checkout page, provided by Rapyd.

The response also shows the entire payment object, which has been edited out, except for the complete_payment_url and the error_payment_url.

Example of a Response Body
    • JSON

      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "c343cac1-d682-4983-a386-345aa75d9aaf"
            "data": {
                "id": "checkout_e6a30340c23be7201346eade2bfe3417",
                "country": "SG",
                "currency": "SGD",
                "amount": 100,
                "status": "NEW",
                "payment": {
                    "id": "",
                    "amount": 100,
                    "original_amount": 0,
                    "is_partial": false,
                    "currency_code": "SGD",
                    "country_code": "SG",
        //          ...
                    "merchant_reference_id": "950ae8c6-76",
        //          ...
                     "merchant_requested_currency": "USD",
        //          ...
               "payment_method_type": "",
               "payment_method_type_categories": null,
               "payment_method_types_include": [
        //          ...
               "payment_method_types_exclude": null,
                "customer": "",
                "customer_default_payment_method": {},
                "country_name": "Singapore",
                "merchant_color": "5387e6",
                "merchant_website": "",
                "merchant_logo": "",
                "merchant_customer_support": {},
               //          ...
                "language": "en",
                "complete_checkout_url": "",
                "cancel_checkout_url": "",
                "redirect_url": "",
                "timestamp": 1592143929,
                "expiration": 1593353529

Redirect your customer to the URL you received in the response to Create Checkout Page. The redirect URL appears in the redirect_url field and includes all the parameters for the Checkout session.

Note: The checkout page expires 14 days after creation by default.

Alternatively, you may specify a page_expiration parameter in the Create Checkout Page request and choose a different value for the expiration of the Checkout page, in Unix time.