Skip to main content
POST
/
payment-services
/
verify
Verify payment service credentials
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/payment-services/verify");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n  \"payment_service_definition_id\": \"stripe-card\",\n  \"fields\": [\n    {\n      \"key\": \"private_key\",\n      \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "type": "error",
  "code": "bad_request",
  "status": 400,
  "message": "Missing '****' field",
  "details": [
    {
      "location": "body",
      "type": "value_error.missing",
      "pointer": "/payment_method/number",
      "message": "field required"
    }
  ]
}
This endpoint requires the payment-services.write scope.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for verifying credentials against a payment service.

payment_service_definition_id
string
required

The ID of the payment service to use.

Required string length: 1 - 50
Example:

"stripe-card"

fields
object[]
required

A list of fields where each field is a key-value pair that represents a defined field in the definition of the payment service. You are not required to send the full list of fields if the credentials for the payment service are already stored. For example, if your credentials for stripe-card are stored and you only provide a secret_key in the request, it will override the stored secret_key and verify the resulting set of credentials against the payment service.

payment_service_id
string<uuid>

The ID of the payment service. Required if sending a partial set of credentials in the fields property.

Example:

"46973e9d-88a7-44a6-abfe-be4ff0134ff4"

Response

Returns 200 OK if credentials successfully verified.