Requests

Pay

The Pay action is the default action for the Swish Service. With this action a new transaction will be initiated.

Pay request

Example pay request:

{
    "Currency": "SEK",
    "AmountDebit": 1.0,
    "Description": "Automated test Swish",
    "Invoice": "Automatedtest_Swish_0001_{{#buck_timestamp}}",
    "ReturnURL": "https://www.buckaroo.nl",
    "ReturnURLCancel": "https://www.buckaroo.nl/annuleren",
    "ReturnURLError": "https://www.buckaroo.nl/mislukt",
    "ReturnURLReject": "https://www.buckaroo.nl/geweigerd",
    "ClientIP": {
        "Type": 0,
        "Address": "0.0.0.0"
    },
    "Services": {
        "ServiceList": [
            {
                "Name": "Swish",
                "Action": "Pay"
            }
        ]
    }

Pay response

Example pay response:

{
    "Key": "4AD26FC3CA414D98B73E0EC7296C0228",
    "Status": {
        "Code": {
            "Code": 791,
            "Description": "Pending processing"
        },
        "SubCode": {
            "Code": "S002",
            "Description": "An additional action is required: Redirect to Swish."
        },
        "DateTime": "2025-09-02T11:13:55"
    },
    "RequiredAction": {
        "RedirectURL": "https://testcheckout.buckaroo.nl/html/redirect.ashx?r=AD37066A833B4771A7F29209C6545E31",
        "RequestedInformation": null,
        "PayRemainderDetails": null,
        "Name": "Redirect",
        "TypeDeprecated": 0
    },
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "Invoice": "Automatedtest_Swish_0001_1756804433",
    "ServiceCode": "swish",
    "IsTest": true,
    "Currency": "SEK",
    "AmountDebit": 1.0,
    "TransactionType": "C402",
    "MutationType": 1,
    "RelatedTransactions": null,
    "ConsumerMessage": null,
    "Order": null,
    "IssuingCountry": null,
    "StartRecurrent": false,
    "Recurring": false,
    "CustomerName": null,
    "PayerHash": null,
    "PaymentKey": "49B4BB031613403C840BFE26C55F19FB"
}

Pay push

Example push:

{
    "Transaction": {
        "Key": " 4AD26FC3CA414D98B73E0EC7296C0228",
        "Invoice": "Testinvoice 123",
        "ServiceCode": "Swish",
        "Status": {
            "Code": {
                "Code": 190,
                "Description": "Success"
            },
            "SubCode": {
                "Code": "S990",
                "Description": "The request was successful."
            },
            "DateTime": "2025-09-02T10:27:34"
        },
        "IsTest": true,
        "Order": null,
        "Currency": "SEK",
        "AmountDebit": 1.0,
        "TransactionType": " C402",
        "Services": null,
        "CustomParameters": null,
        "AdditionalParameters": null,
        "MutationType": 1,
        "RelatedTransactions": null,
        "IsCancelable": false,
        "IssuingCountry": null,
        "StartRecurrent": false,
        "Recurring": false,
        "PayerHash": null,
        "PaymentKey": " 49B4BB031613403C840BFE26C55F19FB"
    }
}

Refund

Refund request

Example refund request:

{
    "Currency": "EUR",
    "AmountCredit": 1.0,
    "Invoice": "testinvoice 123",
    "OriginalTransactionKey": "948547CF2D8E456ABF3E84A948D62DAA",
    "Services": {
        "ServiceList": [
            {
                "Name": "Swish",
                "Action": "Refund"
            }
        ]
    }
}

Refund response

Example refund response:

{
    "Key": " A5119DE5DE0144AF9EC99D886269123",
    "Status": {
        "Code": {
            "Code": 190,
            "Description": "Success"
        },
        "SubCode": {
            "Code": "S990",
            "Description": "The request was successful."
        },
        "DateTime": "2020-01-08T16:05:56"
    },
    "RequiredAction": null,
    "Services": null,
    "CustomParameters": null,
    "AdditionalParameters": null,
    "RequestErrors": null,
    "Invoice": "testinvoice 123",
    "ServiceCode": " Twint",
    "IsTest": true,
    "Currency": "SEK",
    "AmountCredit": 1.0,
    "TransactionType": "C403",
    "MutationType": 1,
    "RelatedTransactions": [
        {
            "RelationType": "refund",
            "RelatedTransactionKey": "948547CF2D8E456ABF3E84A948D62DAA "
        }
    ],
    "ConsumerMessage": null,
    "Order": null,
    "IssuingCountry": null,
    "StartRecurrent": false,
    "Recurring": false,
    "CustomerName": null,
    "PayerHash": null,
    "PaymentKey": "4090E8741FE44442A09096D64E29345"
}

Refund push

Example push:

{
    "Transaction": {
        "Key": "A5119DE5DE0144AF9EC99D886269123",
        "Invoice": "testinvoice 123",
        "ServiceCode": "Swish",
        "Status": {
            "Code": {
                "Code": 190,
                "Description": "Success"
            },
            "SubCode": null,
            "DateTime": "2020-01-08T16:05:56"
        },
        "IsTest": true,
        "Order": null,
        "Currency": "SEK",
        "AmountCredit": 1.0,
        "TransactionType": "C403",
        "Services": null,
        "CustomParameters": null,
        "AdditionalParameters": null,
        "MutationType": 1,
        "RelatedTransactions": [
            {
                "RelationType": "refund",
                "RelatedTransactionKey": "948547CF2D8E456ABF3E84A948D62DAA"
            }
        ],
        "IsCancelable": false,
        "IssuingCountry": null,
        "StartRecurrent": false,
        "Recurring": false,
        "CustomerName": null,
        "PayerHash": null,
        "PaymentKey": null
    }
}