Generate Invoice Link
RKFL create an invoice in their system before processing the payment. Once the payment is processed, the invoice turns into an order.
The merchant website must send the cart info to RKFL for creating an invoice. The API returns a redirect URL with a UUID. The merchant website can save this redirect URL for future purposes.
There are two ways of integration
Redirect: If merchant wants to use redirect approach, they can redirect shopper to the redirect link
Widget (Popup): In case merchant wants to use inline experience(without redirection), they can use UUID with JavaScript SDK. See here for the Javascript SDK Documentation
The RKFL also supports recurring payments on subscribed products. If the shopper subscribed to a product and paid from the connected exchange, the RKFL can manage the recurring payment on the defined frequency and update the merchant server through a registered webhook. The subscription facility is only available on exchange payment.
The request payload also supports receiving some custom parameters from the merchant website. These custom parameters will return in the transaction status update webhook. The merchant can also define the HTTP method (GET/POST) to receive the webhook.
The merchants who want to integrate the RKFL-hosted checkout experience redirect the shopper to this URL.
The RKFL-hosted checkout page is the simplest way to use the RKFL services
Subscription
To add a subscription product to the invoice, you must pass additional details with the product object in the cart.
These details include
"isSubscription" - This should be set to true if the product is a subscription product
"frequency" - This describes how frequently the subscription will be charged
"subscriptionPeriod" - The duration for which the subscription will be active
"merchantSubscriptionId" - The unique subscription Id generated by the merchant
POST /hosted-page
Headers
"authorization"*
String
"Bearer" + merchant access token
"Content-Type"
String
"application/json"
Request Body
amount*
String
cart*
Object
id, price, name, quantity, key, totalPrice, isSubscription, frequency, merchantSubscriptionId
currency*
String
USD/EUR
order
String
Unique order id from the merchant's system
redirectUrl
String
Return URL of merchant's website, in case of RKFL hosted checkout integrated
customerInfo
Object
name, email, phone, address
shippingAddress
Object
firstname, lastname, phoneNoaddress1, address2, state, city, zipcode, country, landmark, email
customParameter
Object
returnMethod could be GET or POST only. The supplied custom parameters will return in the webhook.
merchant_id
String
Unique merchant ID which each merchant has
siteInfo
Object
siteUrl, siteName, siteLogo
RocketFuel JS SDK
Follow the guide to embed RocketFuel Hosted Page on the Merchant's website.
Prerequisites:-
Merchant should send below JSON input details to display the same on RocketFuel hosted page
where
Amount - total price of whole order for payment, in USD only
Cart - a. ID - Article unique Id b. Name - Article Name c. Price - Article price d. Quantity - Article Quantity
Currency - Currency in which Merchant recieved the payment, in USD only
Order - Unique Order Id
RedirectUrl - URL of the Merchant site where the Merchant wants to redirect from the Hosted page to their site after payment.
Follow the steps below :-
Merchant need to be authenticated on RocketFuel by passing the input parameters - MERCHANT_EMAIL and MERCHANT_PASSWORD.
Request
Response
2. Once Merchant is verified, details of the items purchased with the access token will be sent in a different request.
Note - Token needs to send in the Header and details of the items purchased in the Body.
Request
Response -
3. Once Merchant received the response as a True, then send the UUID as the response to the Merchant site.
On click of [Pay for your order with RocketFuel] paste below Code Snippet.
Code Snippet--
Javascript Library
4.3. After initialising the object start the payment by calling the initPayment method of the above script.
4.4. Callback payload
You can refer to the REFERENCE_LINK for demonstration.
Last updated
Was this helpful?