added

Multicapture Refund

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

AttributeTypeDescriptionRequired
Order TokenstringThe token of the Scalapay orderyes

Body

AttributeTypeDescriptiionRequired
refundAmountAmount ObjectThe amount to refundyes
refundCapturedAmountAmount ObjectThe amount to refund form the captured already amountno
marchantReferencestringThe merchant reference of the refundno

Example payload

{
    "refundAmount": {
        "amount": "30",
        "currency": "EUR"
    },
    "refundCapturedAmount": {
        "amount": "20",
        "currency": "EUR"
    }, 
    "merchantReference": "merchantOrder-1234"
}

Response

AttributeTypeDescription
openToCaptureAmountAmount ObjectRemaining amount to capture.
tokenstringScalapay order unique token.
captureStatusstringCapture status of the scalapay order
statusstringOrder status of the scalapay order
totalAmountAmount ObjectTotal amount of the order.
totalCapturedAmountAmount ObjectTotal amount captured
orderDetailsOrder Details ObjectOrder 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"
            }
        ]
    }
}