Example Credentials

sid:103
SecretKey: eQhJaPfBxF

Payments

Getting Bank Accounts Details

Request Body(JSON):

  {
	"sid": "101", // Your Site ID
	"sessionid": "xx-123", //Transaction ID On Your Side(Must Be Unique)
	"returnurl": "https://vbet.com", //Users will be redirected to this URL.
	"username": "jdoe", //User's Username
	"amount": 200, //Process Amount
	"fullname": "John Doe" //User's Fullname
  }
		
After creating body, you must encode your Body with JWT(Json Web Token). You must send this Token with Authorization Bearer to endpoint.
JWT Header:

  {
	"alg": "HS512",
	"typ": "JWT"
  }
		

Encoded Body

eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9. eyJzaWQiOiIxMDEiLCJzZXNzaW9uaWQiOiJ4eC0xMjMiLCJyZXR1cm51cmwiOiJodHRwczovL3ZiZXQuY29tIiwidXNlcm5hbWUiOiJqZG9lIiwiYW1vdW50IjoyMDAsImZ1bGxuYW1lIjoiSm9obiBEb2UifQ. m3JIHa_ftfp0vszSR_L41E2pN5XxemztYwLM_I1EhyCf1DtTB3_RQiJcHliQH9Twh7YQJQuaUXK9jA4Nbtc5OQ

base64UrlEncode(JWT Header) . base64UrlEncode(Request Body) . SHA512(base64UrlEncode(header) + "." + base64UrlEncode(payload) , $secretkey)
Request:
Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9. eyJzaWQiOiIxMDEiLCJzZXNzaW9uaWQiOiJ4eC0xMjMiLCJyZXR1cm51cmwiOiJodHRwczovL3ZiZXQuY29tIiwidXNlcm5hbWUiOiJqZG9lIiwiYW1vdW50IjoyMDAsImZ1bGxuYW1lIjoiSm9obiBEb2UifQ. m3JIHa_ftfp0vszSR_L41E2pN5XxemztYwLM_I1EhyCf1DtTB3_RQiJcHliQH9Twh7YQJQuaUXK9jA4Nbtc5OQ
Encoded Response:

  {
	"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6MywidXJsIjoiaHR0cHM6XC9cL3R1cmJvaGF2YWxlLmNvbVwvaW5kZXgucGhwP2JpZD0zJnRva2VuPTY4ZmE1Njc2ODgmdHlwZT1tIn0.q0qtbBnzZ2mds54VOtbUilMQPFQkBLmU0JbC9i4lN2RWddzLgn1lvv2NbtIhlW0Tqkg1Jc00vk1tbZfy86KcZA"
  }
			
Decoded Response:

{
	"id": 3,
	"url": "https://turbohavale.com/index.php?bid=3&token=68fa567688&type=m"
}
	

Withdraws

Sending Withdraws

Request Body(JSON):

  {
	"sid": "501", // Your Site ID
	"sessionid": "xx-123", //Transaction ID On Your Side(Must Be Unique)
	"username": "jdoe", //User's Username
	"amount": "100", //Withdraw Amount
	"fullname": "John Doe", //User's Fullname
	"walletno": "TR98 4989 4984 48984 4989 50", //User's Wallet Number
	"bank": "Ziraat Bankası", //Withdraw Bank Name
	"type": "havale" //Withdraw Type (Should be havale)
  }
		
After creating body, you must encode your Body with JWT. You must send this Token with Authorization Bearer to endpoint.
JWT Header:

  {
	"alg": "HS512",
	"typ": "JWT"
  }
		

Encoded Body

eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9. eyJzaWQiOiI1MDEiLCJzZXNzaW9uaWQiOiJ4eC0xMjMiLCJ1c2VybmFtZSI6Impkb2UiLCJhbW91bnQiOiIxMDAiLCJmdWxsbmFtZSI6IkpvaG4gRG9lIiwid2FsbGV0bm8iOiJUUjk4IDQ5ODkgNDk4NCA0ODk4NCA0OTg5IDUwIiwiYmFuayI6IlppcmFhdCBCYW5rYXPEsSIsInR5cGUiOiJoYXZhbGUifQ. qYhU5jnbrOiX1aM-LHCG_iMqHmAbMQicK9XDh2LPfbk_iuL2GQxQmUgwFdfJTOfTIr0LL-Ei32mZ1zYFNuS6qg

Request:
Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiI1MDEiLCJzZXNzaW9uaWQiOiJ4eC0xMjMiLCJ1c2VybmFtZSI6Impkb2UiLCJhbW91bnQiOiIxMDAiLCJmdWxsbmFtZSI6IkpvaG4gRG9lIiwid2FsbGV0bm8iOiJUUjk4IDQ5ODkgNDk4NCA0ODk4NCA0OTg5IDUwIiwiYmFuayI6IlppcmFhdCBCYW5rYXPEsSIsInR5cGUiOiJoYXZhbGUifQ.qYhU5jnbrOiX1aM-LHCG_iMqHmAbMQicK9XDh2LPfbk_iuL2GQxQmUgwFdfJTOfTIr0LL-Ei32mZ1zYFNuS6qg
Response(JSON):

  {
	"status": "ok"
  }


			


  [
	{
	"id": "1",
	"banka": "Akbank",
	"active": "1"
	},
	{
	"id": "2",
	"banka": "Fibabanka",
	"active": "0"
	},
	....
  ]
			

Callbacks

Payment/Withdraw Callbacks

Endpoint URL(GET)

$yourEndpoint/?token={token}

Request Token(in Authorization and GET Params):

Encoded Body

eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9. eyJpZCI6IjIwMzY3Iiwic2lkIjoiNTAxIiwic3RhdHVzIjoiMCIsImFtb3VudCI6IjEwMC4wIiwidXNlcm5hbWUiOiJqZHVlIiwicmVxdWVzdGlkIjoieHgtMTIzIiwiZnVsbG5hbWUiOiJKb2huIERvZSIsImlwIjoiMjE2LjU4LjIxNi4xNjQiLCJkYXRlIjoiMjAyMS0wMi0wMSAxMzo0MjoyMSIsInR5cGUiOiJoYXZhbGUiLCJ0dHlwZSI6ImRlcG9zaXQifQ. tFge1mmyeXysZNypRupkWoHv1DV12TmBELAAdXcYWe82uouTQYt-kPBSmL4mF07wNmk7Fee2QbmxfmOs4w952A

Request Body(JSON):

  {
	"id": "20367", // Process ID
	"sid": "501", // Your Site ID
	"status": "0", // Transaction's Status (0 - Unsuccess , 1 - Success)
	"requestid": "xx-123", //Your Transaction ID
	"username": "jdoe", //User's Username
	"amount": "100", //Withdraw Amount
	"fullname": "John Doe", //User's Fullname
	"ip": "216.58.216.164", //User's IP Address
	"date": "2021-02-01 13:42:21", //Transaction Date
	"type": "havale", //Transaction Method(havale)
	"ttype": "deposit", //Transaction Type(deposit or withdraw)
  }
		

Check Payment/Withdraw Status

Endpoint URL(POST)

Content-Type: application/json

https://turbohavale.com/api/api/getStatus.php

Request Body(JSON):

  {
	"processId": "20367", // Transaction ID On Your Side
	"sid": "501", // Your Site ID
	"type": "havale", // Transaction's Type (havale or withdraw)
	"token": "bf15fcd8dd46a5619179b72b4476084c" // md5($secretkey$processId$type)
  }
		
Response:

  {
	"hasError": false,
	"message": "Process Status: Pending",
	"errorCode": 0, 
	"statusCode": "9"
  }
		
Status Code List:

			  0 - Cancelled
			  1 - Succeeded
			  9 - Process Is Pending
			  999 - Unknown
		
Error Code List:

			  0 - No Error
			  400 - Bad Request ( Missing Parameters )
			  401 - Unauthorized
			  404 - Site Not Found
			  405 - Process Not Found
			  406 - Invalid Parameters