PUT
/
v1.1
/
transactions
/
{saleUUID}
/
refund
Request a sale refund
curl --request PUT \
  --url https://api.paymee.com.br/v1.1/transactions/{saleUUID}/refund \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-api-token: <x-api-token>' \
  --data '{
  "amount": 150,
  "reason": "shopper'\''s request"
}'
{
"status": 0,
"message": "success",
"uuid": "a3b59529-ac56-3e24-9011-320456dd9491",
"currency": "BRL",
"originalAmount": 11,
"totalToRefund": 11,
"currentBalance": 16495.84,
"discounts": 0,
"shopper": {
"bankDetails": {
"account": "12345-6",
"branch": "1234"
},
"document": {
"type": "CPF",
"number": "00000000000"
},
"email": "JOHN DOE",
"phone": {
"type": "MOBILE",
"number": "11999990000"
}
}
}

Headers

x-api-key
string
required
Example:

"your-x-api-key"

x-api-token
string
required
Example:

"your-x-api-token"

Path Parameters

saleUUID
string
required

UUID of the sale to be refunded

Body

application/json
amount
number
required

Amount to refund (≤ original sale total)

Example:

150

reason
string

Refund reason (optional)

Maximum length: 255
Example:

"shopper's request"

callbackURL
string

Callback URL (optional)

Maximum length: 255
Example:

"https://merchant.com/refund/callback"

Response

refund request accepted

status
enum<number>

Response status code.

  • 0 – success
  • ‑1 – validation failure
  • 998 – transaction not found
  • 1000 – transaction not PAID
Available options:
0,
-1,
998,
1000
Example:

0

message
string

Response message

Example:

"success"

uuid
string

Refund transaction UUID

Example:

"a3b59529-ac56-3e24-9011-320456dd9491"

currency
string

Currency code

Example:

"BRL"

originalAmount
number

Original sale total

Example:

11

totalToRefund
number

Total amount already refunded (after this request)

Example:

11

currentBalance
number

Merchant balance after the request

Example:

16495.84

discounts
number

Discounts applied to sale

Example:

0

shopper
object

Shopper information