hyperswitch
hyperswitch copied to clipboard
fix: reference added in sepa_bank_instructions
Type of Change
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
'reference' added in sepa_bank_instructions, for Stripe Sepa Bank Transfer
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?
Request
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: <apiKey>' \
--data-raw '{
"amount": 60,
"authentication_type": "no_three_ds",
"confirm": true,
"currency": "EUR",
"customer_id": "StripeCustomer",
"payment_method": "bank_transfer",
"payment_method_type": "sepa",
"payment_method_data": {
"bank_transfer": {
"sepa_bank_transfer" : {
"billing_details" : {
"email" : "[email protected]",
"name" : "Rajanikanth"
},
"country" : "DE"
}
}
}
}'
The successful output :
{
"payment_id": "pay_bLamnDrh3V3GefetEL3Tm",
"merchant_id": "merchant_1727948661",
"status": "requires_customer_action",
"amount": 60,
"net_amount": 60,
"amount_capturable": 60,
"amount_received": 0,
"connector": "stripe",
"client_secret": "pay_bLamnDrh3V3cefctEL3Tm_secret_QsqbBrkZn2pI7cerfer",
"created": "2024-10-03T13:25:34.962Z",
"currency": "EUR",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"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": "bank_transfer",
"payment_method_data": {
"bank_transfer": {
"sepa": {}
},
"billing": null
},
"payment_token": "token_kwd45640isqRNJdwedwB",
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "display_bank_transfer_information",
"bank_transfer_steps_and_charges_details": {
"sepa_bank_instructions": {
"account_holder_name": "ABCD France",
"bic": "SOGEDEFFXXX",
"country": "DE",
"iban": "DE4039739XXXXXXXX89727",
"reference": "8NXKXQARUC9X"
},
"receiver": {
"amount_received": 0,
"amount_charged": null,
"amount_remaining": 60
}
}
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "sepa",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1727961934,
"expires": 1727965534,
"secret": "epk_f8ad2600b91b47bcaa762322eaa6f5f3"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3Q5p2CEOxxxxxx0EG1g4Ou",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pi_3Q5p2CEOxxxxxx0EG1g4Ou",
"payment_link": null,
"profile_id": "pro_TSOb6xQbAkCdcsTtYf6C",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_XjEZ8bwoCedxxxdE3u",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-10-03T13:40:34.962Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-10-03T13:25:36.680Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null
}
Checklist
- [x] I formatted the code
cargo +nightly fmt --all - [x] I addressed lints thrown by
cargo clippy - [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
Review changes with SemanticDiff.
Analyzed 4 of 4 files.
Overall, the semantic diff is 32% smaller than the GitHub diff.
| Filename | Status | |
|---|---|---|
| :heavy_check_mark: | crates/router/src/connector/stripe/transformers.rs | 41.19% smaller |
| :heavy_check_mark: | crates/api_models/src/payments.rs | Analyzed |
| :heavy_check_mark: | api-reference-v2/openapi_spec.json | 28.57% smaller |
| :heavy_check_mark: | api-reference/openapi_spec.json | 28.57% smaller |