Skip to main content
POST
/
create
cURL
curl --request POST \
  --url https://firstpromoter.com/api/v1/payouts/create \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://firstpromoter.com/api/v1/payouts/create"

headers = {"X-API-KEY": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://firstpromoter.com/api/v1/payouts/create', 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://firstpromoter.com/api/v1/payouts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-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"
"net/http"
"io"
)

func main() {

url := "https://firstpromoter.com/api/v1/payouts/create"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://firstpromoter.com/api/v1/payouts/create")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://firstpromoter.com/api/v1/payouts/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": 2710287,
  "status": "pending",
  "amount": 3000,
  "date_paid": null,
  "due_date": "2024-10-11T00:00:00.000Z",
  "unit": "cash",
  "created_at": "2024-09-12T14:02:53.135Z",
  "has_issues": false,
  "reward": null,
  "promoter": {
    "id": 8262622,
    "status": "active",
    "cust_id": "",
    "email": "[email protected]",
    "created_at": "2024-05-27T17:43:38.935Z",
    "temp_password": "xsKyiS",
    "default_promotion_id": 9441115,
    "pref": "w4wfj9q",
    "default_ref_id": "testxeak1xz1",
    "note": "This is a test promoter. You can use it to test the integration.",
    "w8_form_url": null,
    "w9_form_url": null,
    "parent_promoter_id": null,
    "earnings_balance": {
      "cash": 23000
    },
    "current_balance": {
      "cash": 23000
    },
    "paid_balance": null,
    "auth_token": "bFahsKx8v9_zL9sPTZCDH8JnQAbTeDpy"
  },
  "campaign": {
    "id": 15161,
    "name": "Test new campaign",
    "landing_url": "http://testmax.maxwelladapoe1.com/",
    "description": "",
    "private": false,
    "color": "#00bcd4",
    "default_webhook_url": "",
    "auto_approve_rewards": true,
    "auto_approve_promoters": true
  }
}
{
"error": "You need to pass either promoter_email or promoter_id."
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

promoter_email
string<email>
required

required if promoter_id is null

Email of the promoter

promoter_id
string

required if promoter_email is null

Id of the promoter to assign the payout

status
enum<string>

The payout status

Available options:
pending,
processing,
completed
campaign_id
string

For what campaign to create the payout. If it is null, we'll take the promoter's default

Response

Success response

id
integer
Example:

2710287

status
string
Example:

"pending"

amount
integer
Example:

3000

date_paid
string<date-time> | null
Example:

null

due_date
string<date-time>
Example:

"2024-10-11T00:00:00.000Z"

unit
string
Example:

"cash"

created_at
string<date-time>
Example:

"2024-09-12T14:02:53.135Z"

has_issues
boolean
Example:

false

reward
object | null
Example:

null

promoter
object
campaign
object