Convert an application

This endpoint is used to convert an APPROVED application into a merchant within the system. Once converted, the application transitions to the merchant lifecycle, and the merchant is assigned a unique identifier (MID).





Request


Endpoint


Required keys

ParameterDescription
{id}The unique application identifier returned during application creation or listing endpoints.
bearer tokenThe auth token returned by /oauth2/token


Body

This API does not require body parameters.


Application status

Ensure the application status is APPROVED before attempting to convert.


Response

Field Definitions

Field NameTypeDescription
HTTP Status CodeIntegerReturns 200 for successful conversion.
merchantIdStringThe unique identifier assigned to the new merchant.
statusStringThe status of the conversion request (SUCCESS, FAILED).
successBooleanIndicates if the conversion was successful.
resultStringA confirmation message for the conversion (e.g., "Application converted successfully.").
errorsArray of StringsAny errors encountered during the conversion process.

❗️

Notes

  • After a successful conversion, the application's is changed to a merchant
  • Use the returned merchantId to set up merchant-specific configurations
  • The merchantId will serve as the unique identifier for the newly created merchant entity.



Payload Examples

Request

cURL Request Example

curl --request POST \
     --url https://api-sandbox.flexfactor.com/v1/onboarding/application/{id}/convert \
     --header 'Authorization: bearer {the token returned by /oauth2}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{}'

Response

JSON Example for a Successful Conversion

{
   "merchantId": "merchant_789012",
   "status": "SUCCESS",
   "success": true,
   "result": "Application converted successfully.",
   "errors": []
}

JSON Example for a Failed Conversion

{
   "merchantId": null,
   "status": "FAILED",
   "success": false,
   "result": null,
   "errors": [
       "Application status is not APPROVED.",
       "Risk review is incomplete."
   ]
}

Example for Handling Errors

  • If the application is not in APPROVED status, the API will return an error indicating the reason for failure.
  • If the bearer token is invalid or missing, the API will respond with an Unauthorized error.
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "errors": [
    "Application status is not APPROVED."
  ]
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "errors": [
    "Authentication failed. Invalid bearer token."
  ]
}