Signing In to a Merchant Account
curl --request POST \
--url https://api.hel.io/v1/auth/external/sign-in \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>"
}
'import requests
url = "https://api.hel.io/v1/auth/external/sign-in"
payload = { "id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>'})
};
fetch('https://api.hel.io/v1/auth/external/sign-in', 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.hel.io/v1/auth/external/sign-in",
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([
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.hel.io/v1/auth/external/sign-in"
payload := strings.NewReader("{\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.hel.io/v1/auth/external/sign-in")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/auth/external/sign-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"user": {
"id": "681297e9b510d96df0eb6406",
"email": "user@test.com",
"userType": null,
"name": "Test",
"payoutWallets": [
{
"id": "681297e9b510d96df0eb6412",
"publicKey": "DsUFWNpve7hVQdhWDAfUTGq78SpZZ3tVLdnJiRa54QBU",
"name": "Test Wallet"
}
]
},
"company": {
"id": "681297e9b510d96df0eb6408",
"name": "Company",
"email": "company@test.com",
"websiteUrl": "https://test.com",
"discordUsername": "test-discord-username",
"phoneNumber": "+1234567890",
"kycVerified": true
},
"redirectUrl": "https://app.hel.io/auth/external-login?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4MTI5N2U5YjUxMGQ5NmRmMGViNjQwNiIsImlhdCI6MTc0NjA0OTAwMSwiZXhwIjoxNzQ2MDQ5MTIxfQ.C62U9M6g9OE3_f_XbhpU9PDtBigp7Do4mYtDnfileD4"
}{
"message": "Api key or token is invalid",
"code": 401
}PLATFORM
Signing In to a Merchant Account
Sign in to an existing Helio merchant account using an external authentication method.
POST
/
v1
/
auth
/
external
/
sign-in
Signing In to a Merchant Account
curl --request POST \
--url https://api.hel.io/v1/auth/external/sign-in \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>"
}
'import requests
url = "https://api.hel.io/v1/auth/external/sign-in"
payload = { "id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>'})
};
fetch('https://api.hel.io/v1/auth/external/sign-in', 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.hel.io/v1/auth/external/sign-in",
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([
'id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.hel.io/v1/auth/external/sign-in"
payload := strings.NewReader("{\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.hel.io/v1/auth/external/sign-in")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/auth/external/sign-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"user": {
"id": "681297e9b510d96df0eb6406",
"email": "user@test.com",
"userType": null,
"name": "Test",
"payoutWallets": [
{
"id": "681297e9b510d96df0eb6412",
"publicKey": "DsUFWNpve7hVQdhWDAfUTGq78SpZZ3tVLdnJiRa54QBU",
"name": "Test Wallet"
}
]
},
"company": {
"id": "681297e9b510d96df0eb6408",
"name": "Company",
"email": "company@test.com",
"websiteUrl": "https://test.com",
"discordUsername": "test-discord-username",
"phoneNumber": "+1234567890",
"kycVerified": true
},
"redirectUrl": "https://app.hel.io/auth/external-login?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4MTI5N2U5YjUxMGQ5NmRmMGViNjQwNiIsImlhdCI6MTc0NjA0OTAwMSwiZXhwIjoxNzQ2MDQ5MTIxfQ.C62U9M6g9OE3_f_XbhpU9PDtBigp7Do4mYtDnfileD4"
}{
"message": "Api key or token is invalid",
"code": 401
}Note: When using the production environment at moonpay.hel.io, set your API endpoint to
api.hel.io/v1 and generate API keys there. For the development environment, use api.dev.hel.io/v1 and generate API keys from moonpay.dev.hel.io.Query Parameters
Contact the Helio team directly to obtain API keys.
Body
application/json
The merchant-generated unique identifier used as a stable external reference for the account.
Response
Returns user and company details along with a redirect URL.
The response is of type object.
⌘I
