Payment Endpoints
The Payment entity stores information about the payment methods available in the database.
Common Payment Characteristicsβ
All Payment entities have a local identifier id, a remote identifier and a description. The description stores the payment method that each entity refers to.
Endpointsβ
GET/Payment/getPaymentMethodβ
Retrieve a paginated list with existing payment methods in the database.
Descriptionβ
Allows clients to obtain a list of payment methods based on pagination parameters such as page number (page) and number of items per page (pageSize).
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Page number | String optional | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"description": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
POST/Payment/createPaymentMethodβ
Payment Registration in the API: Using the POST Methodβ
This method is designed to handle JSON format only. To effectively register payments, it is essential to follow a process that ensures data integrity and proper system functionality.
Details of the POST Method:β
It is important to provide structured data in JSON format that includes crucial information such as id and description. The process ensures that each payment has a unique identity and is correctly configured to interact with the platform securely and efficiently. The idRemote field provided when creating a new entity corresponds to the idRemote that the user wants to give it and the system will automatically create a local id.
The body of the request must follow the following scheme:
[
{
"idRemote": "string",
"description": "string"
}
]
It is possible to add multiple payments through the same request by separating them with commas within the array in the body of the request.
πTry it outπ±
PUT/Payment/update/{id}β
Updating warehouses
Descriptionβ
The PUT method of our API allows clients to update payment method data using the id parameter. This id field can be either the B2B system's own identifier or the idRemote you provide when registering warehouses on our platform. In this way, our platform guarantees efficient and accurate payment method information management.
It is not necessary to include the entire JSON structure, you just have to send what you want to modify
Parametersβ
| Name | Description | Type |
|---|---|---|
id | Payment identifier | String required |
Request Bodyβ
The request body must follow the following schema in JSON format:
{
"description": "string"
}
It is possible to add multiple payments through the same request by separating them with commas within the array in the body of the request.
πTry it outπ±
DELETE/Payment/delete{id}β
Deleting Payment Methods
Descriptionβ
This endpoint allows the deletion of payment methods using their unique identifier. This id field can be either the identifier generated by the B2B database or the idRemote that you provide us when registering the payment methods.
Parametersβ
| Name | Description | Type |
|---|---|---|
id | Identifier of Payment | String required |
πPrueba este endpointπ±
Possible Response Errorsβ
| Error | Response Status | Response Body |
|---|---|---|
| This error occurs when a connection to the database cannot be established. It is an internal server problem. | 500 | {"code": 500,"error": "Database connection failed."} |
| This error occurs when you cannot insert or update into the database. | 500 | {"code": 500,"error": "Invalid connection name, you cannot insert in default"} |
| This error indicates that a parameter is missing. | 400 | {"code": 400,"error": "Parameter $parameter is required"} |
| This error occurs when you are not authorized. | 401 | {"code": 401,"error": "Unauthorized."} |
| This error indicates that the entity could not be found. | 404 | {"code": 404,"error": "No entity found for Payment with $id."} |
| This error occurs when you try to insert an entity that already exists. | 409 | {"code": 409,"error": "Duplicate entry"} |
| This error occurs when you try to send too many requests in a short period of time. | 429 | {"code": 429,"error": "Too Many Requests"} |