Skip to content

Conversation

@Shubhodip900
Copy link
Collaborator

@Shubhodip900 Shubhodip900 commented Dec 4, 2025

Description

Added Trustpay as connector with following flows:

  • Refund
  • RSync

Added payment_method field in .proto as trustpay need different header for different payment methods.

Motivation and Context

Additional Changes

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

How did you test it?

Tested Using HS <> UCS tunnel

  1. Refund Flow :-
    Request
{
  "payment_id": "pay_UW6JFQouNv1VvbBqWCsn",
  "amount": 6000,
  "reason": "Customer returned product",
  "refund_type": "instant",
  "metadata": {
    "udf1": "value1",
    "new_customer": "true",
    "login_date": "2019-09-10T10:11:12Z"
  }
}

Response

{
    "refund_id": "ref_bdgsXzb3jcOv42TXPjW7",
    "payment_id": "pay_UW6JFQouNv1VvbBqWCsn",
    "amount": 6000,
    "currency": "USD",
    "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-12-05T11:57:17.177Z",
    "updated_at": "2025-12-05T11:57:17.721Z",
    "connector": "trustpay",
    "profile_id": "pro_OZ0QOMyj0DpOSwKmSs6p",
    "merchant_connector_id": "mca_8KKxRfJAhTIR7TBYqb9D",
    "split_refunds": null,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "raw_connector_response": null
}
  1. RSync Flow :-
    Response
{
    "refund_id": "ref_bdgsXzb3jcOv42TXPjW7",
    "payment_id": "pay_UW6JFQouNv1VvbBqWCsn",
    "amount": 6000,
    "currency": "USD",
    "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-12-05T11:57:17.177Z",
    "updated_at": "2025-12-05T11:57:24.300Z",
    "connector": "trustpay",
    "profile_id": "pro_OZ0QOMyj0DpOSwKmSs6p",
    "merchant_connector_id": "mca_8KKxRfJAhTIR7TBYqb9D",
    "split_refunds": null,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "raw_connector_response": null
}

Diff Check Result :-

  1. Refund:-
Screenshot 2025-12-05 at 5 50 44 PM
  1. RSync :-
Screenshot 2025-12-05 at 5 51 19 PM

@Shubhodip900 Shubhodip900 requested review from a team as code owners December 4, 2025 11:05
@Shubhodip900 Shubhodip900 self-assigned this Dec 4, 2025
gopikrishna000
gopikrishna000 previously approved these changes Dec 5, 2025
@Aishwariyaa-Anand Aishwariyaa-Anand added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@Aishwariyaa-Anand Aishwariyaa-Anand added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 505dd74 Dec 9, 2025
11 checks passed
@Aishwariyaa-Anand Aishwariyaa-Anand deleted the trustpay_refund_rsync branch December 9, 2025 08:34
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.

5 participants