PUT
/
merchant-accounts
/
{merchant_account_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.MerchantAccounts.UpdateAsync(
    merchantAccountId: "merchant-12345",
    merchantAccountUpdate: new MerchantAccountUpdate() {
        AccountUpdaterEnabled = true,
        AsyncNetworkTokensEnabled = true,
    }
);

// handle response
{
  "type": "merchant-account",
  "id": "merchant-12345",
  "display_name": "John Doe",
  "loon_client_key": "client-key-1234",
  "loon_secret_key": "key-12345",
  "loon_accepted_schemes": [
    "visa"
  ],
  "account_updater_request_encryption_key": "key-1234",
  "account_updater_request_encryption_key_id": "key-id-1234",
  "account_updater_response_decryption_key": "key-1234",
  "account_updater_response_decryption_key_id": "key-id-1234",
  "account_updater_enabled": true,
  "over_capture_amount": 1299,
  "over_capture_percentage": 25,
  "visa_network_tokens_requestor_id": "id-12345",
  "visa_network_tokens_app_id": "id-12345",
  "amex_network_tokens_requestor_id": "id-12345",
  "amex_network_tokens_app_id": "id-12345",
  "mastercard_network_tokens_requestor_id": "id-12345",
  "mastercard_network_tokens_app_id": "id-12345",
  "async_network_tokens_enabled": true,
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00"
}
This endpoint requires the merchant-accounts.write scope.

Authorizations

Authorization
string
header
required

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

Path Parameters

merchant_account_id
string
required

The ID of the merchant account

Examples:

"merchant-12345"

Body

application/json
account_updater_enabled
boolean
default:false

Whether the Real-Time Account Updater service is enabled for this merchant account. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to false, the Account Updater service doesn't get called if a payment fails with expired or invalid card details. If the field is set to true, the service is called. Please note that for this to work the other account_updater_* fields must be set as well.

Examples:

true

account_updater_request_encryption_key
string | null

The public key used to encrypt the request to the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-1234"

account_updater_request_encryption_key_id
string | null

The ID of the key used to encrypt the request to the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-id-1234"

account_updater_response_decryption_key
string | null

The key used to decrypt the response from the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-1234"

account_updater_response_decryption_key_id
string | null

The ID of the key used to decrypt the request from the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-id-1234"

over_capture_amount
integer | null

The maximum monetary amount allowed for over-capture, in the smallest currency unit, for example 1299 cents to allow for an over-capture of $12.99.

Required range: 0 <= x <= 99999999
Examples:

1299

over_capture_percentage
integer | null

The maximum percentage allowed for over-capture, for example 25 to allow for an over-capture of 25% of the original transaction amount.

Required range: 0 <= x <= 99999999
Examples:

25

loon_client_key
string | null

Client key provided by Pagos to authenticate to the Loon API. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:

"client-key-1234"

loon_secret_key
string | null

Secret key provided by Pagos to authenticate to the Loon API. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:

"key-12345"

loon_accepted_schemes
enum<string>[] | null

Card schemes accepted when creating jobs using this set of Loon API keys. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:
["visa"]
visa_network_tokens_requestor_id
string | null

Requestor ID provided for Visa after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

visa_network_tokens_app_id
string | null

Application ID provided for Visa after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

amex_network_tokens_requestor_id
string | null

Requestor ID provided for American Express after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

amex_network_tokens_app_id
string | null

Application ID provided for American Express after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

mastercard_network_tokens_requestor_id
string | null

Requestor ID provided for Mastercard after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

mastercard_network_tokens_app_id
string | null

Application ID provided for Mastercard after onboarding to use Network Tokens.

Maximum length: 300
Examples:

"id-12345"

async_network_tokens_enabled
boolean
default:false

When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.

Examples:

true

false

display_name
string | null

The display name for the merchant account.

Required string length: 1 - 255
Examples:

"Example"

Response

Successful Response

id
string
required

The ID for the merchant account.

Required string length: 1 - 50
Examples:

"merchant-12345"

display_name
string
required

The display name for the buyer.

Required string length: 1 - 255
Examples:

"John Doe"

account_updater_enabled
boolean
required

Whether the Real-Time Account Updater service is enabled for this merchant account. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to false, the Account Updater service doesn't get called if a payment fails with expired or invalid card details. If the field is set to true, the service is called. Please note that for this to work the other account_updater_* fields must be set as well.

Examples:

true

created_at
string<date-time>
required

The date this merchant account was created at.

Examples:

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

updated_at
string<date-time>
required

The date this merchant account was last updated at.

Examples:

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

type
string
default:merchant-account

Always merchant-account.

Allowed value: "merchant-account"
Examples:

"merchant-account"

loon_client_key
string | null

Client key provided by Pagos to authenticate to the Loon API. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:

"client-key-1234"

loon_secret_key
string | null

Secret key provided by Pagos to authenticate to the Loon API. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:

"key-12345"

loon_accepted_schemes
enum<string>[] | null

Card schemes accepted when creating jobs using this set of Loon API keys. Loon is the Account Updater service we use and if the field is not set or if it's set to null, the Account Updater service doesn't get configured. If the field is set to null, the other loon_* fields must be set to null as well.

Examples:
["visa"]
account_updater_request_encryption_key
string | null

The public key used to encrypt the request to the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-1234"

account_updater_request_encryption_key_id
string | null

The ID of the key used to encrypt the request to the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-id-1234"

account_updater_response_decryption_key
string | null

The key used to decrypt the response from the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-1234"

account_updater_response_decryption_key_id
string | null

The ID of the key used to decrypt the request from the Real-Time Account Updater service. The Account Updater service is used to update card details when cards are lost, stolen or expired. If the field is not set or if it's set to null, the Account Updater service doesn't get called. If the field is set, the other account_updater_* fields must be set as well.

Examples:

"key-id-1234"

over_capture_amount
integer | null

The maximum monetary amount allowed for over-capture, in the smallest currency unit, for example 1299 cents to allow for an over-capture of $12.99.

Examples:

1299

over_capture_percentage
integer | null

The maximum percentage allowed for over-capture, for example 25 to allow for an over-capture of 25% of the original transaction amount.

Examples:

25

visa_network_tokens_requestor_id
string | null

Requestor ID provided for Visa after onboarding to use Network Tokens.

Examples:

"id-12345"

visa_network_tokens_app_id
string | null

Application ID provided for Visa after onboarding to use Network Tokens.

Examples:

"id-12345"

amex_network_tokens_requestor_id
string | null

Requestor ID provided for American Express after onboarding to use Network Tokens.

Examples:

"id-12345"

amex_network_tokens_app_id
string | null

Application ID provided for American Express after onboarding to use Network Tokens.

Examples:

"id-12345"

mastercard_network_tokens_requestor_id
string | null

Requestor ID provided for Mastercard after onboarding to use Network Tokens.

Examples:

"id-12345"

mastercard_network_tokens_app_id
string | null

Application ID provided for Mastercard after onboarding to use Network Tokens.

Examples:

"id-12345"

async_network_tokens_enabled
boolean
default:false

When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.

Examples:

true

false