feat(connector): GrabPay connector integration - #2063
Open
peeyushshukla-juspay wants to merge 85 commits into
Open
feat(connector): GrabPay connector integration#2063peeyushshukla-juspay wants to merge 85 commits into
peeyushshukla-juspay wants to merge 85 commits into
Conversation
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Clippy with -D warnings (CI) rejected the fully-qualified hyperswitch_masking::Secret in should_do_session_token; Secret is already imported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…egration # Conflicts: # config/development.toml # config/production.toml # config/sandbox.toml # crates/integrations/connector-integration/src/connectors/stripe/transformers.rs # crates/types-traits/domain_types/src/connector_types.rs # crates/types-traits/grpc-api-types/proto/payment.proto # sdk/javascript/src/payments/_generated_grpc_client.ts
…payload Follow the same pattern as the initial authorize flow: fold the verify-redirect response's connector_feature_data (which carries the redirect callback, e.g. the OAuth code) into the payload once, then pass the payload straight to the access/session token steps — instead of cloning + mutating a per-call payload inside authorize_post_redirect. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
…refund and refund_sync
kanikac199
reviewed
Aug 7, 2026
kanikac199
reviewed
Aug 7, 2026
Contributor
|
request_code field (line 202) and its request_code: None init (line 1295) are unused, please drop them. |
kanikac199
previously approved these changes
Aug 7, 2026
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Comment on lines
+340
to
+352
| fn session_token_from_connector_feature_data( | ||
| connector_feature_data: Option<&common_utils::pii::SecretSerdeValue>, | ||
| ) -> Option<String> { | ||
| let metadata = | ||
| utils::to_connector_meta_from_secret::<serde_json::Value>(connector_feature_data.cloned()) | ||
| .ok()?; | ||
|
|
||
| metadata | ||
| .get("session_token") | ||
| .or_else(|| metadata.get("access_token")) | ||
| .and_then(serde_json::Value::as_str) | ||
| .map(ToOwned::to_owned) | ||
| } |
Contributor
There was a problem hiding this comment.
please raise an issue to revert this once Euler side changes for session token is done
Contributor
Author
There was a problem hiding this comment.
already created a ticket 👍
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
kanikac199
previously approved these changes
Aug 8, 2026
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Aishwariyaa-Anand
approved these changes
Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the GrabPay one-time-charge redirect wallet connector with Create Order, OAuth authorization, redirect verification, payment sync, refund, and refund sync support.
Flows Implemented
types.CompositePaymentService/Authorizetypes.CompositePaymentService/VerifyRedirectResponsetypes.CompositePaymentService/Gettypes.CompositePaymentService/Refundtypes.CompositeRefundService/Gettypes.EventService/HandleEventAdditional Changes
GRAB_PAYpayment method type, andgrabpayRedirectwallet data.Testing
1. Authorize - Redirect Pending
Response:
{ "authorizeResponse": { "connectorTransactionId": "<REDACTED_TRANSACTION_ID>", "status": "AUTHENTICATION_PENDING", "statusCode": 302, "redirectionData": { "uri": { "uri": "https://partner-api.grab.com/grabid/v1/oauth2/authorize?<REDACTED>" } }, "connectorFeatureData": { "value": "{\"state\":\"<REDACTED>\",\"nonce\":\"<REDACTED>\",\"code_verifier\":\"<REDACTED>\",\"redirect_uri\":\"https://example.com/payment/response\",\"partner_tx_id\":\"<REDACTED_TRANSACTION_ID>\",\"currency\":\"PHP\",\"request_code\":\"<REDACTED>\"}" } }, "createOrderResponse": { "connectorOrderId": "<REDACTED_REQUEST_CODE>", "status": "PENDING", "statusCode": 200 }, "compositeStatus": "COMPLETED" }2. Verify Redirect Response - Charge Success
Response:
{ "verifyRedirectResponse": { "rawConnectorResponse": { "value": "{\"code\":\"<REDACTED>\",\"state\":\"<REDACTED>\",\"error\":null}" }, "connectorFeatureData": { "value": "<REDACTED_CONNECTOR_FEATURE_DATA>" } }, "accessTokenResponse": { "accessToken": { "value": "<REDACTED_ACCESS_TOKEN>" }, "tokenType": "Bearer", "expiresInSeconds": "31535999", "status": "OPERATION_STATUS_SUCCESS", "statusCode": 200 }, "authorizeResponse": { "connectorTransactionId": "<REDACTED_CONNECTOR_TRANSACTION_ID>", "status": "CHARGED", "statusCode": 200, "connectorFeatureData": { "value": "{\"txID\":\"<REDACTED_CONNECTOR_TRANSACTION_ID>\",\"status\":\"success\",\"paymentMethod\":\"GPWALLET\",\"description\":\"\",\"reason\":\"\"}" } } }3. Payment Sync - Success
Response:
{ "getResponse": { "connectorTransactionId": "<REDACTED_CONNECTOR_TRANSACTION_ID>", "status": "CHARGED", "statusCode": 200, "amount": { "minorAmount": "1", "currency": "PHP" }, "connectorFeatureData": { "value": "{\"txID\":\"<REDACTED_CONNECTOR_TRANSACTION_ID>\",\"status\":\"success\",\"paymentMethod\":\"GPWALLET\",\"description\":\"\",\"txStatus\":\"success\",\"reason\":\"\"}" } } }4. Refund - Success
Response:
{ "refundResponse": { "connectorRefundId": "<REDACTED_REFUND_ID>", "status": "REFUND_SUCCESS", "statusCode": 200, "connectorTransactionId": "<REDACTED_TRANSACTION_ID>", "rawConnectorResponse": { "value": "{\"txID\":\"<REDACTED_CONNECTOR_REFUND_TRANSACTION_ID>\",\"status\":\"success\",\"paymentMethod\":\"GPWALLET\",\"description\":\"\",\"txStatus\":\"success\",\"reason\":\"\",\"echo\":null}" } } }5. Refund Sync - Success
Response:
{ "refundResponse": { "merchantRefundId": "<REDACTED_REFUND_ID>", "connectorRefundId": "<REDACTED_REFUND_ID>", "status": "REFUND_SUCCESS", "statusCode": 200, "connectorTransactionId": "<REDACTED_TRANSACTION_ID>", "rawConnectorResponse": { "value": "{\"txID\":\"<REDACTED_CONNECTOR_REFUND_TRANSACTION_ID>\",\"status\":\"success\",\"paymentMethod\":\"GPWALLET\",\"description\":\"\",\"txStatus\":\"success\",\"reason\":\"\",\"echo\":null}" } } }Validation
cargo fmt --checkcargo test -p connector-integration -- grabpaycargo check -p connector-integration -p composite-service -p grpc-server