Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.customMethods.list();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->customMethods->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.customMethods.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods"
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.shoply.gg/v1/stores/{storeId}/custom-payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods")
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{
"success": true,
"message": null,
"code": null,
"data": [
{
"id": "custom_1e22c55a4dc40fc7",
"kind": "redirect",
"name": "Pay on Our Site",
"description": "",
"instructions": "",
"redirectUrl": "https://pay.example.com/checkout?order={order}",
"iconUrl": null,
"asksProof": false,
"requiresPicture": false,
"enabled": true
},
{
"id": "custom_c009621ccc3e9d74",
"kind": "instructions",
"name": "Bank Transfer (EU)",
"description": "One to two working days",
"instructions": "Send **{amount} {currency}** to DE89 3704 0044 0532 0130 00, with `{order}` as the reference.",
"redirectUrl": "",
"iconUrl": null,
"asksProof": false,
"requiresPicture": false,
"enabled": true
}
],
"meta": {
"max": 10,
"variables": [
"order",
"amount"
]
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Custom payment methods
List custom payment methods
The store’s custom payment methods. Where each stands at checkout among the connected methods is meta.order in “List payment methods”. meta.max is how many a store may have, and meta.variables the words its instructions and address may fill in.
Needs the payments.read permission (Read Payment Methods).
GET
/
stores
/
{storeId}
/
custom-payment-methods
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.customMethods.list();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->customMethods->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.customMethods.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods"
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.shoply.gg/v1/stores/{storeId}/custom-payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/custom-payment-methods")
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{
"success": true,
"message": null,
"code": null,
"data": [
{
"id": "custom_1e22c55a4dc40fc7",
"kind": "redirect",
"name": "Pay on Our Site",
"description": "",
"instructions": "",
"redirectUrl": "https://pay.example.com/checkout?order={order}",
"iconUrl": null,
"asksProof": false,
"requiresPicture": false,
"enabled": true
},
{
"id": "custom_c009621ccc3e9d74",
"kind": "instructions",
"name": "Bank Transfer (EU)",
"description": "One to two working days",
"instructions": "Send **{amount} {currency}** to DE89 3704 0044 0532 0130 00, with `{order}` as the reference.",
"redirectUrl": "",
"iconUrl": null,
"asksProof": false,
"requiresPicture": false,
"enabled": true
}
],
"meta": {
"max": 10,
"variables": [
"order",
"amount"
]
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.

