Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const { data: types } = await client.paymentMethods.types()spree api get /payment_methods/types{
"data": [
{
"type": "bogus",
"label": "Bogus",
"description": null,
"schema": {
"type": "object",
"properties": {
"dummy_key": {
"type": "string",
"default": "PUBLICKEY123"
},
"dummy_secret_key": {
"type": [
"string",
"null"
],
"x-spree-secret": true
}
},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": true,
"installed": false
},
{
"type": "check",
"label": "Check",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": true
},
{
"type": "custom_payment_source_method",
"label": "Custom Payment Source Method",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": false
},
{
"type": "store_credit",
"label": "Store Credit",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": true
}
]
}List available payment provider types
Returns every registered payment provider with the JSON Schema of its preferences. installed marks a provider the store already has, which a “Provider” picker leaves out.
Required scope: read_settings (for API-key authentication).
GET
/
api
/
v3
/
admin
/
payment_methods
/
types
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const { data: types } = await client.paymentMethods.types()spree api get /payment_methods/types{
"data": [
{
"type": "bogus",
"label": "Bogus",
"description": null,
"schema": {
"type": "object",
"properties": {
"dummy_key": {
"type": "string",
"default": "PUBLICKEY123"
},
"dummy_secret_key": {
"type": [
"string",
"null"
],
"x-spree-secret": true
}
},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": true,
"installed": false
},
{
"type": "check",
"label": "Check",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": true
},
{
"type": "custom_payment_source_method",
"label": "Custom Payment Source Method",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": false
},
{
"type": "store_credit",
"label": "Store Credit",
"description": null,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"logo_url": null,
"docs_url": null,
"third_party": false,
"installed": true
}
]
}Was this page helpful?
⌘I

