-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(vsaas): enable onboarding of Standard Merchant Accounts in Platform Organization #8231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(vsaas): enable onboarding of Standard Merchant Accounts in Platform Organization #8231
Conversation
Changed Files
|
hrithikesh026
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| #[router_derive::diesel_enum(storage_type = "text")] | ||
| #[strum(serialize_all = "snake_case")] | ||
| #[serde(rename_all = "snake_case")] | ||
| pub enum MerchantAccountRequestType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems an overkill to put this as common enums and deriving diesel stuff as this is specifically used for API request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expecting to use the same enum for the preferred merchant account creation as part of the platform organization settings - to be stored in the db, later.
…nktransfer * 'main' of github.com:juspay/hyperswitch: (211 commits) feat(tokenio): Add OpenBanking Redirection Flow (#8152) fix: Unified scarf setup (#8238) feat(health): Health check for Decision engine (#8243) chore: Update apple pay currency filter configs (#8217) refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879) chore(version): 2025.06.09.0 chore(postman): update Postman collection files ci(postman): add tunnel collection to postman tests (#8269) feat(connector): Added recurring payments support for split payments in Stripe (#8271) feat(connector): [STRIPE] Added Connector Tokenization Flow for Cards (#8248) refactor(core): introduce new field in payment_intent to handle longer return_url (#8135) fix(connector): [AUTHORIZEDOTNET] Remove country PM filters (#8278) refactor(config): redact config urls for hyperswitch vault (#8276) feat(vsaas): enable onboarding of Standard Merchant Accounts in Platform Organization (#8231) feat(router): add three_ds decision rule execute api (#8148) feat(router): Save payment method on payments confirm (V2) (#8090) ci(cypress): Add Airwallex Connector Test (#8187) feat(payment_methods): add `external_vault_details` for payments v2 sdk session call (#8003) fix(connector): [facilitapay] cpf is a required field (#8274) fix: Fixed spell check (#8227) ...
Type of Change
Description
Summary
This PR enhances the merchant onboarding system by allowing Platform Organizations to onboard and manage Standard Merchant Accounts, in addition to the existing Platform Merchant Account and Connected Merchant Accounts.
Background
Until now, a Platform Organization contained:
Key Changes
Organization RetrieveandOrganization UpdateAPIs.Additional Changes
Motivation and Context
To enable maintaining separate standalone merchant accounts in an organization with platform merchant capabilities.
How did you test it?
Create Platform Organization and Platform Merchant:
Request:
Expected Response:
{ "org_id": "org_f4sSAyBcjVzF2y0kNVBr", "org_name": "Platform Org", "org_type": "platform", "merchant_id": "merchant_1748946337", "merchant_account_type": "platform" }Create Merchant (Admin API):
Request:
Expected Response:
{ "merchant_id": "merchant_1748954658", "merchant_name": "Connected Merchant", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "ORSBBtzGCHe5xTQWyjU2VxEqEEC223hCzS5dOSHHUgOse74jmi8aDRqR6556hrxu", "redirect_to_merchant_with_http_post": false, "merchant_details": { "primary_contact_person": "John Test", "primary_phone": "sunt laborum", "primary_email": "[email protected]", "secondary_contact_person": "John Test2", "secondary_phone": "cillum do dolor id", "secondary_email": "[email protected]", "website": "https://www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "john", "last_name": "Doe" } }, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "payout_routing_algorithm": null, "sub_merchants_enabled": false, "parent_merchant_id": null, "publishable_key": "pk_dev_1541e0af88014d4092be7e323bfc7b3a", "metadata": { "city": "NY", "unit": "245", "compatible_connector": null }, "locker_id": "m0010", "primary_business_details": [ { "country": "US", "business": "default" } ], "frm_routing_algorithm": null, "organization_id": "org_f4sSAyBcjVzF2y0kNVBr", "is_recon_enabled": false, "default_profile": "pro_wXPSR3hvAgWC9dx4B4QB", "recon_status": "not_requested", "pm_collect_link_config": null, "product_type": "orchestration", "merchant_account_type": "standard" }User Create Merchant API:
Request:
Expected Response:
{ "merchant_id": "merchant_1748954749", "merchant_name": "Standard Merchant 2", "product_type": "orchestration", "merchant_account_type": "standard", "version": "v1" }Test Cases for Merchant Account Creation
OrganizationType::Standard
merchant_account_typein requestNoneStandardStandardConnectedOrganizationType::Platform (Platform merchant already exists)
(Platform Merchant can only be created when creating a Platform Organization)
merchant_account_typein requestallow_connected_merchantsNoneanyStandardStandardanyConnectedtrueConnectedfalseChecklist
cargo +nightly fmt --allcargo clippy