Skip to content

feat(core): add intent_fulfillment_time configuration to temp locker#10877

Merged
Gnanasundari24 merged 4 commits into
mainfrom
add_fulfillment_time_to_temp_locker
Jan 12, 2026
Merged

feat(core): add intent_fulfillment_time configuration to temp locker#10877
Gnanasundari24 merged 4 commits into
mainfrom
add_fulfillment_time_to_temp_locker

Conversation

@Sakilmostak

@Sakilmostak Sakilmostak commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Currently when payout_method_data is saved in redis, the expiry is set to default time i.e 15 minutes.

For merchant, they might want the fulfillment time to be greater than the default time for their business requirement.

To resolve it, we need to add a configuration which can give merchant leverage to set fulfillment time based on their requirement.

Note: A field called intent_fulfillment_time is already present in business profile which can be used to infer the data.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Tested through Postman:

  • Create an MCA(Paypal Payout):
  • Update Profile with intent_fulfillment_time to 60 seconds
{
    "intent_fulfillment_time": 1800
}

Case 1:

  • Create an Payout Create API call with
{
    "amount": 1,
    "currency": "EUR",
    "customer_id": "payout_customer",
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "wallet",
    
    "payout_method_data": {
        "wallet": {
            "paypal": {
                
                "telephone_number": "16608213349"
            }
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "NY",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "entity_type": "NaturalPerson",
    "recurring": false,
    "metadata": {
        "ref": "123"
    },
    "confirm": true,
    "auto_fulfill": false
}
  • Do a fulfillment API call before 1 mins
curl --location '{{baseUrl}}/payouts/{{payout_id}}/fulfill' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{api-key}}' \
--data '{
    "payout_id": "{{payout_id}}"
}'

Case 2:

  • Create an Payout Create API call with
{
    "amount": 1,
    "currency": "EUR",
    "customer_id": "payout_customer",
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "wallet",
    
    "payout_method_data": {
        "wallet": {
            "paypal": {
                
                "telephone_number": "16608213349"
            }
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "NY",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "entity_type": "NaturalPerson",
    "recurring": false,
    "metadata": {
        "ref": "123"
    },
    "confirm": true,
    "auto_fulfill": false
}
  • Do a fulfillment API call before 1 mins
curl --location '{{baseUrl}}/payouts/{{payout_id}}/fulfill' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{api-key}}' \
--data '{
    "payout_id": "{{payout_id}}"
}'

Response should be following:

{
    "payout_id": "payout_w7wQTSh1IyRg7nLD4D9S",
    "merchant_id": "merchant_1767966875",
    "merchant_order_reference_id": null,
    "amount": 1,
    "currency": "EUR",
    "connector": "paypal",
    "payout_type": "wallet",
    "payout_method_data": {
        "wallet": {
            "email": null,
            "telephone_number": "*********49",
            "paypal_id": null
        }
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "NY",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "auto_fulfill": false,
    "customer_id": "payout_customer",
    "customer": {
        "id": "payout_customer",
        "name": "John Doe",
        "email": "payout_customer@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "client_secret": "payout_payout_w7wQTSh1IyRg7nLD4D9S_secret_pC5LX2a1KeKFLkI58ec9",
    "return_url": null,
    "business_country": null,
    "business_label": null,
    "description": "Its my first payout request",
    "entity_type": "NaturalPerson",
    "recurring": false,
    "metadata": {
        "ref": "123"
    },
    "merchant_connector_id": "mca_vEfkChGn7N93ms0GIhFH",
    "status": "pending",
    "error_message": null,
    "error_code": null,
    "profile_id": "pro_srNadb4ZbWJygpg9P2G4",
    "created": "2026-01-12T09:04:14.880Z",
    "connector_transaction_id": "7VLZM6SQE35UU",
    "priority": null,
    "payout_link": null,
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "unified_code": null,
    "unified_message": null,
    "payout_method_id": null
}

Response should be following :

{
    "error": {
        "type": "invalid_request",
        "message": "Token is invalid or expired",
        "code": "IR_29"
    }
}

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@Sakilmostak Sakilmostak self-assigned this Jan 8, 2026
@Sakilmostak Sakilmostak added A-core Area: Core flows C-feature Category: Feature request or enhancement Payouts Area: Payouts labels Jan 8, 2026
@semanticdiff-com

semanticdiff-com Bot commented Jan 8, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payment_methods/vault.rs  2% smaller
  crates/router/src/core/authentication/utils.rs Unsupported file format
  crates/router/src/core/payment_methods/cards.rs  0% smaller
  crates/router/src/core/payouts/helpers.rs  0% smaller
  crates/router/src/core/unified_authentication_service/utils.rs Unsupported file format
  crates/router/src/core/webhooks/incoming.rs  0% smaller

@Sakilmostak Sakilmostak changed the title feat(core)): add intent_fulfillment_time configuration to temp locker feat(core): add intent_fulfillment_time configuration to temp locker Jan 8, 2026
@codecov

codecov Bot commented Jan 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@8df6cfb). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10877   +/-   ##
=======================================
  Coverage        ?        0           
=======================================
  Files           ?        0           
  Lines           ?        0           
  Branches        ?        0           
=======================================
  Hits            ?        0           
  Misses          ?        0           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Sakilmostak Sakilmostak marked this pull request as ready for review January 9, 2026 10:07
@Sakilmostak Sakilmostak requested review from a team as code owners January 9, 2026 10:07
kashif-m
kashif-m previously approved these changes Jan 12, 2026
ShankarSinghC
ShankarSinghC previously approved these changes Jan 12, 2026
@Sakilmostak Sakilmostak dismissed stale reviews from ShankarSinghC and kashif-m via d163591 January 12, 2026 11:23
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 12, 2026
Merged via the queue into main with commit c87e82a Jan 12, 2026
31 of 34 checks passed
@Gnanasundari24 Gnanasundari24 deleted the add_fulfillment_time_to_temp_locker branch January 12, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core flows C-feature Category: Feature request or enhancement Payouts Area: Payouts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants