Billing

Embed
Preview of the card
<a href="https://referalli.com/docs/ref-billing"><img src="https://referalli.com/docs/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2bf4f614-3630-4fbf-85f9-5ecafa6b7d97/pages/7a72396e-9606-4bba-bdd5-632a3f52702f/social-card.svg?v=3e7ae33eec8b" alt="Billing" width="600" height="315"></a>
GEThttps://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve
GET /t/{orgToken}/mobile/resolve
Parameters
orgTokenstringpathrequired
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/resolve"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "matched": true,
  "clickId": "string",
  "code": "string",
  "destination": "string"
}
Schema
matchedbooleanrequired
clickIdstring
codestring
destinationstring
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install
POST /t/{orgToken}/mobile/install
Parameters
orgTokenstringpathrequired
Request body application/json
programIdstringrequired
customerRefstringrequired
clickIdstring
deviceIdstring
idempotencyKeystring
{
  "programId": "string",
  "customerRef": "string",
  "clickId": "string",
  "deviceId": "string",
  "idempotencyKey": "string"
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install" \
  -H "Content-Type: application/json" \
  -d '{"programId":"string","customerRef":"string","clickId":"string","deviceId":"string","idempotencyKey":"string"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"programId":"string","customerRef":"string","clickId":"string","deviceId":"string","idempotencyKey":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install",
    headers={
    "Content-Type": "application/json",
    },
    json={"programId": "string", "customerRef": "string", "clickId": "string", "deviceId": "string", "idempotencyKey": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install", strings.NewReader(`{"programId":"string","customerRef":"string","clickId":"string","deviceId":"string","idempotencyKey":"string"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"programId":"string","customerRef":"string","clickId":"string","deviceId":"string","idempotencyKey":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"programId":"string","customerRef":"string","clickId":"string","deviceId":"string","idempotencyKey":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/install"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"programId\":\"string\",\"customerRef\":\"string\",\"clickId\":\"string\",\"deviceId\":\"string\",\"idempotencyKey\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "attributed": true,
  "referralId": "string",
  "partnerId": "string"
}
Schema
attributedbooleanrequired
referralIdstringrequired
partnerIdstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event
POST /t/{orgToken}/mobile/event
Parameters
orgTokenstringpathrequired
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/t/{orgToken}/mobile/event"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/mobile/purchases
Report a validated in-app purchase or refund (server-side)
Request body application/json
eventIdstringrequired
customerRefstringrequired
typestring
purchase | refund = purchase
amountMinorintegerrequired
currencystring
= usd
productRefstring
{
  "eventId": "string",
  "customerRef": "string",
  "type": "purchase",
  "amountMinor": 0,
  "currency": "usd",
  "productRef": "string"
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/mobile/purchases" \
  -H "Content-Type: application/json" \
  -d '{"eventId":"string","customerRef":"string","type":"purchase","amountMinor":0,"currency":"usd","productRef":"string"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/mobile/purchases', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"eventId":"string","customerRef":"string","type":"purchase","amountMinor":0,"currency":"usd","productRef":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/mobile/purchases",
    headers={
    "Content-Type": "application/json",
    },
    json={"eventId": "string", "customerRef": "string", "type": "purchase", "amountMinor": 0, "currency": "usd", "productRef": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/mobile/purchases", strings.NewReader(`{"eventId":"string","customerRef":"string","type":"purchase","amountMinor":0,"currency":"usd","productRef":"string"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/mobile/purchases');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"eventId":"string","customerRef":"string","type":"purchase","amountMinor":0,"currency":"usd","productRef":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/mobile/purchases')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"eventId":"string","customerRef":"string","type":"purchase","amountMinor":0,"currency":"usd","productRef":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/mobile/purchases"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"eventId\":\"string\",\"customerRef\":\"string\",\"type\":\"purchase\",\"amountMinor\":0,\"currency\":\"usd\",\"productRef\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "conversions": 0,
  "linesCreated": 0,
  "reversals": 0
}
Schema
conversionsintegerrequired
linesCreatedintegerrequired
reversalsintegerrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referally.15.204.158.166.sslip.io/v1/billing/connections
GET /v1/billing/connections
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/v1/billing/connections"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/v1/billing/connections", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under referally-version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "provider": "string",
      "name": "string",
      "status": "active",
      "createdAt": "2024-01-01T00:00:00Z",
      "webhookUrl": "string",
      "needsCredentials": true,
      "hasCredentials": true,
      "rotation": {
        "inProgress": true,
        "previousSecretExpiresAt": "2024-01-01T00:00:00Z"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataBillingConnection[]required
Show child parameters
idstringrequired
providerstringrequired
namestringrequired
statusstringrequired
paused: its webhook URL refuses events until resumed.
active | paused
createdAtstringrequired
webhookUrlstringrequired
needsCredentialsbooleanrequired
The provider sends thin webhooks: set API credentials (Recurly, BigCommerce).
hasCredentialsbooleanrequired
rotationobjectrequired
Show child parameters
inProgressbooleanrequired
previousSecretExpiresAtstring
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/billing/connections
Create a billing connection (webhook secret)
Request body application/json
providerstringrequired
stripe | paddle | lemonsqueezy | polar | chargebee | shopify | generic | recurly | braintree | woocommerce | bigcommerce
namestring
webhookSecretstring
{
  "provider": "stripe",
  "name": "",
  "webhookSecret": "string"
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/billing/connections" \
  -H "Content-Type: application/json" \
  -d '{"provider":"stripe","name":"","webhookSecret":"string"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"provider":"stripe","name":"","webhookSecret":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections",
    headers={
    "Content-Type": "application/json",
    },
    json={"provider": "stripe", "name": "", "webhookSecret": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/billing/connections", strings.NewReader(`{"provider":"stripe","name":"","webhookSecret":"string"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"provider":"stripe","name":"","webhookSecret":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"provider":"stripe","name":"","webhookSecret":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"provider\":\"stripe\",\"name\":\"\",\"webhookSecret\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "webhookSecret": "string",
  "webhookUrl": "string"
}
Schema
idstringrequired
providerstringrequired
webhookSecretstringrequired
Returned only here.
webhookUrlstringrequired
Path to register with the provider.
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
PUThttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret
PUT /v1/billing/connections/{id}/secret
Parameters
idstringpathrequired
Request body application/json
webhookSecretstringrequired
{
  "webhookSecret": "string"
}
Code samples
cURL
curl -X PUT "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret" \
  -H "Content-Type: application/json" \
  -d '{"webhookSecret":"string"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"webhookSecret":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PUT",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret",
    headers={
    "Content-Type": "application/json",
    },
    json={"webhookSecret": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PUT", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret", strings.NewReader(`{"webhookSecret":"string"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"webhookSecret":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret')
req = Net::HTTP::Put.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"webhookSecret":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/secret"))
    .header("Content-Type", "application/json")
    .method("PUT", BodyPublishers.ofString("{\"webhookSecret\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "ok": true
}
Schema
idstringrequired
providerstringrequired
okbooleanrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
PUThttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials
PUT /v1/billing/connections/{id}/credentials
Parameters
idstringpathrequired
Request body application/json
apiKeystring
apiTokenstring
storeHashstring
regionstring
us | eu
{
  "apiKey": "string",
  "apiToken": "string",
  "storeHash": "string",
  "region": "us"
}
Code samples
cURL
curl -X PUT "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials" \
  -H "Content-Type: application/json" \
  -d '{"apiKey":"string","apiToken":"string","storeHash":"string","region":"us"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"apiKey":"string","apiToken":"string","storeHash":"string","region":"us"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PUT",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials",
    headers={
    "Content-Type": "application/json",
    },
    json={"apiKey": "string", "apiToken": "string", "storeHash": "string", "region": "us"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PUT", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials", strings.NewReader(`{"apiKey":"string","apiToken":"string","storeHash":"string","region":"us"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"apiKey":"string","apiToken":"string","storeHash":"string","region":"us"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials')
req = Net::HTTP::Put.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"apiKey":"string","apiToken":"string","storeHash":"string","region":"us"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/credentials"))
    .header("Content-Type", "application/json")
    .method("PUT", BodyPublishers.ofString("{\"apiKey\":\"string\",\"apiToken\":\"string\",\"storeHash\":\"string\",\"region\":\"us\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "ok": true
}
Schema
idstringrequired
providerstringrequired
okbooleanrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}
GET /v1/billing/connections/{id}
Parameters
idstringpathrequired
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "name": "string",
  "status": "active",
  "createdAt": "2024-01-01T00:00:00Z",
  "webhookUrl": "string",
  "needsCredentials": true,
  "hasCredentials": true,
  "rotation": {
    "inProgress": true,
    "previousSecretExpiresAt": "2024-01-01T00:00:00Z"
  }
}
Schema
idstringrequired
providerstringrequired
namestringrequired
statusstringrequired
paused: its webhook URL refuses events until resumed.
active | paused
createdAtstringrequired
webhookUrlstringrequired
needsCredentialsbooleanrequired
The provider sends thin webhooks: set API credentials (Recurly, BigCommerce).
hasCredentialsbooleanrequired
rotationobjectrequired
Show child parameters
inProgressbooleanrequired
previousSecretExpiresAtstring
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
DELETEhttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}
DELETE /v1/billing/connections/{id}
Parameters
idstringpathrequired
Code samples
cURL
curl -X DELETE "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}', {
  method: 'DELETE',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}')
req = Net::HTTP::Delete.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}"))
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "ok": true
}
Schema
okbooleanrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
PATCHhttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}
PATCH /v1/billing/connections/{id}
Parameters
idstringpathrequired
Request body application/json
statusstring
active | paused
namestring
{
  "status": "active",
  "name": "string"
}
Code samples
cURL
curl -X PATCH "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}" \
  -H "Content-Type: application/json" \
  -d '{"status":"active","name":"string"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"status":"active","name":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PATCH",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}",
    headers={
    "Content-Type": "application/json",
    },
    json={"status": "active", "name": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PATCH", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}", strings.NewReader(`{"status":"active","name":"string"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"status":"active","name":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}')
req = Net::HTTP::Patch.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"status":"active","name":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}"))
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"status\":\"active\",\"name\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "name": "string",
  "status": "active",
  "createdAt": "2024-01-01T00:00:00Z",
  "webhookUrl": "string",
  "needsCredentials": true,
  "hasCredentials": true,
  "rotation": {
    "inProgress": true,
    "previousSecretExpiresAt": "2024-01-01T00:00:00Z"
  }
}
Schema
idstringrequired
providerstringrequired
namestringrequired
statusstringrequired
paused: its webhook URL refuses events until resumed.
active | paused
createdAtstringrequired
webhookUrlstringrequired
needsCredentialsbooleanrequired
The provider sends thin webhooks: set API credentials (Recurly, BigCommerce).
hasCredentialsbooleanrequired
rotationobjectrequired
Show child parameters
inProgressbooleanrequired
previousSecretExpiresAtstring
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret
POST /v1/billing/connections/{id}/rotate-secret
Parameters
idstringpathrequired
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/connections/{id}/rotate-secret"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "provider": "string",
  "webhookSecret": "string",
  "previousSecretExpiresAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
providerstringrequired
webhookSecretstringrequired
Returned only here. The previous secret keeps verifying until previousSecretExpiresAt.
previousSecretExpiresAtstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referally.15.204.158.166.sslip.io/v1/billing/events
GET /v1/billing/events
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/v1/billing/events"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/events', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/v1/billing/events",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/v1/billing/events", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/events');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/events')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/events"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under referally-version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "provider": "string",
      "type": "string",
      "customerRef": "string",
      "invoiceRef": "string",
      "amountGross": 0,
      "tax": 0,
      "fees": 0,
      "currency": "string",
      "occurredAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataBillingEvent[]required
Show child parameters
idstringrequired
providerstringrequired
typestringrequired
customerRefstringrequired
invoiceRefstringrequired
amountGrossintegerrequired
Integer minor units (cents).
taxintegerrequired
Integer minor units (cents).
feesintegerrequired
Integer minor units (cents).
currencystringrequired
occurredAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/sandbox/simulate
Generate deterministic sandbox billing history
Request body application/json
programIdstringrequired
partnerIdstringrequired
scenariostring
subscription | refund | churn = subscription
priceMinorinteger
= 9900
monthsinteger
= 3
{
  "programId": "string",
  "partnerId": "string",
  "scenario": "subscription",
  "priceMinor": 9900,
  "months": 3
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate" \
  -H "Content-Type: application/json" \
  -d '{"programId":"string","partnerId":"string","scenario":"subscription","priceMinor":9900,"months":3}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"programId":"string","partnerId":"string","scenario":"subscription","priceMinor":9900,"months":3}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate",
    headers={
    "Content-Type": "application/json",
    },
    json={"programId": "string", "partnerId": "string", "scenario": "subscription", "priceMinor": 9900, "months": 3},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate", strings.NewReader(`{"programId":"string","partnerId":"string","scenario":"subscription","priceMinor":9900,"months":3}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"programId":"string","partnerId":"string","scenario":"subscription","priceMinor":9900,"months":3}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"programId":"string","partnerId":"string","scenario":"subscription","priceMinor":9900,"months":3}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/sandbox/simulate"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"programId\":\"string\",\"partnerId\":\"string\",\"scenario\":\"subscription\",\"priceMinor\":9900,\"months\":3}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "customerRef": "string",
  "events": 0,
  "conversions": 0,
  "linesCreated": 0,
  "reversals": 0
}
Schema
customerRefstringrequired
eventsintegerrequired
conversionsintegerrequired
linesCreatedintegerrequired
reversalsintegerrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referally.15.204.158.166.sslip.io/v1/billing/plan
GET /v1/billing/plan
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/v1/billing/plan"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/plan', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/v1/billing/plan",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/v1/billing/plan", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/plan');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/plan')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/plan"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "plan": "string",
  "planStatus": "string",
  "periodEnd": "2024-01-01T00:00:00Z",
  "limits": {},
  "usage": {
    "programs": 0,
    "partners": 0
  },
  "catalog": {},
  "subscribed": true,
  "canActivate": true
}
Schema
planstringrequired
planStatusstringrequired
periodEndstringrequired
limitsobjectrequired
usageobjectrequired
Show child parameters
programsintegerrequired
partnersintegerrequired
catalogobjectrequired
subscribedbooleanrequired
canActivatebooleanrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/billing/checkout
POST /v1/billing/checkout
Request body application/json
planstringrequired
growth | pro | scale
{
  "plan": "growth"
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/billing/checkout" \
  -H "Content-Type: application/json" \
  -d '{"plan":"growth"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/checkout', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"plan":"growth"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/billing/checkout",
    headers={
    "Content-Type": "application/json",
    },
    json={"plan": "growth"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/billing/checkout", strings.NewReader(`{"plan":"growth"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/checkout');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"plan":"growth"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/checkout')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"plan":"growth"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/checkout"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"plan\":\"growth\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "url": "string",
  "sessionId": "string"
}
Schema
urlstring
sessionIdstring
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/billing/portal
POST /v1/billing/portal
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/billing/portal"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/portal', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/billing/portal",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/billing/portal", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/portal');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/portal')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/portal"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "url": "string"
}
Schema
urlstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/billing/activate
POST /v1/billing/activate
Request body application/json
planstringrequired
free | growth | pro | scale | starter
{
  "plan": "free"
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/billing/activate" \
  -H "Content-Type: application/json" \
  -d '{"plan":"free"}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/billing/activate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"plan":"free"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/billing/activate",
    headers={
    "Content-Type": "application/json",
    },
    json={"plan": "free"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/billing/activate", strings.NewReader(`{"plan":"free"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/billing/activate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"plan":"free"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/billing/activate')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"plan":"free"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/billing/activate"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"plan\":\"free\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "plan": "string",
  "planStatus": "string"
}
Schema
planstringrequired
planStatusstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
GEThttps://referally.15.204.158.166.sslip.io/v1/onchain/connections
GET /v1/onchain/connections
Code samples
cURL
curl -X GET "https://referally.15.204.158.166.sslip.io/v1/onchain/connections"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/onchain/connections', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://referally.15.204.158.166.sslip.io/v1/onchain/connections",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://referally.15.204.158.166.sslip.io/v1/onchain/connections", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/onchain/connections');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/onchain/connections')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/onchain/connections"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 A page of the list. Under referally-version 2026-10-21 the body is the plain array instead.
Example
{
  "object": "string",
  "data": [
    {
      "id": "string",
      "programId": "string",
      "name": "string",
      "status": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
Schema
objectstringrequired
dataobject[]required
Show child parameters
idstringrequired
programIdstringrequired
namestringrequired
statusstringrequired
createdAtstringrequired
has_morebooleanrequired
Whether another page follows; pass next_cursor as starting_after to get it.
next_cursorstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/v1/onchain/connections
POST /v1/onchain/connections
Request body application/json
programIdstringrequired
namestring
secretstring
decimalsobject
= {"usd":2}
{
  "programId": "string",
  "name": "",
  "secret": "string",
  "decimals": {
    "usd": 2
  }
}
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/v1/onchain/connections" \
  -H "Content-Type: application/json" \
  -d '{"programId":"string","name":"","secret":"string","decimals":{"usd":2}}'
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/v1/onchain/connections', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"programId":"string","name":"","secret":"string","decimals":{"usd":2}}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/v1/onchain/connections",
    headers={
    "Content-Type": "application/json",
    },
    json={"programId": "string", "name": "", "secret": "string", "decimals": {"usd": 2}},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/v1/onchain/connections", strings.NewReader(`{"programId":"string","name":"","secret":"string","decimals":{"usd":2}}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/v1/onchain/connections');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"programId":"string","name":"","secret":"string","decimals":{"usd":2}}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/v1/onchain/connections')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"programId":"string","name":"","secret":"string","decimals":{"usd":2}}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/v1/onchain/connections"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"programId\":\"string\",\"name\":\"\",\"secret\":\"string\",\"decimals\":{\"usd\":2}}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "id": "string",
  "secret": "string",
  "webhookUrl": "string"
}
Schema
idstringrequired
secretstringrequired
webhookUrlstringrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}
Inbound billing webhook (HMAC)
Parameters
connectionIdstringpathrequired
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/webhooks/billing/{connectionId}"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "received": 0,
  "results": [
    {
      "duplicate": true,
      "billingEventId": "string",
      "conversions": 0,
      "linesCreated": 0,
      "reversals": 0
    }
  ]
}
Schema
receivedintegerrequired
resultsobject[]required
Show child parameters
duplicatebooleanrequired
billingEventIdstringrequired
conversionsintegerrequired
linesCreatedintegerrequired
reversalsintegerrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}
On-chain conversion webhook (indexer)
Parameters
connectionIdstringpathrequired
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/webhooks/onchain/{connectionId}"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "received": 0,
  "results": [
    {
      "txHash": "string",
      "wallet": "string",
      "amountMinor": 0,
      "attributed": true,
      "linesCreated": 0,
      "duplicate": true
    }
  ]
}
Schema
receivedintegerrequired
resultsobject[]required
Show child parameters
txHashstringrequired
walletstringrequired
amountMinorintegerrequired
Integer minor units (cents).
attributedbooleanrequired
linesCreatedintegerrequired
duplicatebooleanrequired
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
POSThttps://referally.15.204.158.166.sslip.io/webhooks/stripe-billing
POST /webhooks/stripe-billing
Code samples
cURL
curl -X POST "https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing"
TypeScript
const res = await fetch('https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing', {
  method: 'POST',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://referally.15.204.158.166.sslip.io/webhooks/stripe-billing"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 OK
Example
{
  "received": true,
  "duplicate": true,
  "ignored": true,
  "reason": "string",
  "orgId": "string",
  "plan": "string",
  "planStatus": "string"
}
Schema
receivedbooleanrequired
duplicateboolean
ignoredboolean
reasonstring
orgIdstring
planstring
planStatusstring
default Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
details
requestIdstring
docs_urlstringrequired
The docs entry for this error code: what it means and how to fix it.
Updated