> For the complete documentation index, see [llms.txt](https://docs.rocketfuel.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rocketfuel.inc/integrations/rocketfuel-integration/how-to-guide/using-the-rocketfuel-api-for-custom-integration.md).

# Using the RocketFuel API for Custom Integration

RocketFuel has three phases of API integration:

1. Pre-Payment Activity
2. Payment Activity (Shopper ↔︎ RKFL)
3. Post-Payment Activity

Before the start of the three phases, some prerequisites are required to be completed. The below Quick Start page describes on the same.

{% embed url="<https://docs.rocketfuelblockchain.com/developer-guides/quick-start>" %}

Once the `public key` and `integration keys` have been set up, the first phase can be started.

1. **Pre-payment Activity**
   1. To start with the prepayment activity, there is one more prerequisite that needs to be understood - [Encryption Algorithm](https://docs.rocketfuelblockchain.com/developer-guides/api-reference/encryption-algorithm)
   2. After the above things are completed and understood, the first phase starts with [generating the invoice](https://docs.rocketfuel.inc/developer-guides/api-reference/generate-invoice-link).&#x20;

      i. The [inline method](https://bitbucket.org/rocketfuelblockchain/rocketfuel-readme/src/master/javascript-sdk.md) can be used as well for generating invoice
2. **Payment Activity (Shopper ↔︎ RKFL)**

   The second phase, payment activity involves the exchange of data between shoppers and RocketFuel, nothing is expected from the merchants.
3. &#x20;**Post Payment Activity**\
   The post payment activity involves knowing the transaction status which can be done with the help of webhooks and Lookup API.
   1. [Webhook](https://docs.rocketfuel.inc/webhooks)
   2. [Lookup API](https://docs.rocketfuel.inc/developer-guides/api-reference/transaction-lookup)

**Languages Supported**

1. Any coding language to call APIs (server ↔︎ server)
2. Little knowledge of JS in case of Inline /popup Integration


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/integrations/rocketfuel-integration/how-to-guide/using-the-rocketfuel-api-for-custom-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.
