Sandbox

The sandbox allows you to simulate Pay Later transactions in a secure environment.


POST/bnplsandbox/createbnpl

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.

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

POST
/bnplsandbox/createbnpl
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

StatusDescriptionNotes
200OKCreate BNPL Sandbox succeed.
400Not FoundInvalid request parameters / Basket not found / Basket with the given id was not found / X-Application-ID not found.
500Internal ErrorInternal Server Error.