Skip to main content
GET
/
payment-service-definitions
/
{payment_service_definition_id}
Get payment service definition
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}"

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.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}")
.header("Authorization", "Bearer <token>")
.asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}",
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;
}
import requests

url = "https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payment-service-definitions/{payment_service_definition_id} \
--header 'Authorization: Bearer <token>'
{
  "id": "stripe-card",
  "type": "payment-service-definition",
  "display_name": "Stripe",
  "method": "card",
  "fields": [
    {
      "key": "private_api_key",
      "display_name": "Private API key",
      "required": true,
      "format": "text",
      "secret": true
    }
  ],
  "reporting_fields": [
    {
      "key": "username",
      "display_name": "Reporting Username",
      "required": true,
      "format": "text",
      "secret": true
    }
  ],
  "supported_currencies": [
    "USD",
    "GBP",
    "EUR"
  ],
  "supported_countries": [
    "US",
    "GB",
    "DE"
  ],
  "mode": "card",
  "supported_features": {
    "delayed_capture": false,
    "digital_wallets": false,
    "network_tokens_default": true,
    "network_tokens_toggle": false,
    "open_loop": true,
    "open_loop_toggle": false,
    "partial_refunds": false,
    "payment_method_tokenization": true,
    "payment_method_tokenization_toggle": false,
    "refunds": true,
    "requires_webhook_setup": true,
    "three_d_secure_hosted": true,
    "three_d_secure_pass_through": false,
    "verify_credentials": false,
    "void": true
  },
  "icon_url": "https://cdn.gr4vy.app/stripe.svg",
  "configuration": {
    "approval_ui_height": "300px",
    "approval_ui_width": "300px",
    "approval_ui_target": "any"
  }
}
{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}
{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}
This endpoint requires the payment-service-definitions.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

payment_service_definition_id
string
required

The unique ID of the payment service definition.

Example:

"stripe-card"

Response

Returns a payment service definition.

An available payment service that can be configured.

id
string

The ID of the payment service. This is the underlying provider followed by a dash followed by the payment method ID.

Example:

"stripe-card"

type
enum<string>
default:payment-service-definition

payment-service-definition.

Available options:
payment-service-definition
Example:

"payment-service-definition"

display_name
string

The display name of this service.

Example:

"Stripe"

method
enum<string>

The ID of the payment method that this services handles.

Available options:
affirm,
afterpay,
alipay,
alipayhk,
applepay,
bacs,
bancontact,
banked,
becs,
bitpay,
boleto,
boost,
card,
cashapp,
chaseorbital,
checkout-session,
clearpay,
click-to-pay,
dana,
dcb,
dlocal,
ebanx,
efecty,
eps,
everydaypay,
gcash,
gem,
gemds,
gift-card,
giropay,
givingblock,
gocardless,
googlepay,
googlepay_pan_only,
gopay,
grabpay,
id,
ideal,
kakaopay,
kcp,
klarna,
latitude,
latitudeds,
laybuy,
linepay,
linkaja,
maybankqrpay,
mercadopago,
multibanco,
multipago,
netbanking,
network-token,
oney_3x,
oney_4x,
oney_6x,
oney_10x,
oney_12x,
ovo,
oxxo,
payid,
paymaya,
paypal,
paypalpaylater,
payto,
venmo,
pix,
pse,
rabbitlinepay,
razorpay,
scalapay,
sepa,
shopeepay,
singteldash,
smartpay,
sofort,
spei,
stripedd,
thaiqr,
touchngo,
truemoney,
trustly,
trustlyeurope,
upi,
vipps,
waave,
webpay,
wechat,
zippay
Example:

"card"

fields
object[]

A list of fields that need to be submitted when activating the payment. service.

Minimum array length: 1
reporting_fields
object[]

A list of fields that need to be submitted when enabling the payment service settlement reporting.

supported_currencies
string[]

A list of three-letter ISO currency codes that this service supports.

Minimum array length: 1
Required string length: 3
Example:
["USD", "GBP", "EUR"]
supported_countries
string[]

A list of two-letter ISO country codes that this service supports.

Minimum array length: 1
Example:
["US", "GB", "DE"]
mode
enum<string>

The mode of this payment service.

Available options:
card,
redirect,
applepay,
googlepay,
click-to-pay,
checkout-session
Example:

"card"

supported_features
object

Features supported by the payment definition.

icon_url
string | null

An icon to display for the payment service.

Example:

"https://cdn.gr4vy.app/stripe.svg"

configuration
Payment Service Definition Context · object

Configuration items for the payment service.