Create payin order (deposit)
curl --request POST \
--url https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"callback_url": "https://google.com",
"client_id": "finflex_test_6868706820",
"customer_details": {
"email": "donation@gmail.com",
"mobile": "9040660463",
"name": "Testing"
},
"order_id": "321sdf"
}
'import requests
url = "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order"
payload = {
"amount": 10,
"callback_url": "https://google.com",
"client_id": "finflex_test_6868706820",
"customer_details": {
"email": "donation@gmail.com",
"mobile": "9040660463",
"name": "Testing"
},
"order_id": "321sdf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10,
callback_url: 'https://google.com',
client_id: 'finflex_test_6868706820',
customer_details: {email: 'donation@gmail.com', mobile: '9040660463', name: 'Testing'},
order_id: '321sdf'
})
};
fetch('https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10,
'callback_url' => 'https://google.com',
'client_id' => 'finflex_test_6868706820',
'customer_details' => [
'email' => 'donation@gmail.com',
'mobile' => '9040660463',
'name' => 'Testing'
],
'order_id' => '321sdf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order"
payload := strings.NewReader("{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amount": 10,
"client_id": "finflex_test_6868706820",
"created_at": "2024-07-04T10:30:00Z",
"order_id": "321sdf",
"payment_url": "https://payment.smebank.com/pay/abc123",
"status": "pending",
"transaction_id": "txn_987654321"
},
"message": "Payin order created successfully",
"success": true
}{
"message": "Authentication failed - please provide either valid client credentials or a valid Bearer token",
"status": false
}Pay In
Create payin order (deposit)
Create a payin order (deposit). This is the opposite of payout (withdraw). This endpoint supports two authentication methods - either use client credentials headers OR bearer token.
POST
/
payin
/
create-order
Create payin order (deposit)
curl --request POST \
--url https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"callback_url": "https://google.com",
"client_id": "finflex_test_6868706820",
"customer_details": {
"email": "donation@gmail.com",
"mobile": "9040660463",
"name": "Testing"
},
"order_id": "321sdf"
}
'import requests
url = "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order"
payload = {
"amount": 10,
"callback_url": "https://google.com",
"client_id": "finflex_test_6868706820",
"customer_details": {
"email": "donation@gmail.com",
"mobile": "9040660463",
"name": "Testing"
},
"order_id": "321sdf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10,
callback_url: 'https://google.com',
client_id: 'finflex_test_6868706820',
customer_details: {email: 'donation@gmail.com', mobile: '9040660463', name: 'Testing'},
order_id: '321sdf'
})
};
fetch('https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10,
'callback_url' => 'https://google.com',
'client_id' => 'finflex_test_6868706820',
'customer_details' => [
'email' => 'donation@gmail.com',
'mobile' => '9040660463',
'name' => 'Testing'
],
'order_id' => '321sdf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order"
payload := strings.NewReader("{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1/payin/create-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10,\n \"callback_url\": \"https://google.com\",\n \"client_id\": \"finflex_test_6868706820\",\n \"customer_details\": {\n \"email\": \"donation@gmail.com\",\n \"mobile\": \"9040660463\",\n \"name\": \"Testing\"\n },\n \"order_id\": \"321sdf\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amount": 10,
"client_id": "finflex_test_6868706820",
"created_at": "2024-07-04T10:30:00Z",
"order_id": "321sdf",
"payment_url": "https://payment.smebank.com/pay/abc123",
"status": "pending",
"transaction_id": "txn_987654321"
},
"message": "Payin order created successfully",
"success": true
}{
"message": "Authentication failed - please provide either valid client credentials or a valid Bearer token",
"status": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Finflex client ID (starts with finflex_test_ or finflex_live_)
Finflex client secret
Body
application/json
⌘I