Send Payment Link
Endpoint for sending a Payment Link to your end-user via email.
info
Please be aware that this endpoint requires a Manage Payment Links API Key.
POST /api/v1/groups/{group_id}/payment-links/{payment_link_id}/send
Request Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| Email address the Payment Link is sent to. | string | Required |
Response
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request / Validation error |
| 500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
send.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'POST',
headers: headers,
redirect: 'follow',
body: {
// request body data
}
};
const group_id = '';
const payment_link_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/payment-links/${payment_link_id}/send`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
send.py
import requests
group_id = ""
payment_link_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/"+group_id+"/payment-links/"+payment_link_id+"/send"
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("POST", url, headers=headers, json={
// request body data
})
print(response.text)
send.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
const payment_link_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/payment-links/" + payment_link_id + "/send"
client := &http.Client{}
body := bytes.NewBuffer(nil)
_ = json.NewEncoder(body).Encode(map[string]any{
// body data
})
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Request
{
"email": "end-user@example.com"
}
Example Success Response
The response body will be null, the status code is 200.