PUT
/
payment-services
/
{payment_service_id}
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.PaymentServices.UpdateAsync(
    paymentServiceId: "fffd152a-9532-4087-9a4f-de58754210f0",
    paymentServiceUpdate: new PaymentServiceUpdate() {
        SettlementReportingEnabled = true,
    }
);

// handle response
{
  "type": "payment-service",
  "id": "fffd152a-9532-4087-9a4f-de58754210f0",
  "merchant_account_id": "default",
  "payment_service_definition_id": "stripe-card",
  "active": true,
  "method": "card",
  "display_name": "Stripe",
  "position": 1,
  "status": "created",
  "accepted_currencies": [
    "USD",
    "EUR",
    "GBP"
  ],
  "accepted_countries": [
    "US",
    "DE",
    "GB"
  ],
  "payment_method_tokenization_enabled": true,
  "network_tokens_enabled": true,
  "open_loop": true,
  "settlement_reporting_enabled": true,
  "three_d_secure_enabled": true,
  "merchant_profile": {},
  "webhook_url": "<string>",
  "fields": [
    {
      "key": "api_key",
      "value": "key-12345"
    }
  ],
  "reporting_fields": [
    {
      "key": "api_key",
      "value": "key-12345"
    }
  ],
  "is_deleted": false,
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00"
}
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.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Path Parameters

payment_service_id
string<uuid>
required

the ID of the payment service

Examples:

"fffd152a-9532-4087-9a4f-de58754210f0"

Body

application/json

Request body for updating a Payment Service

display_name
string | null

The display name for the payment service.

Required string length: 1 - 200
Examples:

"Stripe"

fields
VoidableField · object[] | null

The non-secret credential fields that have been configured for this payment service. Any secret fields are omitted.

reporting_fields
VoidableField · object[] | null

The non-secret reporting fields that have been configured for this payment service. Any secret fields are omitted.

position
integer | null

Deprecated field used to define the order in which to process payment services

Examples:

1

accepted_currencies
string[] | null

A list of currencies for which this service is enabled, in ISO 4217 three-letter code format.

Minimum length: 1
Examples:
["USD", "EUR", "GBP"]
accepted_countries
string[] | null

A list of countries for which this service is enabled, in ISO two-letter code format.

Minimum length: 1
Examples:
["US", "DE", "GB"]
active
boolean | null
default:true

Defines if this payment service is currently active.

Examples:

true

false

three_d_secure_enabled
boolean | null

Defines if this payment service has 3DS enabled.

Examples:

true

merchant_profile
object | null

An object containing a key for each supported card schemes, and for each key an object with the 3DS profile for this service for that scheme.

payment_method_tokenization_enabled
boolean | null

Defines if this payment service support payment method tokenization.

Examples:

true

network_tokens_enabled
boolean | null

Defines if this payment service supports network tokens.

Examples:

true

open_loop
boolean | null

Defines if this payment service is open loop.

Examples:

true

settlement_reporting_enabled
boolean
default:false

Defines if this payment service has settlement reporting enabled.

Examples:

true

Response

Successful Response

merchant_account_id
string
required

The ID of the merchant account this job belongs to.

Examples:

"default"

payment_service_definition_id
string
required

The definition ID of the service that has been configured.

Required string length: 1 - 50
Examples:

"stripe-card"

method
enum<string>
required

The payment method that this service supports.

Available options:
abitab,
affirm,
afterpay,
alipay,
alipayhk,
applepay,
arcuspaynetwork,
bacs,
bancontact,
banked,
bcp,
becs,
bitpay,
blik,
boleto,
boost,
card,
cashapp,
chaseorbital,
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,
ideal,
kakaopay,
kcp,
khipu,
klarna,
latitude,
latitudeds,
laybuy,
linepay,
linkaja,
maybankqrpay,
mercadopago,
multibanco,
multipago,
nequi,
netbanking,
network-token,
nupay,
oney_10x,
oney_12x,
oney_3x,
oney_4x,
oney_6x,
ovo,
oxxo,
p24,
pagoefectivo,
payid,
paymaya,
paypal,
paypalpaylater,
payto,
payvalida,
picpay,
pix,
pse,
rabbitlinepay,
razorpay,
rapipago,
redpagos,
scalapay,
sepa,
servipag,
shopeepay,
singteldash,
smartpay,
sofort,
spei,
stitch,
stripedd,
stripetoken,
tapi,
tapifintechs,
thaiqr,
touchngo,
truemoney,
trustly,
trustlyeurope,
upi,
venmo,
vipps,
waave,
webpay,
wechat,
yape,
zippay
Examples:

"card"

display_name
string
required

The display name for the payment service.

Required string length: 1 - 200
Examples:

"Stripe"

position
integer
required

Deprecated field used to define the order in which to process payment services

Examples:

1

accepted_currencies
string[]
required

A list of currencies for which this service is enabled, in ISO 4217 three-letter code format.

Examples:
["USD", "EUR", "GBP"]
accepted_countries
string[]
required

A list of countries for which this service is enabled, in ISO two-letter code format.

Examples:
["US", "DE", "GB"]
payment_method_tokenization_enabled
boolean
required

Defines if this payment service support payment method tokenization.

Examples:

true

network_tokens_enabled
boolean
required

Defines if this payment service supports network tokens.

Examples:

true

open_loop
boolean
required

Defines if this payment service is open loop.

Examples:

true

settlement_reporting_enabled
boolean
required

Defines if this payment service has settlement reporting enabled.

Examples:

true

created_at
string<date-time>
required

The date and time when this payment service was first created in our system.

Examples:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

The date and time when this payment service was last updated in our system.

Examples:

"2013-07-16T19:23:00.000+00:00"

type
string
default:payment-service

Always payment-service

Allowed value: "payment-service"
Examples:

"payment-service"

id
string<uuid>
default:The ID of the payment service
Examples:

"fffd152a-9532-4087-9a4f-de58754210f0"

active
boolean
default:true

Defines if this payment service is currently active.

Examples:

true

false

status
enum<string>
default:The current status of this service.
Available options:
pending,
created,
failed
Examples:

"created"

three_d_secure_enabled
boolean | null

Defines if this payment service has 3DS enabled.

Examples:

true

merchant_profile
object | null

An object containing a key for each supported card schemes, and for each key an object with the 3DS profile for this service for that scheme.

webhook_url
string | null

The URL that needs to be configured with this payment service as the receiving endpoint for webhooks from the service to our system. Currently, we dp not yet automatically register webhooks on setup, and therefore webhooks need to be registered manually by the merchant.

fields
Field · object[] | null

The non-secret credential fields that have been configured for this payment service. Any secret fields are omitted.

reporting_fields
Field · object[] | null

The non-secret reporting fields that have been configured for this payment service. Any secret fields are omitted.

is_deleted
boolean
default:false

Defines if this payment service has been deleted

Examples:

false