mutation updatePaymentPlanSessionAuthenticated
Updates a payment plan session used by the checkout process to create and authorize a payment plan.
Returns PaymentPlanSession!
Arguments
| Argument | Type | Description |
|---|---|---|
input | UpdatePaymentPlanSessionInput! |
Example request
curl -X POST 'https://graph.clientloop.com/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{
"query": "mutation UpdatePaymentPlanSession($input: UpdatePaymentPlanSessionInput!) { updatePaymentPlanSession(input: $input) { id orgId contactId contact { id orgId ownerId name givenName familyName email phone deletedAt createdAt updatedAt } amount currency status frequency startDate occurrences callbackUrl cancelUrl successUrl link expirationDate paymentPlanId createdAt updatedAt checkoutConfigurationId brandLogoUrl brandName } }",
"variables": {
"input": {
"orgId": "abc123",
"id": "abc123"
}
}
}'const response = await fetch('https://graph.clientloop.com/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <api-key>',
},
body: JSON.stringify({
query: `
mutation UpdatePaymentPlanSession($input: UpdatePaymentPlanSessionInput!) {
updatePaymentPlanSession(input: $input) {
id
orgId
contactId
contact {
id
orgId
ownerId
name
givenName
familyName
email
phone
deletedAt
createdAt
updatedAt
}
amount
currency
status
frequency
startDate
occurrences
callbackUrl
cancelUrl
successUrl
link
expirationDate
paymentPlanId
createdAt
updatedAt
checkoutConfigurationId
brandLogoUrl
brandName
}
}
`,
variables: {
"input": {
"orgId": "abc123",
"id": "abc123"
}
},
}),
});
const { data, errors } = await response.json();<?php
$body = <<<'JSON'
{
"query": "mutation UpdatePaymentPlanSession($input: UpdatePaymentPlanSessionInput!) { updatePaymentPlanSession(input: $input) { id orgId contactId contact { id orgId ownerId name givenName familyName email phone deletedAt createdAt updatedAt } amount currency status frequency startDate occurrences callbackUrl cancelUrl successUrl link expirationDate paymentPlanId createdAt updatedAt checkoutConfigurationId brandLogoUrl brandName } }",
"variables": {
"input": {
"orgId": "abc123",
"id": "abc123"
}
}
}
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 UpdatePaymentPlanSession($input: UpdatePaymentPlanSessionInput!) { updatePaymentPlanSession(input: $input) { id orgId contactId contact { id orgId ownerId name givenName familyName email phone deletedAt createdAt updatedAt } amount currency status frequency startDate occurrences callbackUrl cancelUrl successUrl link expirationDate paymentPlanId createdAt updatedAt checkoutConfigurationId brandLogoUrl brandName } }",
"variables": {
"input": {
"orgId": "abc123",
"id": "abc123"
}
}
}
""";
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 UpdatePaymentPlanSession($input: UpdatePaymentPlanSessionInput!) { updatePaymentPlanSession(input: $input) { id orgId contactId contact { id orgId ownerId name givenName familyName email phone deletedAt createdAt updatedAt } amount currency status frequency startDate occurrences callbackUrl cancelUrl successUrl link expirationDate paymentPlanId createdAt updatedAt checkoutConfigurationId brandLogoUrl brandName } }",
"variables": {
"input": {
"orgId": "abc123",
"id": "abc123"
}
}
}
""";
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 UpdatePaymentPlanSessionInput
| Field | Type | Description |
|---|---|---|
orgId | ID! | ID of the organization this payment session belongs to. |
id | ID! | Unique identifier for the payment plan session. |
contactId | ID | ID of the platform contact associated with this payment plan session |
amount | Amount | Payment amount to be charged on the configured frequency. |
currency | Currency | Currency of the payment |
frequency | PaymentPlanFrequency | Frequency of the payment plan |
startDate | Date | Start date of the payment plan |
occurrences | Int | Number of payment occurrences to be run on the configured frequency from the start date |
callbackUrl | URL | URL to receive payment session events |
cancelUrl | URL | URL to redirect after a payment session is canceled by the customer |
successUrl | URL | URL to redirect after a payment session is completed by the customer |
expirationDate | DateTime | Optional expiration date for the payment session. ISO 8601 format. |
paymentPlanId | ID | ID of the payment plan created by this payment plan session |
status | PaymentPlanSessionStatus | Status of the payment plan session. |
checkoutConfigurationId | ID | The checkout configuration ID to be used for this payment plan session. If a checkout configuration ID is not provided, the default checkout configuration will be used. |
brandLogoUrl | URL | Optional URL to a logo image to display during checkout, overriding the default branding. The caller supplies a URL that is used to render the logo. |
brandName | String | Optional brand or merchant name to display during checkout, overriding the organization name. |
type PaymentPlanSession
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier for this payment plan session |
orgId | ID! | ID of the organization this payment session belongs to |
contactId | ID! | ID of the platform contact associated with this payment plan session |
contact | Contact | Platform contact associated with this payment plan session |
amount | Amount! | Payment amount to be charged on the configured frequency. |
currency | Currency! | Currency of the payment |
status | PaymentPlanSessionStatus! | Status of the payment plan session |
frequency | PaymentPlanFrequency! | Frequency of the payment plan |
startDate | Date! | Start date of the payment plan |
occurrences | Int! | Number of payment occurrences to be run on the configured frequency from the start date |
callbackUrl | URL | URL to receive payment session events |
cancelUrl | URL | URL to redirect after a payment session is canceled by the customer |
successUrl | URL | URL to redirect after a payment session is completed by the customer |
link | URL | Link to the payment plan session. This will be null if the session is expired or completed. This link is used to redirect the user to the payment page or may be used to embedded payment flow depending on the configuration provided. |
expirationDate | DateTime | Optional expiration date for the payment session. ISO 8601 format. |
paymentPlanId | ID | ID of the payment plan created by this payment plan session |
createdAt | DateTime! | Date the payment session was created |
updatedAt | DateTime! | Date the payment session was last updated |
checkoutConfigurationId | ID | The checkout configuration ID used for this payment session. |
brandLogoUrl | URL | Optional caller-supplied URL to a logo image to display during checkout, overriding the default branding. |
brandName | String | Optional caller-supplied brand or merchant name to display during checkout, overriding the organization name. |
scalar Amount
A monetary amount with up to two decimal places. Ex. 111.11
scalar Currency
Three letter ISO 4217 currency code. Ex. USD
enum PaymentPlanFrequency
WeeklyMonthlyQuarterlyYearly
scalar Date
ISO 8601 formatted date in the format YYYY-MM-DD
scalar URL
A URL with protocol and port. ex. https://example.com
scalar DateTime
ISO 8601 formatted date time. Ex. 2023-11-23T14:30:00Z
enum PaymentPlanSessionStatus
ExpiredActiveCompletedCanceled
type Contact
| Field | Type | Description |
|---|---|---|
id | ID! | Unique ID of the contact. |
orgId | ID! | ID of the organization that owns the contact. |
ownerId | ID! | Global ID of the owning organization ( |
name | String! | Full name of the contact. |
givenName | String | Given name of the contact. |
familyName | String | Family name of the contact. |
email | Email | Email address of the contact. |
phone | Phone | Phone number of the contact. This will be validated and normalized to the E.164 format. |
deletedAt | String | Set when the contact has been soft-deleted; null for an active contact. |
createdAt | String! | Date and time when the contact was created. |
updatedAt | String! | Date and time when the contact was last updated. |
scalar Email
An email address
scalar Phone
E.164 formatted phone number. Ex. +14155554345