List recurring plans
curl --request GET \
--url https://api.paymentsmojo.com/recurring-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paymentsmojo.com/recurring-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paymentsmojo.com/recurring-plans', 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.paymentsmojo.com/recurring-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.paymentsmojo.com/recurring-plans"
req, _ := http.NewRequest("GET", 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.get("https://api.paymentsmojo.com/recurring-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymentsmojo.com/recurring-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mid": "<string>",
"locationName": "<string>",
"description": "<string>",
"reference": "<string>",
"poNumber": "<string>",
"amount": 123,
"frequency": "<string>",
"startDate": "2023-12-25",
"totalPayments": 123,
"paymentsMade": 123,
"nextChargeDate": "2023-12-25",
"terms": "<string>",
"status": "<string>",
"customerName": "<string>",
"customerCompany": "<string>",
"customerEmail": "<string>",
"customerPhone": "<string>",
"delivery": "<string>",
"sentVia": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"sendProblem": "<string>",
"memo": "<string>",
"lines": 123,
"cardLastFour": "<string>",
"cardExpiry": "<string>",
"authorizedAt": "2023-11-07T05:31:56Z",
"authorizedByName": "<string>",
"failedAttempts": 123,
"problem": "<string>",
"pausedAt": "2023-11-07T05:31:56Z",
"pausedByName": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelledBy": "<string>",
"cancelledByName": "<string>",
"cancelReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdByName": "<string>",
"link": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"unitCost": 123,
"uom": "<string>",
"commodityCode": "<string>",
"upc": "<string>"
}
],
"charges": [
{
"period": 123,
"attempt": 123,
"scheduledFor": "2023-11-07T05:31:56Z",
"amount": 123,
"initiated": "<string>",
"status": "<string>",
"retRef": "<string>",
"authCode": "<string>",
"lastFour": "<string>",
"message": "<string>",
"level3Sent": true,
"attemptedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"page": 123,
"pageSize": 123,
"total": 123,
"sort": "<string>",
"dir": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}Recurring plans
List recurring plans
Recurring payment plans, a page at a time. q searches description, reference, PO, customer company, name, email and phone, note, MID, location and amount; status keeps one: PendingSetup, Active, Paused, Cancelled, Completed or Failed.
GET
/
recurring-plans
List recurring plans
curl --request GET \
--url https://api.paymentsmojo.com/recurring-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paymentsmojo.com/recurring-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paymentsmojo.com/recurring-plans', 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.paymentsmojo.com/recurring-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.paymentsmojo.com/recurring-plans"
req, _ := http.NewRequest("GET", 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.get("https://api.paymentsmojo.com/recurring-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymentsmojo.com/recurring-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mid": "<string>",
"locationName": "<string>",
"description": "<string>",
"reference": "<string>",
"poNumber": "<string>",
"amount": 123,
"frequency": "<string>",
"startDate": "2023-12-25",
"totalPayments": 123,
"paymentsMade": 123,
"nextChargeDate": "2023-12-25",
"terms": "<string>",
"status": "<string>",
"customerName": "<string>",
"customerCompany": "<string>",
"customerEmail": "<string>",
"customerPhone": "<string>",
"delivery": "<string>",
"sentVia": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"sendProblem": "<string>",
"memo": "<string>",
"lines": 123,
"cardLastFour": "<string>",
"cardExpiry": "<string>",
"authorizedAt": "2023-11-07T05:31:56Z",
"authorizedByName": "<string>",
"failedAttempts": 123,
"problem": "<string>",
"pausedAt": "2023-11-07T05:31:56Z",
"pausedByName": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelledBy": "<string>",
"cancelledByName": "<string>",
"cancelReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdByName": "<string>",
"link": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"unitCost": 123,
"uom": "<string>",
"commodityCode": "<string>",
"upc": "<string>"
}
],
"charges": [
{
"period": 123,
"attempt": 123,
"scheduledFor": "2023-11-07T05:31:56Z",
"amount": 123,
"initiated": "<string>",
"status": "<string>",
"retRef": "<string>",
"authCode": "<string>",
"lastFour": "<string>",
"message": "<string>",
"level3Sent": true,
"attemptedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"page": 123,
"pageSize": 123,
"total": 123,
"sort": "<string>",
"dir": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": {}
}