# Calculate Pay Plan Parameters Calculate the pay plan parameters for the given amount and list of variants. Beta release - This endpoint is close to being finalised but non-backward compatible changes to parameters and behaviour may still occur. Endpoint: POST /payplans/parameters Version: 3.0 Security: Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT ## Header parameters: - `Merchant-Id` (string) Perform operation in the context of the given merchant. Usually not required — specify only if acting on behalf of a merchant not implied by the credentials specified in the Authorization header. ## Request fields (application/json): - `amount` (object, required) The full order amount - `amount.minorCurrencyUnits` (integer, required) The amount in minor currency units (e.g. cents for AUD). - `amount.currency` (string, required) The currency of the given amount as a 3 letter ISO code. - `payPlanVariants` (array) The variants of the plan to calculate parameters for. Enum: "payplan_fortnight_25_25_25_25", "payplan_4_weekly_payments", "payplan_8_weekly_payments", "payplan_26_fortnightly_payments", "payplan_52_weekly_payments", "payplan_2_monthly_payments", "payplan_3_monthly_payments", "payplan_4_monthly_payments", "payplan_5_monthly_payments", "payplan_6_monthly_payments", "payplan_7_monthly_payments", "payplan_8_monthly_payments", "payplan_9_monthly_payments", "payplan_10_monthly_payments", "payplan_11_monthly_payments", "payplan_12_monthly_payments", "payplan_fortnight_0_100", "payplan_4_week_0_100", "payplan_7_week_0_100", "payplan_30_days_0_100" - `payInFullAmount` (integer) The portion of the order amount that is for pay in full items in minor currency units. Only relevant for merchants who have a pre-arranged agreement with April to support orders including some pay in full items. ## Response 200 fields (application/json): - `parameters` (array) Pay plan parameters for each of the requested variants. - `parameters.amount` (object, required) The full plan amount - `parameters.amount.minorCurrencyUnits` (integer, required) The amount in minor currency units (e.g. cents for AUD). - `parameters.amount.currency` (string, required) The currency of the given amount as a 3 letter ISO code. - `parameters.initialPayment` (integer, required) The amount that the customer will pay up front in minor currency units (eg cents for AUD). May be 0 if no upfront payment is required. - `parameters.instalmentLength` (integer, required) The number of instalment payments expected for this pay plan (min 2, max 52). - `parameters.instalmentFrequency` (string, required) The time period between instalments. Enum: "Weekly", "Fortnightly", "EveryFourWeeks", "EverySevenWeeks", "EveryThirtyDays", "EveryTenMinutes" - `parameters.proposedSchedule` (array) - `parameters.proposedSchedule.at` (string, required) - `parameters.proposedSchedule.amount` (integer, required) - `parameters.payPlanVariant` (string, required) The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.) Enum: "payplan_fortnight_25_25_25_25", "payplan_4_weekly_payments", "payplan_8_weekly_payments", "payplan_26_fortnightly_payments", "payplan_52_weekly_payments", "payplan_2_monthly_payments", "payplan_3_monthly_payments", "payplan_4_monthly_payments", "payplan_5_monthly_payments", "payplan_6_monthly_payments", "payplan_7_monthly_payments", "payplan_8_monthly_payments", "payplan_9_monthly_payments", "payplan_10_monthly_payments", "payplan_11_monthly_payments", "payplan_12_monthly_payments", "payplan_fortnight_0_100", "payplan_4_week_0_100", "payplan_7_week_0_100", "payplan_30_days_0_100" ## Response 400 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 401 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 403 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 404 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 405 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 406 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 409 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 422 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 429 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 500 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata ## Response 503 fields (application/json): - `statusCode` (integer, required) HTTP status code for this error - `errorCode` (string, required) An April code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type. - `message` (string, required) Human readable description of the error - `tracer` (string) An unique identifier for the request. Provide this to the support team if you wish to query a particular error. - `detail` (string) Optional additional details for the error. - `errorTypeDescription` (string) A description of the category of errors for the given statusCode. - `metadata` (any) Optional key value list of metadata