import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.paymentMethods.list();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/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}/payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/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": [
{
"provider": "nowpayments",
"name": "NOWPayments",
"kind": "crypto",
"blurb": "Accept crypto through your NOWPayments account. Payouts go to your wallet. NOWPayments charges its own fee of 0.5% to 1%.",
"tagline": "Accept crypto at checkout, paid out to your own wallet.",
"accent": "#64acff",
"site": "https://account.nowpayments.io/",
"callbackUrl": "http://localhost:8000/api/payments/nowpayments/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": false,
"enabled": false,
"usable": false,
"ready": false,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Cryptocurrency (NOWPayments)",
"defaultLabel": "Cryptocurrency (NOWPayments)",
"fields": [
{
"name": "api_key",
"label": "API Key",
"placeholder": "XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
},
{
"name": "ipn_secret",
"label": "IPN Secret Key",
"placeholder": "",
"required": true,
"max": 255,
"secret": true,
"showCallback": true,
"mode": "",
"isSet": false,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask crypto buyers for their name and address at checkout.",
"group": "",
"needs": "",
"on": false
}
],
"unpaidHours": null,
"updatedAt": null
},
{
"provider": "stripe",
"name": "Stripe",
"kind": "fiat",
"blurb": "Accept cards through your Stripe account. iDEAL and Bancontact also appear on orders priced in euros.",
"tagline": "Accept cards on your checkout, paid into your Stripe account.",
"accent": "#635bff",
"site": "https://dashboard.stripe.com/apikeys",
"callbackUrl": "http://localhost:8000/api/payments/stripe/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": false,
"enabled": false,
"usable": false,
"ready": false,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (Stripe)",
"defaultLabel": "Credit/Debit Card (Stripe)",
"fields": [
{
"name": "secret_key",
"label": "Secret Key",
"placeholder": "sk_live_... or rk_live_...",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
},
{
"name": "publishable_key",
"label": "Publishable Key",
"placeholder": "pk_live_...",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask card buyers for their name and billing address at checkout.",
"group": "",
"needs": "",
"on": false
}
],
"unpaidHours": null,
"updatedAt": null
}
],
"meta": {
"order": [],
"balance": {
"enabled": false,
"holders": 0
},
"unpaid": {
"hours": 24,
"presets": [
1,
2
],
"least": 1,
"most": 336
},
"routing": {
"providers": []
}
}
}{
"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": {}
}List payment methods
Every payment method Shoply supports, and for each whether this store has connected it and switched it on, in the order its checkout offers them. Never a method’s credentials. meta.balance says whether buyers may pay with their store balance. A method’s name here is the name the rest of the API uses for it. meta.order is every method the store has connected and every custom payment method it has (paid outside Shoply: “List custom payment methods”), by name or id, in the checkout’s one order. Each method’s unpaidHours is its own time for an unpaid order, or null for the store’s, which is meta.unpaid.hours; meta.routing.providers is the card methods Payment Routing chooses between.
Needs the payments.read permission (Read Payment Methods).
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.paymentMethods.list();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->paymentMethods->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.paymentMethods.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/payment-methods \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/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}/payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/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": [
{
"provider": "nowpayments",
"name": "NOWPayments",
"kind": "crypto",
"blurb": "Accept crypto through your NOWPayments account. Payouts go to your wallet. NOWPayments charges its own fee of 0.5% to 1%.",
"tagline": "Accept crypto at checkout, paid out to your own wallet.",
"accent": "#64acff",
"site": "https://account.nowpayments.io/",
"callbackUrl": "http://localhost:8000/api/payments/nowpayments/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": false,
"enabled": false,
"usable": false,
"ready": false,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Cryptocurrency (NOWPayments)",
"defaultLabel": "Cryptocurrency (NOWPayments)",
"fields": [
{
"name": "api_key",
"label": "API Key",
"placeholder": "XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
},
{
"name": "ipn_secret",
"label": "IPN Secret Key",
"placeholder": "",
"required": true,
"max": 255,
"secret": true,
"showCallback": true,
"mode": "",
"isSet": false,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask crypto buyers for their name and address at checkout.",
"group": "",
"needs": "",
"on": false
}
],
"unpaidHours": null,
"updatedAt": null
},
{
"provider": "stripe",
"name": "Stripe",
"kind": "fiat",
"blurb": "Accept cards through your Stripe account. iDEAL and Bancontact also appear on orders priced in euros.",
"tagline": "Accept cards on your checkout, paid into your Stripe account.",
"accent": "#635bff",
"site": "https://dashboard.stripe.com/apikeys",
"callbackUrl": "http://localhost:8000/api/payments/stripe/callback/743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"returnOrigin": "",
"originHint": "",
"callbackHint": "",
"copies": [],
"authorizeUrl": "",
"connected": false,
"enabled": false,
"usable": false,
"ready": false,
"testMode": false,
"modes": [],
"mode": "",
"label": "",
"buyerLabel": "Credit/Debit Card (Stripe)",
"defaultLabel": "Credit/Debit Card (Stripe)",
"fields": [
{
"name": "secret_key",
"label": "Secret Key",
"placeholder": "sk_live_... or rk_live_...",
"required": true,
"max": 255,
"secret": true,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
},
{
"name": "publishable_key",
"label": "Publishable Key",
"placeholder": "pk_live_...",
"required": true,
"max": 255,
"secret": false,
"showCallback": false,
"mode": "",
"isSet": false,
"value": ""
}
],
"toggles": [
{
"name": "require_billing",
"label": "Require Billing Information",
"hint": "Ask card buyers for their name and billing address at checkout.",
"group": "",
"needs": "",
"on": false
}
],
"unpaidHours": null,
"updatedAt": null
}
],
"meta": {
"order": [],
"balance": {
"enabled": false,
"holders": 0
},
"unpaid": {
"hours": 24,
"presets": [
1,
2
],
"least": 1,
"most": 336
},
"routing": {
"providers": []
}
}
}{
"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.

