Skip to main content

Partial Refund Application

POST https://api.paytomorrow.com/api/ecommerce/application/{{applicationToken}}/partial/refund

Request for partial refunding an application on PayTomorrow given the application token returned in the Create Order api endpoint. The payload should contain the new loan amount details and a list of the new lines.

{
"loanAmount": The total cart amount (the amount that will be financed),
"shipping": Shipping costs,
"taxes": Taxes,
"discount": Discounts,
"items": An array of cart items (ApplicationItem). See below fo the description.

//items
{
"description": Product description,
"quantity": Quantity of the product,
"price": Price of the product,
"brand": (optional) Product brand,
"model": (optional) Product model,
"sku": (optional) Product sku,
"coupon": (optional) Product coupon,
"discount": (optional) Product discount,
"sale_price": (optional) ,
"extended_list_price": (optional) ,
"extended_sale_price": (optional) ,
"list_price": (optional)
}

Request Params Requirements

  • "loanAmount": Required, must be a number.
  • "shipping": must be a number.
  • "taxes": must be a number.
  • "applicationItems": Required.

Headers

Authorization: Bearer theacces-toke-naaa-aaaa-aaaaaaaaaaaa // The access token
Content-Type: application/json

Request Body

{
"loanAmount": 2000,
"shipping": 200,
"taxes": 100,
"discount": 0,
"items": [
{
"description": "Rose Gold iPhone Xs 256GB",
"quantity": 1,
"price": 2000,
"brand": "Apple",
"model": "iPhone Xs Rose Gold"
}
]
}

Success Response Example

Our response will then contain thew new application token for the new partially refunded app

{
"status": "ok",
"message": "Partial refund processed",
"token": "c28ae115-c542-41d5-bbb9-d792392c0106"
}