added
Multicapture Refund
almost 2 years ago by Alexandros Fokianos
Release date 17 August 2021
Overview
Added new functionality to the multicapture to refund before finalizing the order.
The feature will reduce the order total amount and will automatically finalize the order once the total amount will be equal to the captured amount.
What's changed
Added a new call v2/payments/{token}/delay/refund
Parameters
Path
Attribute | Type | Description | Required |
---|---|---|---|
Order Token | string | The token of the Scalapay order | yes |
Body
Attribute | Type | Descriptiion | Required |
---|---|---|---|
refundAmount | Amount Object | The amount to refund | yes |
refundCapturedAmount | Amount Object | The amount to refund form the captured already amount | no |
marchantReference | string | The merchant reference of the refund | no |
Example payload
{
"refundAmount": {
"amount": "30",
"currency": "EUR"
},
"refundCapturedAmount": {
"amount": "20",
"currency": "EUR"
},
"merchantReference": "merchantOrder-1234"
}
Response
Attribute | Type | Description |
---|---|---|
openToCaptureAmount | Amount Object | Remaining amount to capture. |
token | string | Scalapay order unique token. |
captureStatus | string | Capture status of the scalapay order |
status | string | Order status of the scalapay order |
totalAmount | Amount Object | Total amount of the order. |
totalCapturedAmount | Amount Object | Total amount captured |
orderDetails | Order Details Object | Order Details |
Example response
{
"openToCaptureAmount": {
"amount": 150,
"currency": "EUR"
},
"token": "31KMO255PH",
"captureStatus": "delayed",
"status": "AUTHORIZED",
"totalAmount": {
"amount": 190,
"currency": "EUR"
},
"totalCapturedAmount": {
"amount": 40,
"currency": "EUR"
},
"orderDetails": {
"items": [
{
"sku": "12341234",
"gtin": "123458791330",
"name": "T-Shirt",
"brand": "TopChoice",
"price": {
"amount": "10.00",
"currency": "EUR"
},
"category": "clothes",
"quantity": 1,
"subcategory": [
"shirt",
"long-sleeve"
]
},
{
"sku": "12341235",
"gtin": "123458722222",
"name": "Jeans",
"brand": "TopChoice",
"price": {
"amount": "20.00",
"currency": "EUR"
},
"category": "clothes",
"quantity": 1,
"subcategory": [
"pants",
"jeans"
]
}
],
"billing": {
"name": "Joe Consumer",
"line1": "Via della Rosa, 58",
"suburb": "Montelupo Fiorentino",
"postcode": "50056",
"countryCode": "IT",
"phoneNumber": "0400000000"
},
"consumer": {
"email": "[email protected]",
"surname": "Consumer",
"givenNames": "Joe",
"phoneNumber": "0400000001"
},
"merchant": {
"redirectCancelUrl": "https://staging.portal.scalapay.com/failure-url",
"redirectConfirmUrl": "https://staging.portal.scalapay.com/success-url"
},
"shipping": {
"name": "Joe Consumer",
"line1": "Via della Rosa, 58",
"suburb": "Montelupo Fiorentino",
"postcode": "50056",
"countryCode": "IT",
"phoneNumber": "0400000000"
},
"discounts": [
{
"amount": {
"amount": "3.00",
"currency": "EUR"
},
"displayName": "10% Off"
}
],
"taxAmount": {
"amount": "3.70",
"currency": "EUR"
},
"totalAmount": {
"amount": "190.00",
"currency": "EUR"
},
"shippingAmount": {
"amount": "10.00",
"currency": "EUR"
},
"merchantReference": "merchantOrder-1234",
"captures": [
{
"amount": {
"amount": "40",
"currency": "EUR"
},
"recordedAt": "2021-03-24T23:09:12.077Z"
}
]
}
}