The Create Hosted Application API lets you redirect prospective merchants from your platform to a white-labeled BlueSnap Merchant application. In response, you receive a JSON web token (JWT) that is valid for 24 hours. This JWT contains the merchant application and session information.
You can create the initial merchant application and refresh the JSON web token with this endpoint.
Endpoint
https://platform.bluesnap.com/services/2/merchants/partner-side-initiated-submission
Request Content
Parameter | Required | Description |
---|---|---|
userId
|
No | Unique identifier that you can assign to the merchant application. You can use this ID to authenticate the merchant if they need to complete their application in the future. |
bluesnapId
|
No | Unique identifier that BlueSnap assigns to the merchant application. |
returnUrl
|
No | URL where BlueSnap redirects the merchant to complete the application at a later time. |
refreshUrl
|
No | URL where BlueSnap redirects the merchant if the JWT is expired. |
successUrl
|
No | URL where BlueSnap redirects the merchant after they submit the merchant application. |
merchantInfo
|
Yes | Container object for merchant information. |
email |
Yes | Merchant's email address. This is required in the first request that creates a merchant application account. |
firstName
|
No | Merchant's first name. |
lastName
|
No | Merchant's last name. |
businessName
|
No | Merchant's business name. |
Response
Parameter | Description |
---|---|
userId | userId sent in the request. |
bluesnapId | Unique identifier that BlueSnap assigned to the merchant application. |
url | Link that contains the JWT token as a search parameter. |
Examples
Requests
curl -v -X POST https://platform.bluesnap.com/services/services/2/merchants/partner-side-initiated-submission \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"userId": "user007",
"bluesnapId": 1234567,
"returnUrl": "https://example.com/return",
"refreshUrl": "https://example.com/refresh",
"successUrl": "https://example.com/success",
"merchantInfo": {
"email": "[email protected]"
}
}`
curl -v -X POST https://platform.bluesnap.com/services/services/2/merchants/partner-side-initiated-submission \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"userId": "user007",
"bluesnapId": 1234567,
"returnUrl": "https://example.com/return",
"refreshUrl": "https://example.com/refresh",
"successUrl": "https://example.com/success"
}`
Responses
{
"userId": "user007",
"bluesnapId": "1234567",
"url": "https://sandbox.bluesnap.com/jsp/merchant_application.jsp?jwt=<jwt-string>"
}
{
"bluesnapId": "1234567",
"url": "https://sandbox.bluesnap.com/jsp/merchant_application.jsp?jwt=<jwt-string>"
}