# Update a Gateway Profile

`POST /v2/gateway-profiles/{id}`

Core API v2, Gateway Profiles.

Update an existing Gateway Profile with the provided details

**Authentication:** Send `Authorization: Bearer <token>`. To authenticate, generate a Secret API Key from your ODUS Dashboard and include it in the `Authorization` header as follows: `Authorization: Bearer <YOUR_SECRET_API_KEY>`

## Parameters

### Path parameters

- `id` (string, required)

## Request body

Content type `application/json`, required.

Type: object (UpdateGatewayProfileRequestDTO).

- `title` (string): Display name for the gateway profile. Example: `Stripe Test mode`.
- `active` (boolean): Whether the gateway profile is active. Example: `true`.
- `configuration` (object (GatewayIntegrationStripeConfigurationDTO) or object (GatewayIntegrationAdyenConfigurationDTO) or object (GatewayIntegrationCheckoutConfigurationDTO) or object (UpdateGatewayIntegrationPaypalConfigurationDTO)): Gateway integration configuration (integrationMode cannot be changed for PayPal)
  - When the value is GatewayIntegrationStripeConfigurationDTO:
    - `type` (string, required): Gateway integration type. One of `stripe`. Default `stripe`. Example: `stripe`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `secretKey` (string, required): Stripe secret key. Pattern `sk_(test|live)_.`. Example: `sk_test_...`.
    - `webhookSecret` (string): The secret for validating webhooks (Stripe -> Developer -> Webhooks) Example: `whsec_w051d0fwarc`.
    - `useStatementDescriptorSuffix` (boolean): Whether card payments send the payment's `statementDescriptorSuffix` to Stripe instead of its `statementDescriptor`. Stripe appends the suffix to your account's shortened descriptor, so the statement reads `PREFIX* SUFFIX`. Turn this on if Stripe rejects payments that set a full statement descriptor: newer Stripe accounts accept only the suffix. When it is on, a payment without a suffix uses your Stripe account's descriptor. Defaults to `false`. Example: `false`.
  - When the value is GatewayIntegrationAdyenConfigurationDTO:
    - `type` (string, required): Gateway integration type. One of `adyen`. Default `adyen`. Example: `adyen`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `merchantAccount` (string, required): Adyen merchant account name. Example: `MerchantAccountName`.
    - `apiKey` (string, required): Adyen API key. Example: `your-api-key`.
    - `liveUrlPrefix` (string): The prefix of the live endpoint URL (Adyen Dashboard -> Developers -> API URLs -> Prefix) Example: `0b3c1310cad152c9-MyCompany`.
    - `webhookSecret` (string): The webhook hmac for validating webhooks (Adyen Dashboard -> Developers -> Webhooks -> Edit -> HMAC Key) Example: `your-webhook-hmac-from-adyen-dashboard`.
  - When the value is GatewayIntegrationCheckoutConfigurationDTO:
    - `type` (string, required): Gateway integration type. One of `checkout`. Default `checkout`. Example: `checkout`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `secretKey` (string, required): Checkout secret key. Pattern `^sk_(sbox_)?[a-z0-9]+$`. Example: `sk_sbox_...`.
    - `processingChannel` (string, required): Checkout.com processing channel ID. Pattern `^pc_[a-z0-9]+$`. Example: `pc_...`.
    - `webhookSecret` (string): The secret for validating webhooks. Example: `whsec_w051d0fwarc`.
    - `merchantCity` (string): Merchant city for billing descriptor. Example: `Tallinn`.
  - When the value is UpdateGatewayIntegrationPaypalConfigurationDTO:
    - `type` (string, required): Gateway integration type. One of `paypal`. Default `paypal`. Example: `paypal`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `clientId` (string, required): PayPal application client ID. Example: `client-id-from-paypal-app`.
    - `secretKey` (string, required): PayPal application secret key. Example: `secret-key-from-paypal-app`.
    - `webhookId` (string): The Webhook ID from PayPal Dashboard (used for signature verification) Example: `0NH55953DH663215D`.
    - `collectShippingAddress` (boolean): Whether to collect shipping address from PayPal. Only available for Vault integration mode. Example: `false`.
    - `cardProcessing` (boolean, nullable): Whether this profile also accepts card payments, processed by PayPal. Turn it on only after PayPal has enabled card processing on your PayPal account. When it is on, card payment options can use this profile. Card payments on this profile ask for 3-D Secure when the card requires it. Merchant-initiated card payments, such as subscription renewals, are charged from the saved card without 3-D Secure. They are declined when the card has no earlier approved payment with a card network reference, or no known brand. A Mastercard or Discover card is also declined when the date the card network approved that earlier payment is unknown. PayPal requires it on these networks, and ODUS records it only from payments taken through PayPal, so a card whose network reference came from another gateway is declined. Example: `false`.

## Responses

### `200`

OK

Type: object (GatewayProfileDTO).

- `createdAt` (string (date-time), required): The date and time when the entity was created. Example: `2024-02-18T12:00:00Z`.
- `updatedAt` (string (date-time), required, nullable): The date and time when the entity was last updated. Example: `2024-02-21T12:15:00Z`.
- `metadata` (map of string to string, nullable): Metadata used by merchants to store additional information about the entity.
- `id` (string, required): ID of the Gateway Profile. Example: `gwp_2QC7PqoUeOxQEWscJJt6B3PkvyL`.
- `active` (boolean, required): Whether the gateway profile is active and available for processing. Example: `true`.
- `title` (string, required): Title of the Gateway Profile. Example: `Profile #1`.
- `integration` (string, required): Associated Gateway Integration. One of `stripe`, `adyen`, `checkout`, `paypal`. Example: `stripe`.
- `environment` (string, required, nullable): The environment the gateway profile operates in. One of `live`, `test`. Example: `test`.
- `supportedPaymentMethods` (array of string, required): Supported payment methods for the Gateway Profile. Each item: One of `card`, `paypal`, `applePay`.
- `configuration` (object or object or object or object, required): Gateway-specific configuration. The schema depends on the `integration` field: use StripeConfigDTO for Stripe, AdyenConfigDTO for Adyen, CheckoutConfigDTO for Checkout, and PaypalConfigDTO for PayPal.
  - When the value is variant 1:
    - `type` (string, required): Gateway integration type. One of `stripe`. Example: `stripe`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `secretKey` (string, required): Stripe secret key. Example: `sk_test_...`.
    - `webhookSecret` (string, nullable): Webhook signing secret for signature verification.
    - `useStatementDescriptorSuffix` (boolean, required): Whether card payments send the payment's `statementDescriptorSuffix` to Stripe instead of its `statementDescriptor`. Stripe appends the suffix to your account's shortened descriptor, so the statement reads `PREFIX* SUFFIX`. Turn this on if Stripe rejects payments that set a full statement descriptor: newer Stripe accounts accept only the suffix. When it is on, a payment without a suffix uses your Stripe account's descriptor. Defaults to `false`. Example: `false`.
  - When the value is variant 2:
    - `type` (string, required): Gateway integration type. One of `adyen`. Example: `adyen`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `apiKey` (string, required): Adyen API key. Example: `your-api-key`.
    - `merchantAccount` (string, required): Adyen merchant account name. Example: `MerchantAccountName`.
    - `liveUrlPrefix` (string, nullable): Live endpoint URL prefix. Example: `0b3c1310cad152c9-MyCompany`.
    - `webhookSecret` (string, nullable): Webhook HMAC key for signature verification.
  - When the value is variant 3:
    - `type` (string, required): Gateway integration type. One of `checkout`. Example: `checkout`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `secretKey` (string, required): Checkout.com secret key. Example: `sk_sbox_...`.
    - `processingChannel` (string, required): Checkout.com processing channel ID. Example: `pc_...`.
    - `webhookSecret` (string, nullable): Webhook signing secret for signature verification.
    - `merchantCity` (string, nullable): Merchant city for billing descriptor. Example: `Tallinn`.
  - When the value is variant 4:
    - `type` (string, required): Gateway integration type. One of `paypal`. Example: `paypal`.
    - `environment` (string, required): Gateway environment. One of `live`, `test`. Example: `test`.
    - `clientId` (string, required): PayPal application client ID. Example: `client-id-from-paypal-app`.
    - `secretKey` (string, required): PayPal application secret key. Example: `secret-key-from-paypal-app`.
    - `integrationMode` (string, required): Integration mode: "vault" uses PayPal Vaulting, "billingAgreement" uses Billing Agreements API. One of `vault`, `billingAgreement`.
    - `collectShippingAddress` (boolean, required): Whether to collect shipping address from PayPal. Only available for Vault integration mode.
    - `webhookId` (string, nullable): PayPal webhook ID for signature verification. Example: `0NH55953DH663215D`.
    - `cardProcessing` (boolean, required): Whether this profile also accepts card payments, processed by PayPal. Turn it on only after PayPal has enabled card processing on your PayPal account. When it is on, card payment options can use this profile. Card payments on this profile ask for 3-D Secure when the card requires it. Merchant-initiated card payments, such as subscription renewals, are charged from the saved card without 3-D Secure. They are declined when the card has no earlier approved payment with a card network reference, or no known brand. A Mastercard or Discover card is also declined when the date the card network approved that earlier payment is unknown. PayPal requires it on these networks, and ODUS records it only from payments taken through PayPal, so a card whose network reference came from another gateway is declined. Example: `false`.

### `202`

The merchant is entitled but its environment is not provisioned yet. Provisioning has been kicked off (exactly once) and is in progress; retry the request — it succeeds once the environment is ready. Returned only for identity-token (dashboard) requests bound to a merchant, not for secret-key API calls; any such endpoint can return it while provisioning is underway.

Type: object (ProvisioningInProgress).

- `status` (string, required): Signals the merchant environment is still being provisioned. One of `provisioning`.
- `merchantAccountId` (string, required): The merchant account whose environment is being provisioned. Example: `dAI3aa87ROOeupeBCjNSKCOBOisBCYjB`.

### Errors

- `400`: The request was rejected. `type` is `invalid_request_error` when the request itself is at fault — `errors` then lists every problem found, with field-attributable entries prefixed by the field’s path; or `invalid_state_error` when the request was well-formed but the resource is not in a state that allows it.
- `401`: No API key was supplied, or the key is not valid. `type` is `authentication_error`.
- `403`: The API key is valid but lacks the permission this operation requires. `type` is `permission_error`.
- `404`: No resource exists with the requested identifier. `type` is `not_found_error`.
- `409`: `type` is `conflict_error`. The supplied `X-Idempotency-Key` was already used with a different request body (`code` is `idempotency_conflict`, and retrying will not help), or the resource is being modified by another in-flight request (`code` is `resource_locked`, and retrying with backoff will).
- `429`: Too many requests. A limit applies per operation; requests to other operations are unaffected. `type` is `rate_limit_error`. Use the `Retry-After-global` header to know when to retry.
- `500`: The request could not be completed because of an unexpected error. `type` is `api_error`.
- `503`: The request could not be served right now: the API is temporarily at capacity, or a dependency needed to authorize the request is unavailable — the auth service that verifies credentials, or the entitlement lookup behind it. `type` is `api_error`. It is raised before the operation runs, so the request had no effect, and unlike a plain 500 the condition is transient: retry with backoff.
- `504`: The request exceeded the processing time limit and was abandoned. `type` is `api_error` and `code` is `timeout` — unlike a plain 500 the request may still have taken effect, so retry with the same idempotency key rather than blindly.

Every error response has the same body: see [Errors](https://docs.odus.com/docs/guides/api-features/errors.md).

---

Generated from the Core API v2 OpenAPI document, https://api.odus.com/openapi.v2.json. Interactive page: https://docs.odus.com/docs/api/core/v2/gateway-profile-controller-update
