# Redirect Integration

Rocketfuel-hosted checkout web UI is the simplest and quickest way of using the Rocketfuel services. The merchant interested in obtaining this solution must submit their cart data to generate an invoice.&#x20;

The API response returns a URL where the shopper will redirect to the payment options. After the successful payment, the shopper will return to the merchant's website.

<mark style="color:green;">`POST`</mark>` ``/hosted-page`

Here is the sample of request payload.&#x20;

{ amount, cart{ id, price, name, quantity, key, totalPrice, isSubscription, frequency, merchantSubscriptionId }, currency, order, redirectUrl, customerInfo{ name, email, phone, address }, shippingAddress{ firstname, lastname, phoneNo, address1, address2, state, city, zipcode, country, landmark, email } }

isSubscription: true/false&#x20;

frequency: weekly/monthly/quarterly/half-yearly/yearly&#x20;

merchantSubscriptionId: Subscription id for merchant system. This key will use to communicate the recurring payment status.

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | "Bearer" + merchant access token |
| Content-Type                                    | String | application/json                 |

#### Request Body

| Name            | Type   | Description                                                                                      |
| --------------- | ------ | ------------------------------------------------------------------------------------------------ |
| amount          | String |                                                                                                  |
| cart            | Array  | id, price, name, quantity, key, totalPrice, isSubscription, frequency, merchantSubscriptionId    |
| currency        | String | USD/EUR                                                                                          |
| order           | String | Order id from the merchant's system                                                              |
| redirectUrl     | String | Return URL of merchant's website, in case of RKFL-hosted checkout integrated                     |
| customerInfo    | Array  | name, email, phone, address                                                                      |
| shippingAddress | Array  | firstname, lastname, phoneNo, address1, address2, state, city, zipcode, country, landmark, email |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "ok":true,
    "result":{
        "url":"https://payments-sandbox.rocketfuelblockchain.com/hostedPage/f7cb4141-3030-4245-8aa1-f5cf95b5d504",
        "uuid": "f7cb4141-3030-4245-8aa1-f5cf95b5d504"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rocketfuel.inc/web-ui/redirect-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
