舒适

Learn more about SOFORT
SOFORT is a popular online banking payment method in Europe with high usage in Germany, Austria, Switzerland and Belgium. 85 million people use SOFORT, making it a must-have for any business wanting to operate in Europe.

特点 #

处理货币EUR,GBP,CHF
结算货币EUR
退款
部分退款
多次部分退款
扣款

整合方法 #

付款方式枚举值: sofort

There is integration method for SOFORT

  1. 直接应用程序接口
  2. 跳转收银台

直接 API #

如何整合 #

若要直接集成 API,只需一步即可创建 PaymentIntent 并获取 url。以下是创建付款意图的演示:

创建 PaymentIntent

A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add sofort to the list of payment method types.

要求

{
    "amount": 2000,
    "currency": "EUR",
    "confirm": true,
    "payment_method_data": {
        "type": "sofort",
        "billing_details": {
            "address": {
                "country": "DE"
            },
            "firstName": "Anthony",
            "lastName": "VDK"
        }
    },
    "return_url": "https://wooshpay.com"
}

回应

{
    "id": "pi_1670640606184996864",
    "object": "payment_intent",
    "created": 1687146734000,
    "livemode": false,
    "currency": "EUR",
    "amount": 2000,
    "status": "requires_action",
    "client_secret": "pi_1670640606184996864_secret_kcK3jYnN2GqGRsrJdFPoqDSR",
    "next_action": {
        "type": "redirect_to_url",
        "sofort_handle_redirect": {
            "url": "https://r3.girogate.de/ti/sofortueberweisungmixed?tx=2090826721&rs=8Vz3wcb3qZEEluexd4A9bAzkL7Z9QwKV&cs=868f629696faa261e32b8028f61def5bcce9a7d66e9800987c8a14a4320b74b7"
        }
    },
    "payment_method_types": [
        "sofort",
    ],
    "confirmation_method": "automatic",
    "return_url": "https://wooshpay.com",
    "payment_method": "pm_1670640606088527872",
    "capture_method": "automatic"
}

跳转收银台 #

付款流程 #

  1. Customer selects ShopeePay from the list of payment methods available and clicks on the Pay botton
output.png
  1. Customers will be redirected to ShopeePay’s page to select bank.
output (1).png
  1. Customers approve payment via online banking.
下载.png
下载 (2).png
  1. Confirm the transaction by providing the TAN.
下载 (1).png

创建会话 #

要求

{
    "cancel_url": "www.wooshpay.com",
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "payment_method_types": [
        "sofort"
    ],
    "line_items": [
        {
            "price_data": {
                "currency": "GBP",
                "product": null,
                "unit_amount": 20000,
                "product_data": {
                    "name": "apple"
                },
                "billing_scheme": "testscheme",
                "lookup_key": "test_lookup_key"
            },
            "quantity": 1
        }
    ]
}

回应

{
    "id": "cs_1680928905768206336",
    "object": "checkout.session",
    "created": 1689599656000,
    "livemode": false,
    "currency": "GBP",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkouttest.wooshpay.com/pay/cs_test_1680928905768206336?key=pk_test_NTE2Njg1MDgwNDUzOTY4MDc2ODAxOm9Oa3pjN043U2dYWE84VVhGZmF4cThvTTE2ODY2MzgyOTYzMjU",
    "cancel_url": "www.wooshpay.com",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1680928905801760768",
                "object": "item",
                "currency": "GBP",
                "description": "apple",
                "price": {
                    "id": "price_1680928905814343680",
                    "object": "price",
                    "created": 1689599656000,
                    "livemode": false,
                    "active": false,
                    "currency": "GBP",
                    "product": {
                        "id": "prod_1680928905826926592",
                        "object": "product",
                        "created": 1689599656000,
                        "livemode": false,
                        "active": false,
                        "name": "apple",
                        "updated": 1689599656000
                    },
                    "type": "one_time",
                    "unit_amount": 20000,
                    "billing_scheme": "per_unit",
                    "lookup_key": "test_lookup_key"
                },
                "quantity": 1,
                "amount_subtotal": 20000,
                "amount_total": 20000
            }
        ]
    },
    "payment_intent": "pi_1680928905998893056",
    "payment_method_types": [
        "sofort"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 20000,
    "amount_total": 20000,
    "billing_address_collection": "auto",
    "expires_at": 1689686055943,
    "payment_link": "",
    "client_secret": "pi_1680928905998893056_secret_zV5ZpRdTfntPMBcPWp8tSAir"
}

下一步 #

您可以根据需要为集成添加更多功能

创建 Webhook #

监听 WooshPay 账户上的事件,以便您的集成可以自动触发反应。创建一个 webhook,主要关注 enabled_events 和 url。

创建退款 #

创建退款,将资金返还给客户。您也可以执行部分退款,但并非每种支付方式都支持。部分退款是指只退还原始交易金额的一部分。

What are your feelings
Updated on 8月 9, 2023