Join our FREE personalized newsletter for news, trends, and insights that matter to everyone in America

Newsletter
New

How To Configure Ing Psd2 Callback Url And Implement Marketplace Payment Splitting In Blazor Server App

Card image cap

I’m developing a Blazor Server web application similar to Airbnb, where hosts list properties and guests book them. The app consumes a RESTful API for backend operations. I need to implement two features:

  1. Bank Account Verification for Hosts: Verify EU bank accounts (e.g., IBAN) to ensure hosts can receive payments.
  2. Marketplace Checkout for Guests: Process payments from guests, splitting the amount between the host and the platform, supporting EU payment methods like iDEAL and SEPA.

What I’ve Tried

  • ING Business Bank Account (PSD2 API):

    • Implemented bank verification using ING’s PSD2 API to retrieve account details.
    • Issue: The documentation requires example.com as a callback URL, which is unclear for production setup. I couldn’t find clear guidance on configuring a custom callback URL.
    • For checkout, ING Checkout relies on plugins (e.g., for WooCommerce), which are incompatible with my custom-built Blazor app.
  • Tink:

    • Tested Tink for bank verification via their API.
    • Issue: The monthly subscription cost (four-digit range) is too high for my startup.
  • Mollie:

    • Explored Mollie for payments.
    • Issue: Mollie supports one-to-one payments but lacks native marketplace functionality for splitting payments between hosts and the platform.

Current Implementation My app uses a clean architecture:

  • Frontend: Blazor Server with Razor Pages (e.g., Profile.razor for host profile management).
  • Backend: ASP.NET Core RESTful API with services like IngService.cs for PSD2 verification.
  • Database: Entity Framework Core for storing host and order data.
  • Existing Code: I have a working IngService.cs for PSD2 bank verification (using OAuth2 and eIDAS certificates) and a Profile.razor page where hosts enter their IBAN and bank name.

Here’s a simplified version of my current bank verification flow:

// IngService.cs (simplified)  
public class IngService : IIngService  
{  
    private readonly IHttpClientFactory _httpClientFactory;  
    private readonly IConfiguration _configuration;  
  
    public IngService(IHttpClientFactory httpClientFactory, IConfiguration configuration)  
    {  
        _httpClientFactory = httpClientFactory;  
        _configuration = configuration;  
    }  
  
    public string GetAuthorizationUrl(string redirectUri, string userId)  
    {  
        var clientId = _configuration["IngBank:ClientId"];  
        var scopes = HttpUtility.UrlEncode("payment-accounts:balances:view payment-accounts:transactions:view");  
        return $"{_configuration["IngBank:AuthBaseUrl"]}/authorize/v2/NL?client_id={clientId}&scope={scopes}&state={userId}&response_type=code&redirect_uri={HttpUtility.UrlEncode(redirectUri)}";  
    }  
  
    // Other methods for token exchange and account details  
}  

Specific Questions

  • Bank Verification:

How can I configure a custom callback URL for ING’s PSD2 API in a production Blazor Server app? The example.com requirement in their documentation is confusing. Are there alternative API-based approaches to verify EU bank accounts that integrate well with Blazor Server and RESTful APIs, ideally with clear documentation and lower costs?

  • Marketplace Checkout:

How can I implement payment splitting (host and platform) in a Blazor Server app using a RESTful API? For example, how do I structure the API calls and database updates to handle split payments? What’s the best way to integrate EU payment methods (e.g., iDEAL, SEPA) without relying on e-commerce platform plugins?

Requirements

  • Environment: Blazor Server, .NET 8, RESTful API, Entity Framework Core.
  • Region: EU (Netherlands-focused for iDEAL).
  • Constraints: Must be affordable for a startup, avoid plugins designed for platforms like WooCommerce, and support marketplace payment splitting.

What I’m Looking For

  • Code examples or patterns for integrating bank verification and payment splitting in Blazor Server.
  • Solutions to specific issues (e.g., ING PSD2 callback URL configuration).
  • Best practices for handling payment webhooks and updating order status in a database.

I’d appreciate any code snippets, configuration tips, or guidance on overcoming these challenges. Thanks!