feat(connector): [facilitapay] fix refunds, add webhook and void support#8778
Merged
likhinbopanna merged 7 commits intomainfrom Jul 31, 2025
Merged
feat(connector): [facilitapay] fix refunds, add webhook and void support#8778likhinbopanna merged 7 commits intomainfrom
likhinbopanna merged 7 commits intomainfrom
Conversation
Changed Files
|
e0598bb to
5a48c90
Compare
deepanshu-iiitu
previously approved these changes
Jul 29, 2025
…acilitapay-webhooks * 'main' of github.com:juspay/hyperswitch: fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741) feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720) feat(connector): [FISERV] Added GooglePay Payment Method - Connector Decryption Flow (#8658) feat(connector): [BLUECODE] Added Template Code (#8756) chore(version): 2025.07.29.0
awasthi21
approved these changes
Jul 29, 2025
deepanshu-iiitu
approved these changes
Jul 29, 2025
deepanshu-iiitu
approved these changes
Jul 29, 2025
pixincreate
added a commit
that referenced
this pull request
Jul 31, 2025
…dd-xof-cybersource * 'main' of github.com:juspay/hyperswitch: feat(authentication): added authentication sync api (#8596) feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778) feat(connector): [payload] add recurring payments (#8597) chore(version): 2025.07.31.0 feat(connector): [Flexiti]Add support for flexiti connector (#8743) chore(router): events enhancement for kafka (#8780) ci(cypress): Making a mandate payment with large customer user agents (#8790)
pixincreate
added a commit
that referenced
this pull request
Aug 1, 2025
…rver * 'main' of github.com:juspay/hyperswitch: (25 commits) chore: `xof` currency to cybersource cards (#8799) chore(version): 2025.08.01.0 feat(core): Implement UCS based upi for paytm and phonepe (#8732) feat(connector): [katapult]add template code for katapult (#8783) feat(router): introduce `feature` and `feature_data` to gsm (#7771) feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation (#8768) feat(authentication): added authentication sync api (#8596) feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778) feat(connector): [payload] add recurring payments (#8597) chore(version): 2025.07.31.0 feat(connector): [Flexiti]Add support for flexiti connector (#8743) chore(router): events enhancement for kafka (#8780) ci(cypress): Making a mandate payment with large customer user agents (#8790) fix(openapi): update create_platform endpoint in api-reference docs (#8782) chore(version): 2025.07.30.0 fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs (#8568) feat(routing): Add api-refs for new decision engine endpoints (#8709) fix: replace xtrim with xdel to support older redis version (#8515) fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741) feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720) ...
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.
Type of Change
Description
This Facilitapay PR introudces 2 new features and a bug fix which is described below:
refundmeans voiding a paymentGETcall with no request bodyrefund_received_transactionmeans refunding a paymentGETcall with no request bodyAdditional Changes
Motivation and Context
closes #8777
How did you test it?
Partial refunds
{ "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "Partial refund not supported by Facilitapay is not supported by Facilitapay" } }Refunds
{ "refund_id": "ref_bEMav88LA7llD0KS6Twk", "payment_id": "pay_le5uOFoizxZPXFHPQuK1", "amount": 10400, "currency": "BRL", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-07-28T18:43:11.748Z", "updated_at": "2025-07-28T18:43:12.819Z", "connector": "facilitapay", "profile_id": "pro_ODZKRkH2uJIfAPClUy8B", "merchant_connector_id": "mca_A4Kpc6NUvBsN8RGvvJsm", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null }will introduce cypress in a separate pr
Void
{ "payment_id": "pay_XIq2h8snAnSp425StpHM", "merchant_id": "postman_merchant_GHAction_1753728068", "status": "cancelled", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_XIq2h8snAnSp425StpHM_secret_Za7LqUCCvag8LBMCyYBp", "created": "2025-07-28T18:44:39.081Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_ODZKRkH2uJIfAPClUy8B", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-28T18:59:39.081Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-28T18:44:43.912Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null }Webhook Setup
{ "data": { "secret": "1111" } }Payment Webhook
Source verification:
Incoming Webhook Logs:
Outgoing Webhook:
Refund Webhook
The
payment_refundedwebhook is only sent for a very specific use case - when a pix payment is automatically refunded because it was paid from a third-party account. for regular api-initiated refunds, facilitapay sends the same identified and wire_created webhooks as for payments, making it impossible to distinguish between payment and refund webhooks.Checklist
cargo +nightly fmt --alljust clippy && just clippy_v2