Loans
Manage and retrieve information about loan options available through Pay Later.
Explore Pay Later loan offers tailored to specific baskets or orders.
Retrieve loan information
Retrieve detailed Pay Later loan information associated with a specific shopping basket, including loan status and approved amounts.
Retrieve BNPL loan details for a given basket, including the current Pay Later status, approved loan amount, and associated basket and order identifiers.
Query parameters
- Name
basketId- Type
- string
- Description
The public unique identifier of the basket to retrieve loan information for.
- Name
orderIdentifier- Type
- string
- Description
The merchant-defined identifier of the order linked to the basket (optional).
- Name
api-version- Type
- string
- Description
The requested API version. The parameter is optional. Default value:
2.0.
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 API environment, available within the application's details.
Response attributes
- Name
success- Type
- boolean
- Description
A boolean indicating whether the Pay Later loan retrieval request was successful.
- Name
data- Type
- object
- Description
The BNPL loan details, containing:
payLaterInformation(object): The BNPL loan status details, including:bnplRequestId(string): The unique identifier of the BNPL loan request.status(string): The current status of the loan (e.g., pending, approved, rejected).approvedLoanAmount(number): The loan amount that has been approved.orderIdentifier(string): The merchant-defined identifier of the order linked to the loan.basketId(string): The identifier of the basket associated with the loan.
- Name
message- Type
- string
- Description
A descriptive message providing additional context about the loan request status.
- Name
errors- Type
- array
- Description
An array of error objects detailing any issues encountered during the Pay Later loan retrieval process, including:
code(string): A machine-readable code representing the error type.message(string): A human-readable message providing additional information about the loan request status or outcome.
- Name
metadata- Type
- object
- Description
A key-value object containing additional information related to the Pay Later loan request, typically used for internal tracking or integration purposes.
- Name
type- Type
- string
- Description
The type or category of the error response, indicating its nature or classification.
- Name
title- Type
- string
- Description
A brief, descriptive title summarizing the error response message.
- Name
status- Type
- integer
- Description
The HTTP status code of the response, indicating the success or failure of the request.
- Name
detail- Type
- string
- Description
A detailed description or explanation of the error, providing additional context.
- Name
instance- Type
- string
- Description
The specific instance or occurrence to which the response pertains, providing a unique identifier or reference.
Request
curl -X GET "/loans/bnpl?basketId=string&orderIdentifier=string&api-version=2.0" \
-H 'Accept: application/json' \
-H 'X-Application-ID: string' \
-H 'Ocp-Apim-Subscription-Key: string'
Response examples
{
"success": true,
"data": {
"payLaterInformation": {
"bnplRequestId": "",
"status": "Approved",
"approvedLoanAmount": 250.00,
"orderIdentifier": "",
"basketId": ""
}
},
"message": "",
"errors": [],
"metadata": {}
}
Responses
| Status | Description | Notes |
|---|---|---|
| 200 | OK | The BNPL loan information for the given basket. |
| 400 | Bad Request | BasketId cannot be empty, or Application ID was not found. |
| 404 | Not Found | The BNPL loan with the given basket ID was not found. |
| 500 | Internal Server Error | Internal server error. |