-
Notifications
You must be signed in to change notification settings - Fork 0
Magento 2 API Routes
[POST] https://mystoreurl/rest/default/V1/mundipagg/charge/cancel/{charge_id}
- This feature cancels a charge through an id (charge_id)
PATH PARAMS
- charge_id* string
- The charge id.
Our API uses standard HTTP codes as response to indicate the success or failure of a request.
200 OK
{
"message": "Charge cancelada com sucesso"
}
400 Bad Request
{
"message": "This charge can not be canceled."
}
401 Unauthorized
{
"message": "The consumer isn't authorized to access %resources.",
"parameters": {
"resources": "Magento_Sales::sales"
}
}
[POST] http://mystoreurl/rest/default/V1/mundipagg/bulk
- This feature executes multiple requests that are passed in the request body. It was initially designed to cancel multiple charges, but accepts other types of routes.
BODY PARAMS
- requests* array
- Array of objects where each object contains the method of the request, the path of the route and the parameters of each route.
- access_token string (opcional)
- Token for authenticating routes that are passed in the requests array.
The maximum number of requests that can be sent within this route must be determined by the store's technical manager, taking into account the processing limitations of the server used. This is because a large volume of requests will require more server resources which can cause a time-out before the operation is completed.
{
"requests":[
{
"method": "post",
"path":"/charge/cancel/ch_GPJgy45s6sxajw52",
"params": {}
},
{
"method": "post",
"path":"/charge/cancel/ch_bM4JX7CYZs9adqpA",
"params": {}
},
{
"method": "post",
"path": "/recurrence/plan/product",
"params": {
"productPlan" : {
"product_id": "2050",
"boleto" : true,
"credit_card" : true,
"allow_installments": true,
"intervalCount": 2,
"intervalType": "month",
"items": [
{
"product_id": 2,
"cycles": 2
},
{
"product_id": 2,
"cycles": 2
}
]
}
}
},
{
"method": "get",
"path":"/recurrence/product/1",
"params": {}
}
],
"access_token":"p1u1mw44xndbrih363ck39oebktxo981"
}
Our API uses standard HTTP codes as response to indicate the success or failure of a request.
200 OK
[
{
"index": 0,
"status": 200,
"body": {
"message": "Charge cancelada com sucesso"
},
"path": "/charge/cancel/ch_GPJgy45s6sxajw52",
"method": "post"
},
{
"index": 1,
"status": 200,
"body": {
"message": "Charge cancelada com sucesso"
},
"path": "/charge/cancel/ch_bM4JX7CYZs9adqpA",
"method": "post"
},
{
"index": 2,
"status": 404,
"body": {
"message": "Product id: 2. It's not correct"
},
"path": "/recurrence/plan/product",
"method": "post"
},
{
"index": 3,
"status": 401,
"body": {
"message": "Consumer is not authorized to access %resources",
"parameters": {
"resources": "Magento_Catalog::products"
}
},
"path": "/recurrence/product/1",
"method": "get"
}
]
"This route will always return an HTTP Code 200 OK, however the routes within the requests array will return their respective HTTP Code."
-
About
-
Installation
-
Module configuration
-
Order management
-
Payment methods
- Boleto
- Credit card
- Wallet
- Credit card and boleto
- Wallet
- 2 credit cards
- Wallet
- Pix
-
Payment Split (Market Place support) [In development]
-
Support
-
Recurrence
- Configuration
- Api