Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Zeroplat – Ask a Question

Zeroplat – Ask a Question Logo Zeroplat – Ask a Question Logo

Zeroplat – Ask a Question Navigation

  • Home
  • Documentation
  • Zeroplat.io
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Documentation
  • Zeroplat.io
Home/ Questions/Q 237

Zeroplat – Ask a Question Latest Questions

deliveli
  • 1
  • 1
deliveliBegginer
Asked: August 27, 20252025-08-27T00:37:19+03:00 2025-08-27T00:37:19+03:00In: Permissions

How to configure success URL for Stripe?

  • 1
  • 1

Hi, I am attempting to setup self-service registration and subscription for customers. I am having an issue where when I try to go to the payment screen, it throws an error saying “Invalid URL”, and when I go to Stripe, it shows a relative URL that I cannot seem to adjust.

For context, here is my register page model OnPostAsync:

public async Task<IActionResult> OnPostAsync()
{
    if (!ModelState.IsValid)
    {
        await OnGetAsync(); // reload editions
        return Page();
    }

    // Confirm we are NOT in tenant context
    if (_currentTenant.Id != null)
    {
        throw new Exception("Cannot register a tenant while already in a tenant context.");
        //return Forbid(); // Registration should only be done as host
    }

    StartSubscriptionResultDto resultDto = await _multiTenancyAppService.RegisterAndSubscribeAsync(new SaasTenantCreateDto
    {
        Name = Input.TenantName,
        AdminEmailAddress = Input.Email,
        AdminPassword = Input.Password,
        EditionId = Input.EditionId,
        ActivationState = Volo.Saas.TenantActivationState.Passive
    });

    return LocalRedirectPreserveMethod("/Payment/GatewaySelection?paymentRequestId=" + resultDto.PaymentRequestId);
}

And here is my RegisterAndSubscribeAsync method:

public async Task<StartSubscriptionResultDto> RegisterAndSubscribeAsync(SaasTenantCreateDto input)
{
    if (input.EditionId == null || input.EditionId == Guid.Empty)
    {
        throw new UserFriendlyException("Please select a valid edition.");
    }

    // 1) Create tenant via domain layer (no host permission needed)
    var tenant = await _tenantManager.CreateAsync(input.Name, editionId: input.EditionId);

    tenant.SetActivationState(input.ActivationState); // keep passive until payment succeeds
    await _tenantRepository.InsertAsync(tenant, autoSave: true);

    // 2) Publish TenantCreatedEto to seed admin user (same as TenantAppService does)
    await _eventBus.PublishAsync(new TenantCreatedEto
    {
        Id = tenant.Id,
        Name = tenant.Name,
        Properties =
    {
        {"AdminEmail", input.AdminEmailAddress},
        {"AdminPassword", input.AdminPassword}
    }
    });

    // 3) Start subscription (creates PaymentRequest with TenantId/EditionId extra props)
    PaymentRequestWithDetailsDto paymentRequest = await _subscriptionAppService.CreateSubscriptionAsync(input.EditionId ?? Guid.Empty, tenant.Id);

    return new StartSubscriptionResultDto
    {
        TenantId = tenant.Id,
        PaymentRequestId = paymentRequest.Id,
    };
}

I have tried to set the callbackurl, prepaymenturl, and postpaymenturl in appsettings, but that doesn’t seem to do anything (stripe keys redacted for security):

"PaymentWebOptions": {
  "RootUrl": "https://armadasoftware.io",
  "CallBackUrl": "https://armadasoftware.io/Payment/Stripe/PostPayment",
  "PaymentGatewayWebConfigurationDictionary": {
    "Stripe": {
      "PrePaymentUrl": "https://armadasoftware.io/Payment/Stripe/PrePayment",
      "PostPaymentUrl": "https://armadasoftware.io/Payment/Stripe/PostPayment"
    }
  }
},
"Payment": {
  "Stripe": {
    "PublishableKey": "",
    "SecretKey": "",
    "WebhookSecret": ""
  }
},

When I get this error, I go to Stripe Webhook logs, and I find this:
image.png
image.png
So it is saying the URL is invalid, and the success URL is a relative URL, which seems problematic, but I cannot seem to find a configuration or anything in the documentation that allows me to set a success URL such that it overrides this. I tried setting the success url in the stripe section of appsettings, but that didn’t work either. Please advise me on how to set this so it overrides whatever default URL is being sent to Stripe here.

 

  • 0 0 Answers
  • 43 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Sidebar

Ask A Question

Stats

  • Questions 4
  • Answers 0
  • Best Answers 0
  • Users 2
  • Popular
  • Answers
  • Zeroplat

    Is PHP still a relevant language in 2025?

    • 0 Answers
  • Zeroplat

    Should I start with Django or JavaScript?

    • 0 Answers
  • Zeroplat

    Is this statement, “i see him last night” can be ...

    • 0 Answers

Top Members

deliveli

deliveli

  • 1 Question
  • 24 Points
Begginer
Zeroplat

Zeroplat

  • 3 Questions
  • 6 Points

Trending Tags

event-designer javascript language role

Explore

  • Home
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Add group
  • Groups page
  • Communities
  • Tags
  • Badges
  • Help

© 2025 Zeroplat. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.