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,
}
);
// 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",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
Update info for a merchant account in an instance.
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,
}
);
// 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",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
merchant-accounts.write
scope.Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the merchant account
"merchant-12345"
Successful Response
The response is of type object
.
Was this page helpful?