Skip to main content

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​
NameDescriptionTypeDefault Value
idPage numberString optionalid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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​
NameDescriptionType
idPayment identifierString 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​
NameDescriptionType
idIdentifier of PaymentString required

πŸ‘‰Prueba este endpoint🌱

Possible Response Errors​

ErrorResponse StatusResponse 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"}