Sandbox
The sandbox allows you to simulate Pay Later transactions in a secure environment.
Experience the functionality of Pay Later without affecting live data, test various scenarios and validate your integration. This endpoint is designed to help you test and integrate Pay Later capabilities seamlessly into your applications.
Create a mock transaction
Create a snappi Pay Later mock transaction in a sandbox environment. Simulate the behavior and responses of a snappi Pay Later transaction.
With the appropriate values in the query parameters you can mock a successful/failed Pay Later journey and check the Pay Later functionality.
Query parameters
- Name
api-version
- Type
- string
- Description
The requested API version. The parameter is optional. Default value:
1.0
.
- Name
basketId
- Type
- integer
- Description
The unique identifier fot the basket. This parameter is required to create a buy now, pay later transaction.
- Name
isSuccessCallback
- Type
- boolean
- Description
Indicates whether the callback is successful or not. Specifies whether a success callback is required. This query parameter determines whether a callback function should be triggered upon successful completion of the API call.
Headers
- Name
X-Application-ID
- Type
- string
- Description
The ID of the application making the request. This header parameter is required for authentication and identification purposes.
- Name
Ocp-Apim-Subscription-Key
- Type
- string
- Description
A unique identifier related to the registered merchant in the snappi API environment, available within the application's details.
Response attributes
- Name
message
- Type
- string
- Description
The message associated with the response. This parameter contains any relevant messages or notifications related to the response.
- Name
errors
- Type
- string
- Description
The errors encountered during the API call. This parameter provides information about any errors or issues that occurred, including:
field
(string) - The field associated with the error.message
(string) - The message associated with the error.
- Name
type
- Type
- string
- Description
The type of the error.
- Name
title
- Type
- string
- Description
The title of the response. This parameter provides a brief summary of the response.
- Name
status
- Type
- integer
- Description
The status of the API call. This parameter indicates the success or failure of the API call.
- Name
detail
- Type
- string
- Description
Additional details about the error.
- Name
instance
- Type
- string
- Description
The instance identifier of the response.
Request
curl -X POST /bnplsandbox/createbnpl \
-H 'Accept: application/json' \
-H 'X-Application-ID: string' \
-H 'Ocp-Apim-Subscription-Key: string'
Response examples
Create BNPL Sandbox succeed.
Responses
Status | Description | Notes |
---|---|---|
200 | OK | Create BNPL Sandbox succeed. |
400 | Not Found | Invalid request parameters / Basket not found / Basket with the given id was not found / X-Application-ID not found. |
500 | Internal Error | Internal Server Error. |