Foloosi
  • INTRODUCTION
  • FEATURES
  • Get Started
    • Create Api Credentials
    • Checkout Page Customization
  • Payment Methods
    • Popup Payment Method
    • Hosting Payment Method
    • Saved Card Payment Method
  • CLIENT SIDE INTEGRATIONS
    • Javascript Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample Integrations
    • PHP Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample integrations
    • React JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
    • Angular JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
  • ECOMMERCE INTEGRATIONS
    • WooCommerce
    • CS Cart
    • Ecwid
    • Opencart
    • Magento
    • Prestashop
  • MOBILE SDK INTEGRATIONS
    • Android SDK
      • Initiate Payment
      • Payment Response Handling
    • iOS SDK
      • Initiate Payment
      • Payment Response Handling
    • React Native SDK
      • Make Payment
    • Flutter SDK
      • Installation
      • Make Payment
      • Sample Dart Program
  • SUBSCRIPTIONS
    • Foloosi Subscription for WooCommerce
    • Api Subscription
      • Sample Integration
    • Subscription
  • WEBHOOKS
  • PARTNER PAYOUT
  • CARD DETAILS
    • Test Cards
Powered by GitBook
On this page
  • Initialize Api
  • Get Reference Token
  • Api Specification
  • Support
  • Developed by
  • License

Was this helpful?

  1. CLIENT SIDE INTEGRATIONS
  2. PHP Integration

Create Payment Token

Let's see how to create a payment reference token

Initialize Api

Get Reference Token

POST https://api.foloosi.com/aggregatorapi/web/initialize-setup

Headers

Name
Type
Description

secret_key*

String

Your Merchant Key get from Foloosi Panel

Request Body

Name
Type
Description

currency*

String

transaction_amount*

Double

customer_name

String

site_return_url

String

customer_unique_identifier

String

billing_country

String

billing_postal_code

String

billing_state

String

customer_city

String

customer_address

String

customer_mobile

String

customer_email

String

partner_unique_reference

String

partner unique ID

{
 "message": "Application setup successfully",
 "data": {
   "reference_token":
   "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08="
  }
 }
{
    "message": "Invalid secret key"
}
{
    "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys"
}
{
    "message": "No routes found"
}

Api Specification

  • Request call must be on POST.

  • This Api will be used to confirm the feature you are about to Use.

  • For Hosting Payment Method, You need to pass your callback URL in site_return_url.

  • For Saved Card Payment Method, You need to pass your customer unique details like email,etc. to customer_unique_identifier.

Post Request Body

Request Body
Description

site_return_url

  1. If you are using hosting payment, this is mandatory.

  2. Otherwise It is optional field.

  3. It must be a string.

  4. Get the payment response after payment complete.

customer_unique_identifier

  1. This is mandatory when you are using saved card payment.

  2. This data must be Unique like email id,customer id, etc.,

partner_unique_reference

  1. This is mandatory when transaction is based on partner flow.

Support

Developed by

Foloosi Technologies Pvt Ltd.

License

Copyrights (c) 2025 Foloosi

PreviousPHP IntegrationNextPayment Widget Initialization

Last updated 1 month ago

Was this helpful?

to learn about Hosting Payment Page.

Visit for support requests or email to [email protected].

https://www.foloosi.com
click here