Look up payment configurations
Commerce provides a REST endpoint that your OSF applications can use to return configuration information about your sites' payment gateways.
You can use the getPaymentConfigurations
endpoint in the Store API
to return information about the payment gateways for a site. For
example:
GET /ccstore/v1/merchant/paymentConfigurations HTTP/1.1
x-ccsite: 100002
The response is similar to the following:
{
"settings": [
{
"paymentMethods": "card",
"enabledForScheduledOrder": false,
"enabledForApproval": false
}
],
"paymentMethods": [
"physicalGiftCard",
"card"
],
"links": [
{
"rel": "self",
"href": "http://myserver.example.com:7003/ccstore/v1/merchant/paymentConfigurations"
}
]
}
Note that the endpoint returns configuration information only for
gateway integrations that are enabled on the site. If a site is not specified with the
x-ccsite
header, the endpoint returns the gateway configuration for the
default site. The endpoint returns only those properties whose public
attribute is set to true
in the gateway extension's
config.json
file.