Create Payin
curl --request POST \
--url https://stablecoin-api.sandbox.getmeru.com/v1/payins \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"externalId": "<string>",
"onBehalfOf": "<string>",
"amount": 123,
"developerFee": 123,
"source": {},
"destination": {},
"deductFromBalance": true
}
'import requests
url = "https://stablecoin-api.sandbox.getmeru.com/v1/payins"
payload = {
"externalId": "<string>",
"onBehalfOf": "<string>",
"amount": 123,
"developerFee": 123,
"source": {},
"destination": {},
"deductFromBalance": True
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalId: '<string>',
onBehalfOf: '<string>',
amount: 123,
developerFee: 123,
source: {},
destination: {},
deductFromBalance: true
})
};
fetch('https://stablecoin-api.sandbox.getmeru.com/v1/payins', 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://stablecoin-api.sandbox.getmeru.com/v1/payins",
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([
'externalId' => '<string>',
'onBehalfOf' => '<string>',
'amount' => 123,
'developerFee' => 123,
'source' => [
],
'destination' => [
],
'deductFromBalance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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://stablecoin-api.sandbox.getmeru.com/v1/payins"
payload := strings.NewReader("{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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://stablecoin-api.sandbox.getmeru.com/v1/payins")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stablecoin-api.sandbox.getmeru.com/v1/payins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": "externalId was already used"
}
Payins
Create Payin
Creates a new payin.
POST
/
v1
/
payins
Create Payin
curl --request POST \
--url https://stablecoin-api.sandbox.getmeru.com/v1/payins \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"externalId": "<string>",
"onBehalfOf": "<string>",
"amount": 123,
"developerFee": 123,
"source": {},
"destination": {},
"deductFromBalance": true
}
'import requests
url = "https://stablecoin-api.sandbox.getmeru.com/v1/payins"
payload = {
"externalId": "<string>",
"onBehalfOf": "<string>",
"amount": 123,
"developerFee": 123,
"source": {},
"destination": {},
"deductFromBalance": True
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalId: '<string>',
onBehalfOf: '<string>',
amount: 123,
developerFee: 123,
source: {},
destination: {},
deductFromBalance: true
})
};
fetch('https://stablecoin-api.sandbox.getmeru.com/v1/payins', 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://stablecoin-api.sandbox.getmeru.com/v1/payins",
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([
'externalId' => '<string>',
'onBehalfOf' => '<string>',
'amount' => 123,
'developerFee' => 123,
'source' => [
],
'destination' => [
],
'deductFromBalance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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://stablecoin-api.sandbox.getmeru.com/v1/payins"
payload := strings.NewReader("{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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://stablecoin-api.sandbox.getmeru.com/v1/payins")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stablecoin-api.sandbox.getmeru.com/v1/payins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"amount\": 123,\n \"developerFee\": 123,\n \"source\": {},\n \"destination\": {},\n \"deductFromBalance\": true\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": "externalId was already used"
}
Body
string
Client reference id (must be unique per company).
string
required
User/customer reference.
number
required
Amount to be paid.
number
Optional developer fee amount.
object
Optional source details.
object
required
Destination details.
boolean
Whether to deduct from balance.
Response
Returns a payin object.Error Responses
{
"success": false,
"error": "externalId was already used"
}
⌘I