mutation sendPaymentPlanSessionLinkAuthenticated
Sends the payment plan session's link to the customer via the requested channel. The session must be Active. Fails when no recipient is available — either the contact lacks an email/phone for the chosen channel and no `to` override was provided.
Returns OperationSuccess!
Arguments
| Argument | Type | Description |
|---|---|---|
input | SendPaymentPlanSessionLinkInput! |
Example request
curl -X POST 'https://graph.clientloop.com/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{
"query": "mutation SendPaymentPlanSessionLink($input: SendPaymentPlanSessionLinkInput!) { sendPaymentPlanSessionLink(input: $input) { success message } }",
"variables": {
"input": {
"id": "abc123",
"channel": "Email"
}
}
}'const response = await fetch('https://graph.clientloop.com/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <api-key>',
},
body: JSON.stringify({
query: `
mutation SendPaymentPlanSessionLink($input: SendPaymentPlanSessionLinkInput!) {
sendPaymentPlanSessionLink(input: $input) {
success
message
}
}
`,
variables: {
"input": {
"id": "abc123",
"channel": "Email"
}
},
}),
});
const { data, errors } = await response.json();<?php
$body = <<<'JSON'
{
"query": "mutation SendPaymentPlanSessionLink($input: SendPaymentPlanSessionLinkInput!) { sendPaymentPlanSessionLink(input: $input) { success message } }",
"variables": {
"input": {
"id": "abc123",
"channel": "Email"
}
}
}
JSON;
$ch = curl_init('https://graph.clientloop.com/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <api-key>',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var body = """
{
"query": "mutation SendPaymentPlanSessionLink($input: SendPaymentPlanSessionLinkInput!) { sendPaymentPlanSessionLink(input: $input) { success message } }",
"variables": {
"input": {
"id": "abc123",
"channel": "Email"
}
}
}
""";
var request = HttpRequest.newBuilder(URI.create("https://graph.clientloop.com/"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <api-key>")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());using System.Net.Http;
using System.Text;
var body = """
{
"query": "mutation SendPaymentPlanSessionLink($input: SendPaymentPlanSessionLinkInput!) { sendPaymentPlanSessionLink(input: $input) { success message } }",
"variables": {
"input": {
"id": "abc123",
"channel": "Email"
}
}
}
""";
using var client = new HttpClient();
using var content = new StringContent(body, Encoding.UTF8, "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer <api-key>");
var response = await client.PostAsync("https://graph.clientloop.com/", content);
var result = await response.Content.ReadAsStringAsync();Types
input SendPaymentPlanSessionLinkInput
| Field | Type | Description |
|---|---|---|
id | ID! | |
channel | PaymentSessionLinkChannel! | Channel used for delivery. Determines which recipient field on the session's contact is read. |
to | String | Optional recipient override for one-off sends or resending to a different address. When omitted, the link is sent to the contact's email (for `Email`) or phone (for `Phone`). When provided, must be a valid email for `Email` or an E.164 phone for `Phone`. |
type OperationSuccess
Operational return type representing success or failure with a message.
| Field | Type | Description |
|---|---|---|
success | Boolean! | |
message | String |
enum PaymentSessionLinkChannel
Channel used to deliver a session link to the merchant's customer.
EmailPhone