Skip to content

Comments

feat: adding purpose of payment to quote#214

Merged
pengying merged 1 commit intomainfrom
02-19-feat_adding_purpose_of_payment_to_quote
Feb 20, 2026
Merged

feat: adding purpose of payment to quote#214
pengying merged 1 commit intomainfrom
02-19-feat_adding_purpose_of_payment_to_quote

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Feb 20, 2026

Adding purpose of payment to quotes

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pengying pengying marked this pull request as ready for review February 20, 2026 02:04
@pengying pengying force-pushed the 02-19-feat_adding_purpose_of_payment_to_quote branch from 9800c97 to 1e1e9d2 Compare February 20, 2026 02:04
@github-actions
Copy link

github-actions bot commented Feb 20, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(api): add purposeOfPayment parameter to quote create

openapi

feat(api): add purposeOfPayment field to QuoteRequest

python

feat(api): add purpose_of_payment parameter to quotes create method

typescript

feat(api): add purposeOfPayment parameter to quotes create
grid-openapi studio · code

Your SDK built successfully.
generate ✅

grid-typescript studio · code

Your SDK built successfully.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/276ab08f050996fa228bca5fa61967cd173f099e/dist.tar.gz
grid-python studio · code

Your SDK built successfully.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/4f09da11f22417f2afffd8896d9765d755aa7f04/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK built successfully.
generate ✅build ✅lint ✅test ✅


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-02-20 02:26:33 UTC

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Adds purposeOfPayment field to quote requests, moving it from senderCustomerInfo.PURPOSE_OF_PAYMENT to a top-level field with a dedicated enum schema.

  • Created new PurposeOfPayment schema with 12 enum values (GIFT, SELF, GOODS_OR_SERVICES, etc.)
  • Added optional purposeOfPayment field to QuoteRequest schema
  • Updated documentation to show new field usage instead of senderCustomerInfo pattern
  • Both bundled OpenAPI specs (openapi.yaml and mintlify/openapi.yaml) regenerated

Issues found:

  • CLI not updated: cli/src/commands/quotes.ts:180 still uses old senderCustomerInfo.PURPOSE_OF_PAYMENT pattern
  • Enum inconsistency: New PurposeOfPayment enum differs from existing NgnAccountExternalAccountInfo.purposeOfPayment (different order, additional TRAVEL/OTHER values)

Confidence Score: 3/5

  • Safe to merge with follow-up work needed for CLI update and enum consistency
  • The OpenAPI schema changes are well-structured and documentation is properly updated. However, the CLI still uses the old pattern and there's an inconsistency with existing purposeOfPayment enums that should be addressed
  • Review cli/src/commands/quotes.ts for CLI update and openapi/components/schemas/external_accounts/NgnAccountExternalAccountInfo.yaml for enum consistency

Important Files Changed

Filename Overview
openapi/components/schemas/quotes/PurposeOfPayment.yaml New schema defining purpose of payment enum with 12 values for quote requests
openapi/components/schemas/quotes/QuoteRequest.yaml Added purposeOfPayment field to quote request schema, creating potential dual paths with senderCustomerInfo
mintlify/snippets/sending/cross-currency.mdx Updated documentation to use new purposeOfPayment field instead of senderCustomerInfo.PURPOSE_OF_PAYMENT

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Client creates quote request] --> B{Payment corridor requires<br/>purpose of payment?}
    B -->|Yes<br/>e.g., India| C[Include purposeOfPayment field<br/>GIFT, SELF, GOODS_OR_SERVICES, etc.]
    B -->|No| D[Optional: Include purposeOfPayment]
    C --> E[POST /quotes]
    D --> E
    E --> F[Quote created with locked rate]
    F --> G[Execute quote]
    G --> H[Payment processed]
Loading

Last reviewed commit: 93ac62f

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +5 to +17
enum:
- GIFT
- SELF
- GOODS_OR_SERVICES
- EDUCATION
- HEALTH_OR_MEDICAL
- REAL_ESTATE_PURCHASE
- TAX_PAYMENT
- LOAN_PAYMENT
- UTILITY_BILL
- DONATION
- TRAVEL
- OTHER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent with existing purposeOfPayment enum in NgnAccountExternalAccountInfo.yaml. The NGN schema has different order (LOAN_PAYMENT before TAX_PAYMENT) and is missing TRAVEL and OTHER values. Consider unifying these enums or using a $ref to share the same definition.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/quotes/PurposeOfPayment.yaml
Line: 5-17

Comment:
Inconsistent with existing `purposeOfPayment` enum in `NgnAccountExternalAccountInfo.yaml`. The NGN schema has different order (`LOAN_PAYMENT` before `TAX_PAYMENT`) and is missing `TRAVEL` and `OTHER` values. Consider unifying these enums or using a `$ref` to share the same definition.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +47 to +48
purposeOfPayment:
$ref: ./PurposeOfPayment.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI (cli/src/commands/quotes.ts:180) still uses the old pattern senderCustomerInfo.PURPOSE_OF_PAYMENT instead of this new top-level purposeOfPayment field. Update the CLI to use the new field.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/quotes/QuoteRequest.yaml
Line: 47-48

Comment:
The CLI (`cli/src/commands/quotes.ts:180`) still uses the old pattern `senderCustomerInfo.PURPOSE_OF_PAYMENT` instead of this new top-level `purposeOfPayment` field. Update the CLI to use the new field.

How can I resolve this? If you propose a fix, please make it concise.

@pengying pengying merged commit 631c5c8 into main Feb 20, 2026
8 of 9 checks passed
@pengying pengying deleted the 02-19-feat_adding_purpose_of_payment_to_quote branch February 20, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants