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
environment | HTTP method | endpoint |
---|---|---|
Sandbox testing | POST | https://api-sandbox.flex-charge.com/v1/onboarding/application/{id}/convert |
Production environment | POST | https://api.flex-charge.com/v1/onboarding/application/{id}/convert |
Required keys
Parameter | Description |
---|---|
{id} | The unique application identifier returned during application creation or listing endpoints. |
bearer token | The 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 Name | Type | Description |
---|---|---|
HTTP Status Code | Integer | Returns 200 for successful conversion. |
merchantId | String | The unique identifier assigned to the new merchant. |
status | String | The status of the conversion request (SUCCESS , FAILED ). |
success | Boolean | Indicates if the conversion was successful. |
result | String | A confirmation message for the conversion (e.g., "Application converted successfully."). |
errors | Array of Strings | Any 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."
]
}
Updated 1 day ago