Refund charge by API
POST/paymentlink/transaction/:transaction_id/refund
Refund charge by API
Request​
Path Parameters
transaction_id stringrequired
Transaction ID
Header Parameters
Authorization stringrequired
Authentication token.
Example: Bearer <token>
- application/json
Body
required
amount integerrequired
Field used for the cancellation value in cents.
Responses​
- 200
- 400
- 404
- 422
- 500
Refund created.
- application/json
- Schema
- Example (from schema)
- Example
Schema
transactionId stringrequired
Transaction ID
amount integerrequired
Cancellation value in cents.
originalAmount numberrequired
Original transaction value in cents.
{
"transactionId": "b9cb5359-c14c-4e4e-b294-ea506ae16778",
"amount": 1000,
"originalAmount": 5000
}
{
"transactionId": "684065d2-6803-40f3-a76c-1108d66d8db0",
"amount": 1000,
"originalAmount": 5000
}
Integration errors with other services.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
message stringrequired
type stringrequired
code stringrequired
{
"error": {
"message": "Requisição inválida.",
"type": "internal",
"code": "B036"
}
}
{
"error": {
"message": "Requisição inválida.",
"type": "internal",
"code": "B036"
}
}
Transaction not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
message stringrequired
code numberrequired
{
"error": {
"message": "Transação não encontrada.",
"code": 404
}
}
{
"error": {
"message": "Transação não encontrada.",
"code": 404
}
}
Validation error on the parameters sent.
- application/json
- Schema
- Example (from schema)
- Example
Schema
status integerrequired
Código HTTP do erro.
message stringrequired
General error message.
errors
object
required
List of errors by field.
amount string[]required
transaction_id string[]required
{
"status": 422,
"message": "Erro de validação",
"errors": {
"amount": [
"The amount field must be an integer.",
"The amount field must be greater than zero.",
"The amount field must be less than 999999999."
],
"transaction_id": [
"The transaction_id parameter is mandatory.",
"The transaction_id field must be a uuid."
]
}
}
{
"status": 422,
"message": "Erro de validação",
"errors": {
"amount": [
"The amount field must be an integer.",
"The amount field must be greater than zero.",
"The amount field must be less than 999999999."
],
"transaction_id": [
"The transaction_id parameter is mandatory.",
"The transaction_id field must be a uuid."
]
}
}
Integration errors with other services.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error
object
required
message stringrequired
type stringrequired
code stringrequired
{
"error": {
"message": "Requisição inválida.",
"type": "internal",
"code": "B036"
}
}
{
"error": {
"message": "Erro de comunicação.",
"type": "internal",
"code": "B036"
}
}
Loading...