Request a refund

Environments

https://merchant.aplazo.net/api

Request a refund for a specific cart

post

Refunds can be partial or total but must be less than the total loan amount.

Authorizations
Body
cartIdstringRequired

The unique identifier of the cart associated with the loan.

Example: merchant-cart-123
totalAmountnumberRequired

The amount to be refunded. Must be less than the total loan amount.

Example: 1
reasonstringRequired

The reason for the refund.

Example: Wrong size
Responses
200
Refund request was successfully created.
application/json
post
POST /loan/refund-from-cart HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "cartId": "merchant-cart-123",
  "totalAmount": 1,
  "reason": "Wrong size"
}
200

Refund request was successfully created.

{
  "refundId": 665,
  "merchantId": 12,
  "cartId": "merchant-cart-123",
  "refundStatus": "REQUESTED",
  "refundDate": "2022-09-05T21:11:34.091719"
}

Response Examples

Success

200 - Successfully requested a refund
curl --location 'https://merchant.aplazo.net/api/loan/refund-from-cart' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token here>' \
--data '{    
    "cartId":  "3201" ,    
    "totalAmount": 150,    
    "reason":  "Wrong shoe size"
}'
{
    "refundId": 25759,
    "merchantId": 2633,
    "cartId": "3201",
    "refundStatus": "REQUESTED",
    "refundDate": "2025-01-06T18:13:31.406721093"
}

Errors

500 - Cart not found
curl --location 'https://merchant.aplazo.net/api/loan/refund-from-cart' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token here>' \
--data '{    
    "cartId":  "non-existant-cart" ,    
    "totalAmount": 150,    
    "reason":  "Refund_reason"
}'
{
    "timestamp": "2025-01-06T18:20:20.811+00:00",
    "status": 500,
    "error": "Internal Server Error",
    "message": "",
    "path": "/api/loan/refund-from-cart"
}

Last updated

Was this helpful?