Skip to content

feat(coingate): Add Payment webhooks#7489

Merged
Gnanasundari24 merged 1 commit intomainfrom
8768-featconnector-add-payment-webhooks-for-coingate
Mar 21, 2025
Merged

feat(coingate): Add Payment webhooks#7489
Gnanasundari24 merged 1 commit intomainfrom
8768-featconnector-add-payment-webhooks-for-coingate

Conversation

@awasthi21
Copy link
Contributor

@awasthi21 awasthi21 commented Mar 12, 2025

Type of Change

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

Description

Added Payment Webhooks for Coingate

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?

Payment Create

 curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_htJGtinBYdZSRlmPWYuWrUidn7bURKvvJyonLRjipwjSdrtXZNA6CAF4pf7mVoUR' \
--data-raw '{
    "amount": 300,
    "currency": "EUR",
    "confirm": true,
    "email": "guest@example.com",
    "return_url": "https://google.com",
    "payment_method": "crypto",
    "payment_method_type": "crypto_currency",
    "payment_experience": "redirect_to_url",
    "payment_method_data": {
        "crypto": {
        }
    }
}'

Response

{
    "payment_id": "pay_LJzHbDcrRN4sJz5Z0TOE",
    "merchant_id": "postman_merchant_GHAction_e407c442-cb8f-487f-b3a1-97c65ceaf771",
    "status": "requires_customer_action",
    "amount": 300,
    "net_amount": 300,
    "shipping_cost": null,
    "amount_capturable": 300,
    "amount_received": null,
    "connector": "coingate",
    "client_secret": "pay_LJzHbDcrRN4sJz5Z0TOE_secret_pmlUK9sVTNOmDq3Y7aAM",
    "created": "2025-03-12T05:05:33.837Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": {
        "id": null,
        "name": null,
        "email": "guest@example.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": null,
    "payment_method": "crypto",
    "payment_method_data": {
        "crypto": {
            "pay_currency": null,
            "network": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_LJzHbDcrRN4sJz5Z0TOE/postman_merchant_GHAction_e407c442-cb8f-487f-b3a1-97c65ceaf771/pay_LJzHbDcrRN4sJz5Z0TOE_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": "redirect_to_url",
    "payment_method_type": "crypto_currency",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "217423",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "",
    "payment_link": null,
    "profile_id": "pro_fpjZpIX1wOB7jxvKU7Pr",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_kc7B39m3TmtvvlWtyvmV",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-03-12T05:20:33.837Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2025-03-12T05:05:34.751Z",
    "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
}
Screenshot 2025-03-12 at 10 36 48 AM ng…] Screenshot 2025-03-12 at 10 36 40 AM Screenshot 2025-03-12 at 10 35 08 AM Screenshot 2025-03-12 at 10 34 48 AM

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

@awasthi21 awasthi21 added the A-connector-integration Area: Connector integration label Mar 12, 2025
@awasthi21 awasthi21 self-assigned this Mar 12, 2025
@awasthi21 awasthi21 requested a review from a team as a code owner March 12, 2025 05:15
@semanticdiff-com
Copy link

semanticdiff-com bot commented Mar 12, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs  16% smaller
  crates/hyperswitch_connectors/src/connectors/coingate.rs  1% smaller
  crates/connector_configs/toml/development.toml Unsupported file format
  crates/connector_configs/toml/production.toml Unsupported file format
  crates/connector_configs/toml/sandbox.toml Unsupported file format

@awasthi21 awasthi21 changed the title 8768 featconnector add payment webhooks for coingate feat(coingate): Add Payment webhooks Mar 12, 2025
Comment on lines 468 to 469
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets use source verification key here

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets use source verification key here

@awasthi21 awasthi21 force-pushed the 8768-featconnector-add-payment-webhooks-for-coingate branch from bb750a1 to dc4fbf9 Compare March 18, 2025 11:21
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit fb8cba0 Mar 21, 2025
16 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the 8768-featconnector-add-payment-webhooks-for-coingate branch March 21, 2025 12:57
pixincreate added a commit that referenced this pull request Mar 24, 2025
…lobalpay-fixes

* 'main' of github.com:juspay/hyperswitch:
  feat(connector): [Recurly] Add record back support for recurly [V2] (#7544)
  refactor(webhook): add jwt authenticated endpoint to list unique webhook events for a profile (#7325)
  feat(core): Add three_ds_requestor_app_url in business_profile (#7589)
  feat(refunds): Add refunds diesel model support in V2 API (#7503)
  fix(connector): [globalpay] address 5xx due to deserialization issue when `account_name` is not passed (#7540)
  chore: update production endpoint url for globalPay (#7588)
  feat(connector): [Stripebilling] add record back support for stripebilling (#7561)
  feat(router): Make payment_method_subtype optional in payment_attempt [V2] (#7568)
  fix(connector): RSync voided status mapping in AuthorizeDotNet (#7566)
  chore(version): 2025.03.24.0
  feat(connector): [Coingate] implement refunds  (#7513)
  feat(connectors): [Redsys] add Psync and Rsync support (#7586)
  refactor(connector): [BRAINTREE] Pass email in payment requests (#7591)
  feat(webhook): Return events list and total_count on list initial delivery attempt call (#7243)
  refactor(router): make error_type generic in domain_models inorder to avoid conversion of errors in storage_impl (#7537)
  feat(router): [V2] Return connector customer reference IDs in `CustomerResponse` (#7319)
  feat: core changes for extended authorization (#6766)
  feat(coingate): Add Payment webhooks (#7489)
  refactor(dynamic_routing): change insert operation to upsert for dynamic_routing_stats (#7398)
  feat(connectors): [Redsys] add 3D secure card payment support, including transaction capture, cancellation, and refunds (#7508)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-integration Area: Connector integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants