POST /merchants/{merchantId}/mids
Create a MID for a merchant
Create a new MID and assign it to a specific merchant
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
x-account-id
header string Account ID for the request
merchantId
path string The ID of the merchant
Request Body
{ "merchantId": 0, "descriptor": "string"}{ "merchantId": 0, "midNumber": "string", "descriptor": "string", "status": "string", "processingStatus": "string", "configuration": { "descriptor": "string", "timezone": "string", "batchTime": "string", "autoSettle": false, "allowRefunds": false, "allowPartialRefunds": false, "refundLimit": "string" }, "processingLimits": { "dailyLimit": "string", "monthlyLimit": "string", "transactionLimit": "string" }, "gatewaySettings": { "gatewayId": "string", "gatewayName": "string", "endpoint": "string", "merchantId": "string", "terminalId": "string", "apiKey": "string", "apiSecret": "string", "isActive": false }}Try it out
Loading...
Output:
Responses
Description
MID created successfully
{ "id": 0, "merchantId": 0, "midNumber": "string", "descriptor": "string", "status": "string", "processingStatus": "string", "agentId": "string", "agentName": "string", "isoId": "string", "isoName": "string", "activatedDate": "string", "lastProcessingDate": "string", "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string"}Description
Bad Request - Invalid MID data
Description
Unauthorized - User not authenticated
Description
Forbidden - User does not have the required permissions
Description
Not Found - Merchant not found
Description
Internal server error
References
#/components/parameters/xAccountIdHeader#/components/schemas/CreateMidRequest#/components/schemas/Mid
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/CreateMidRequest
type: objectrequired: - merchantId - descriptorproperties: merchantId: type: integer description: ID of the merchant midNumber: type: string description: MID number (auto-generated if not provided) descriptor: type: string description: MID descriptor status: type: string enum: - pending - active - suspended - terminated processingStatus: type: string enum: - enabled - disabled - limited - hold configuration: type: object properties: descriptor: type: string timezone: type: string batchTime: type: string autoSettle: type: boolean allowRefunds: type: boolean allowPartialRefunds: type: boolean refundLimit: type: string processingLimits: type: object properties: dailyLimit: type: string monthlyLimit: type: string transactionLimit: type: string gatewaySettings: type: object properties: gatewayId: type: string gatewayName: type: string endpoint: type: string merchantId: type: string terminalId: type: string apiKey: type: string apiSecret: type: string isActive: type: boolean|export interface CreateMidRequest { /** ID of the merchant */ merchantId: number; /** MID number (auto-generated if not provided) */ midNumber?: string; /** MID descriptor */ descriptor: string; status?: "pending" | "active" | "suspended" | "terminated"; processingStatus?: "enabled" | "disabled" | "limited" | "hold"; configuration?: { descriptor?: string; timezone?: string; batchTime?: string; autoSettle?: boolean; allowRefunds?: boolean; allowPartialRefunds?: boolean; refundLimit?: string; }; processingLimits?: { dailyLimit?: string; monthlyLimit?: string; transactionLimit?: string; }; gatewaySettings?: { gatewayId?: string; gatewayName?: string; endpoint?: string; merchantId?: string; terminalId?: string; apiKey?: string; apiSecret?: string; isActive?: boolean; };}#/components/schemas/Mid
type: objectproperties: id: type: integer description: Unique identifier for the MID merchantId: type: integer description: ID of the merchant this MID belongs to midNumber: type: string description: Unique MID number descriptor: type: string description: MID descriptor status: type: string enum: - pending - active - suspended - terminated description: Current status of the MID processingStatus: type: string enum: - enabled - disabled - limited - hold description: Processing status of the MID agentId: type: string description: Agent ID associated with the MID agentName: type: string description: Agent name isoId: type: string description: ISO ID isoName: type: string description: ISO name activatedDate: type: string format: date-time description: Date when MID was activated lastProcessingDate: type: string format: date-time description: Last processing date createdBy: type: string description: User who created the MID updatedBy: type: string description: User who last updated the MID createdAt: type: string format: date-time description: Creation timestamp updatedAt: type: string format: date-time description: Last update timestamp|export interface Mid { /** Unique identifier for the MID */ id?: number; /** ID of the merchant this MID belongs to */ merchantId?: number; /** Unique MID number */ midNumber?: string; /** MID descriptor */ descriptor?: string; /** Current status of the MID */ status?: "pending" | "active" | "suspended" | "terminated"; /** Processing status of the MID */ processingStatus?: "enabled" | "disabled" | "limited" | "hold"; /** Agent ID associated with the MID */ agentId?: string; /** Agent name */ agentName?: string; /** ISO ID */ isoId?: string; /** ISO name */ isoName?: string; /** Date when MID was activated */ activatedDate?: Date; /** Last processing date */ lastProcessingDate?: Date; /** User who created the MID */ createdBy?: string; /** User who last updated the MID */ updatedBy?: string; /** Creation timestamp */ createdAt?: Date; /** Last update timestamp */ updatedAt?: Date;}Route Source Code
Check out the source code for this route entrypoint here: /merchants/[merchantId]/mids/route.ts
Or the swagger.yaml spec this documentation was generated from:
/mids/swagger.yaml