Skip to main content
POST
/
transfer
cURL
curl --request POST \
  --url https://api-v2.ziina.com/api/transfer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operation_id": "<string>",
  "to_account_ids": [
    "<string>"
  ],
  "to_ziinames": [
    "<string>"
  ],
  "amount": 123,
  "currency_code": "<string>",
  "message": "<string>"
}
'
import requests

url = "https://api-v2.ziina.com/api/transfer"

payload = {
"operation_id": "<string>",
"to_account_ids": ["<string>"],
"to_ziinames": ["<string>"],
"amount": 123,
"currency_code": "<string>",
"message": "<string>"
}
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({
operation_id: '<string>',
to_account_ids: ['<string>'],
to_ziinames: ['<string>'],
amount: 123,
currency_code: '<string>',
message: '<string>'
})
};

fetch('https://api-v2.ziina.com/api/transfer', 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://api-v2.ziina.com/api/transfer",
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([
'operation_id' => '<string>',
'to_account_ids' => [
'<string>'
],
'to_ziinames' => [
'<string>'
],
'amount' => 123,
'currency_code' => '<string>',
'message' => '<string>'
]),
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://api-v2.ziina.com/api/transfer"

payload := strings.NewReader("{\n \"operation_id\": \"<string>\",\n \"to_account_ids\": [\n \"<string>\"\n ],\n \"to_ziinames\": [\n \"<string>\"\n ],\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"message\": \"<string>\"\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://api-v2.ziina.com/api/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operation_id\": \"<string>\",\n \"to_account_ids\": [\n \"<string>\"\n ],\n \"to_ziinames\": [\n \"<string>\"\n ],\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"message\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-v2.ziina.com/api/transfer")

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 \"operation_id\": \"<string>\",\n \"to_account_ids\": [\n \"<string>\"\n ],\n \"to_ziinames\": [\n \"<string>\"\n ],\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"message\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "account_id": "<string>",
  "amount": 123,
  "tip_amount": 123,
  "currency_code": "<string>",
  "created_at": "<string>",
  "operation_id": "<string>",
  "fee_amount": 123,
  "message": "<string>",
  "redirect_url": "<string>",
  "embedded_url": "<string>",
  "success_url": "<string>",
  "cancel_url": "<string>",
  "latest_error": {
    "message": "<string>",
    "code": "<string>"
  },
  "allow_tips": false
}
In order to call this endpoint your token must have write_transfers scope.
This endpoint allows to transfer funds between Ziina accounts either by account_id or by ziiname

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
operation_id
string
required

Unique client generated UUID. In case of retries provide the same operation_id

to_account_ids
string[]
required

Array of account ids to transfer to. You need to specify only one of the properties: to_account_ids or to_ziinames

to_ziinames
string[]
required

Array of ziinames to transfer to. You need to specify only one of the properties: to_account_ids or to_ziinames

amount
number
required

Transaction amount. Values must be passed in the base units of their currency. For example, $10.50 should be provided as 1050.

currency_code
string
required

Currency code of the amount to charge. This should be a 3-letter ISO-4217 currency code. For example, if you wish to charge 10 AED, you should pass AED. For more information on supported currencies, please visit the supported currencies page

message
string

A message to be displayed to the user on the hosted payment page

Response

default - application/json
id
string
required

id of the payment intent

account_id
string
required

Account which will receive payment

amount
number
required

Transaction amount. Values must be passed in the base units of their currency. For example, $10.50 should be provided as 1050.

tip_amount
number
required

The amount of tips to be added to the payment intent

currency_code
string
required

Currency code of the amount to charge. This should be a 3-letter ISO-4217 currency code. For example, if you wish to charge 10 AED, you should pass AED. For more information on supported currencies, please visit the supported currencies page

created_at
string
required

Unix timestamp in milliseconds

status
enum<string>
required

Status of the transaction. You can find more details here

Available options:
requires_payment_instrument,
requires_user_action,
pending,
completed,
failed,
canceled
operation_id
string
required

Unique client generated UUID. In case of retries provide the same operation_id

fee_amount
number

The amount of fees paid for this payment intent

message
string

A message to be displayed to the user on the hosted payment page

redirect_url
string

The URL to be used to redirect the client to the hosted payment page

embedded_url
string

The URL to be used to show embedded payment page with the payment widget

success_url
string

The URL to be called by the hosted web page when the payment is successful

cancel_url
string

The URL to be called by the hosted web page when the payment is cancelled

latest_error
object

An error that was encountered while processing the payment intent

allow_tips
boolean
default:false

Whether tips are allowed for this payment intent