Fikäfi APIs
  1. Payments APIs
Fikäfi APIs
  • Fikäfi APIs
    • Getting Started
    • Authentication
    • API Error Handling
    • APIs / Endpoints
      • Authentication API
        • token API
          POST
      • Payments APIs
        • createPayment API
          POST
        • takePaymentAction API
          POST
        • createOnlinePayment API
          POST
      • Status API
        • getPaymentStatus API
          GET
        • getPayments API
          GET
      • Your Webhooks
        • paymentEvent webhook
          POST
        • paymentDetails Webhook
          POST
    • Tutorials
      • Request Payments
      • Check Status
      • Payment Failures
  1. Payments APIs

createOnlinePayment API

POST
https://demo.encorepay.co/FikafiSandbox/FikafiApi/api/payment/createOnlinePayment

💳 Create Payment#

This endpoint allows hotels to initiate a new payment request for a booking. Fikäfi responds with a unique reference number that can be used to track, verify, or manage the payment(s) done against the booking.

🔐 Required Headers#

Include the following headers in your request:
Header NameTypeRequiredDescription
Authorizationstring✅ YesBearer token for API access
Content-Typestring✅ YesMust be application/json

📤 Request Format#

Make a POST request to the payment initiation endpoint with the appropriate JSON payload. Refer to the endpoint definition for detailed field requirements.

🧪 Mock Testing#

You can test this endpoint without any backend integration by using our mock server.
Mock URL:
http://sandbox.fikafi.com/FikafiApi

Request

Header Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Successful payment creation
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.encorepay.co/FikafiSandbox/FikafiApi/api/payment/createOnlinePayment' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzMmVkOTI0OC1kNTc4LTQ3NzUtODYwYS1iZGZkOGExM2Y0MzciLCJ1bmlxdWVfbmFtZSI6IkFkbWluIiwiVXNlcklEIjoiMSIsIm5iZiI6MTc0MDM5Mzg4NywiZXhwIjoxNzQwNDgwMjg3LCJpYXQiOjE3NDAzOTM4ODd9.J6oPTYH9x5ia_a7OUBj9K038o8gu04gL4kLuVyJ8RQo' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bookingRefNum": "BKGYGUIAT34534",
    "guestDetails": {
        "guestName": "Z Waqar",
        "phoneNum": "(757) 620-4011",
        "email": "zaidwaqar66@gmail.com",
        "country": "IN"
    },
    "bookingDetails": {
        "propertyID": "KSA_MUK_01",
        "referenceDetails": "nulla qui do",
        "communicationMode": "EMAIL",
        "arrivalDate": "2025-09-15",
        "numberOfNights": 2
    },
    "paymentDetails": {
        "currency": "SAR",
        "totalAmounts": 132.79,
        "numOfPayments": 1,
        "validity": "5 mins",
        "payments": [
            {
                "paymentNumber": 1,
                "amount": 132.79,
                "date": "2025-09-2"
            }
        ]
    },
    "returnURL": {
        "success_url": "https://icpih.com/media-intestinal-health-ihsig/PAYMENT-SUCCESS.png",
        "failed_url": "https://framerusercontent.com/images/U0VltHCCefV5vWu8znLfThpPx0.png"
    },
    "webhook": {
        "payment_details_url": "https://enraged-formamide.net/",
        "payment_event_url": "https://sad-mallard.biz/"
    }
}'
Response Response Example
{
  "bookingRefNum": "BKG123",
  "fikafiRefNum": "FIK7890",
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "url": "https://fikafi.com/payment-screen/FIK7890"
}
Modified at 2025-09-03 16:16:47
Previous
takePaymentAction API
Next
getPaymentStatus API
Built with