Activate a draft invoice
curl --request POST \
--url https://api.sandbox.busha.so/v1/payments/links/{id}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.busha.so/v1/payments/links/{id}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.busha.so/v1/payments/links/{id}/activate', 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.sandbox.busha.so/v1/payments/links/{id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sandbox.busha.so/v1/payments/links/{id}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.busha.so/v1/payments/links/{id}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.busha.so/v1/payments/links/{id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "message for success",
"data": {
"id": "bus_123456789",
"profile_id": "bus_123456789",
"fixed": false,
"one_time": false,
"link": "https://pay.busha.io/charges/123456789",
"name": "Payment Link",
"title": "<string>",
"description": "<string>",
"target_currency": "BTC",
"created_at": "2023-10-15T12:15:30Z",
"updated_at": "2023-10-15T12:15:30Z",
"quote_amount": "100",
"quote_currency": "BTC",
"target_amount": "100",
"meta": {
"images": [
"<string>"
],
"allow_customer_amount": true,
"amount_limit": {
"min_amount": "100",
"max_amount": "100"
},
"allow_quantity_selection": true,
"require_extra_info": [
{
"field_name": "<string>",
"required": true
}
],
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"note": "<string>",
"items": [
{
"item": "<string>",
"quantity": 2,
"amount": "100"
}
]
},
"pub_key": "<string>",
"expires_at": "2023-10-15T12:15:30Z"
}
}PaymentLinks
Activate a draft invoice
Transitions an invoice from draft status to active and sends email notification to customer
POST
/
v1
/
payments
/
links
/
{id}
/
activate
Activate a draft invoice
curl --request POST \
--url https://api.sandbox.busha.so/v1/payments/links/{id}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.busha.so/v1/payments/links/{id}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.busha.so/v1/payments/links/{id}/activate', 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.sandbox.busha.so/v1/payments/links/{id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sandbox.busha.so/v1/payments/links/{id}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.busha.so/v1/payments/links/{id}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.busha.so/v1/payments/links/{id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "message for success",
"data": {
"id": "bus_123456789",
"profile_id": "bus_123456789",
"fixed": false,
"one_time": false,
"link": "https://pay.busha.io/charges/123456789",
"name": "Payment Link",
"title": "<string>",
"description": "<string>",
"target_currency": "BTC",
"created_at": "2023-10-15T12:15:30Z",
"updated_at": "2023-10-15T12:15:30Z",
"quote_amount": "100",
"quote_currency": "BTC",
"target_amount": "100",
"meta": {
"images": [
"<string>"
],
"allow_customer_amount": true,
"amount_limit": {
"min_amount": "100",
"max_amount": "100"
},
"allow_quantity_selection": true,
"require_extra_info": [
{
"field_name": "<string>",
"required": true
}
],
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"note": "<string>",
"items": [
{
"item": "<string>",
"quantity": 2,
"amount": "100"
}
]
},
"pub_key": "<string>",
"expires_at": "2023-10-15T12:15:30Z"
}
}Authorizations
Bearer Authentication
Headers
User profile header
Example:
"BUS_YOK8tp5Zga01qOKEsqp07"
Path Parameters
Example:
"bus_123456789"
⌘I