Contents

POST /management/instances#

This request will be used to create a new merchant instance in the backend. It is only available for the implicit admin instance.

Required permission: instances-write

Request:

The request must be a InstanceConfigurationMessage.

Response:

202 Accepted:

2FA is required for this operation, usually to validate the email and/or phone numbers registered for the instance. This returns the ChallengeResponse. @since v21

204 No content:

The backend has successfully created the instance.

409 Conflict:

This instance already exists, but with other configuration options. Use “PATCH” to update an instance configuration. Alternatively, the currency provided in the configuration does not match the currency supported by this backend. Another possible conflict would be if a deleted but not purged instance is known under this ID to the backend.

Details:

interface InstanceConfigurationMessage {

  // Name of the merchant instance to create (will become $INSTANCE).
  // Must match the regex ^[A-Za-z0-9][A-Za-z0-9_.@-]+$.
  id: string;

  // Merchant name corresponding to this instance.
  name: string;

  // Merchant email for customer contact and password reset.
  email?: string;

  // Merchant phone number for password reset (2-FA)
  // @since **v21**.
  phone_number?: string;

  // Merchant public website.
  website?: string;

  // Merchant logo.
  logo?: ImageDataUrl;

  // Authentication settings for this instance
  auth: InstanceAuthConfigurationMessage;

  // The merchant's physical address (to be put into contracts).
  address: Location;

  // The jurisdiction under which the merchant conducts its business
  // (to be put into contracts).
  jurisdiction: Location;

  // Use STEFAN curves to determine default fees?
  // If false, no fees are allowed by default.
  // Can always be overridden by the frontend on a per-order basis.
  use_stefan: boolean;

  // If the frontend does NOT specify a payment deadline, how long should
  // offers we make be valid by default?
  // Optional @since **v22** (before the setting was mandatory).
  // If not provided, the global merchant default will be used.
  default_pay_delay?: RelativeTime;

  // If the frontend does NOT specify a refund deadline, how long should
  // refunds be allowed by default? Added on top of the
  // payment deadline.
  // @since **v22**
  default_refund_delay?: RelativeTime;

  // If the frontend does NOT specify an execution date, how long should
  // we tell the exchange to wait to aggregate transactions before
  // executing the wire transfer?  This delay is added on top of
  // the refund deadline and afterwards subject to rounding
  // via the default_wire_transfer_rounding_interval.
  // Optional @since **v22** (before the setting was mandatory).
  // If not provided, the global merchant default will be used.
  default_wire_transfer_delay?: RelativeTime;

  // How far should the wire deadline (if computed with the help of
  // the default_wire_transfer_delay) be rounded up to compute
  // the ultimate wire deadline?
  // @since **v22**, defaults to no rounding if not given.
  default_wire_transfer_rounding_interval?: RoundingInterval;
}