hyperswitch
hyperswitch copied to clipboard
feat(router): collect customer address details based on business profile config regardless of connector required fields
Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
Always collect address details | Collect address details only if required by connector | Connector required fields | payment method list | Session call |
---|---|---|---|---|
False | False | False | False | False |
False | False | True | True | False |
False | True | True | True | True |
False | True | False | False | False |
True | True | False | True | True |
True | True | True | True | True |
True | False | False | True | True |
True | False | True | True | True |
Currently, we have business profile fields (collect_shipping_details_from_wallet_connector
and collect_billing_details_from_wallet_connector
) which will collect the address details from the wallet during the session call. Additionally, the address fields will be added to the payment method list, but only if these flags are enabled and the connector requires it.
This change is to collect address details (both billing and shipping) based on the merchant's requirements, regardless of the connector's required fields. The above details describes the behaviour of the payment method list and the session call based on the Always collect address details
, Collect address details only if required by connector
, and Connector required fields
.
-
Always collect address details
fields for this arealways_collect_shipping_details_from_wallet_connector
andalways_collect_billing_details_from_wallet_connector
-
Collect address details only if required by connector
fields for this arecollect_shipping_details_from_wallet_connector
andcollect_billing_details_from_wallet_connector
Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
-> Create a merchant connector account for cybersource and enable the below payment method
"payment_methods_enabled": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "invoke_sdk_client",
"payment_method_type": "klarna"
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "klarna"
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard",
"Discover",
"DinersClub"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"recurring_enabled": true,
"installment_payment_enabled": true,
"minimum_amount": 0,
"maximum_amount": 10000
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "paypal",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
-> Create a payment with confirm false
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_01Z3SBQylw8CnKOSkONabUTtrnFZ7PiR3FwnADNQynfZFoYy9de3QmGWaeEmiblD' \
--data '{
"amount": 10000,
"currency": "USD",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"confirm": false,
"customer_id": "cu_1721237981"
}'
Test case 1
curl --location 'http://localhost:8080/account/merchant_1721741844/business_profile/pro_vtlWLmrVdh8d3nYGqHFi' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": false,
"is_connector_agnostic_mit_enabled": false
}'
-> Perform merchant payment method list
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_gxXOqEflgTHCFXDSe4gw_secret_BX8QNVYb6TEWG9Td2b4O' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_cf008d4c3c134125ac1d1a1b8175d288'
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
},
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"cybersource"
]
},
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": false,
"collect_billing_details_from_wallets": false
}
-> Session call
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_cf008d4c3c134125ac1d1a1b8175d288' \
--data '{
"payment_id": "pay_gxXOqEflgTHCFXDSe4gw",
"wallets": [],
"client_secret": "pay_gxXOqEflgTHCFXDSe4gw_secret_BX8QNVYb6TEWG9Td2b4O"
}'
{
"payment_id": "pay_gxXOqEflgTHCFXDSe4gw",
"client_secret": "pay_gxXOqEflgTHCFXDSe4gw_secret_BX8QNVYb6TEWG9Td2b4O",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": false,
"email_required": false,
"shipping_address_parameters": {
"phone_number_required": false
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": false
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "cybersource",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721742967477,
"expires_at": 1721746567477,
"merchant_session_identifier": "SSH31A9B315225043E7B9F8526D7EF8E03D_C23A0D3024FAB8B12CBB67660B4C1B48ABF1272EC8B61399E3A647290C8BE67A",
"nonce": "f927f51c",
"merchant_identifier": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "applepay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018830820184020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333133353630375a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d0109043122042069535b60ec3dc589325bd95773f7ba7378c9f05a4b39e65efb030b27dfefc758300a06082a8648ce3d04030204473045022100b96c88ebb717e2622fc4519f8aa0957209aacce31a617798bac56e0b522c14610220150efef71f2b557775a2ed2ccb274ce32d64d28e07bd84be39a9fb9ba53404b3000000000000",
"operational_analytics_identifier": "applepay:76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"retries": 0,
"psp_id": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.hyperswitch.checkout"
},
"connector": "cybersource",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
-> For test purpose I have kept the shipping details in the connector required fields of apple pay boa
{
"payment_id": "pay_6aOv0gxeNHFFqSw2Einn",
"client_secret": "pay_6aOv0gxeNHFFqSw2Einn_secret_flyrD784FhtVfM68gT5J",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": false,
"email_required": false,
"shipping_address_parameters": {
"phone_number_required": false
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": false
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "bankofamerica",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721743409181,
"expires_at": 1721747009181,
"merchant_session_identifier": "SSHDCB45B020BFE4ABDA530581D199F4727_7E0DD1295E42A30B376B18CB4E6B9B9FB4C5E36B3EDF9FB0DEA51F9419420173",
"nonce": "7a73d676",
"merchant_identifier": "E43BADB7A30AB6630A49626B7181746F79AF44AE982581E52A78E1E2D8E126AC",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "Apple pay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018830820184020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333134303332395a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d01090431220420b8b2688d17da2a59fe8f951f6b12a68d0a985eff11e908a3aad7104d6f5125dc300a06082a8648ce3d0403020447304502210082190f7a78e98aad3254aff0ecb8a15090aeec33f382e84e79f9cde054f40d94022050a13095afe1346d8bed6759d54076b38f1131ac70b4332306c70ff151692ea0000000000000",
"operational_analytics_identifier": "Apple pay:E43BADB7A30AB6630A49626B7181746F79AF44AE982581E52A78E1E2D8E126AC",
"retries": 0,
"psp_id": "E43BADB7A30AB6630A49626B7181746F79AF44AE982581E52A78E1E2D8E126AC"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.noon.juspay"
},
"connector": "bankofamerica",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "afterpay_clearpay",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "affirm",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"bankofamerica"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"bankofamerica"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"bankofamerica"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"bankofamerica"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"bankofamerica"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": false,
"collect_billing_details_from_wallets": false
}
Test case 2
curl --location 'http://localhost:8080/account/merchant_1721744553/business_profile/pro_UbvlkhzFe49CKOC2Cp6A' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": true,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false
}'
{
"merchant_id": "merchant_1721744553",
"profile_id": "pro_UbvlkhzFe49CKOC2Cp6A",
"profile_name": "US_default",
"return_url": "https://google.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "VcvWuegeCGmK3fPk1Wy9mkkGtYxXgbrtzr4CEbPkMcrgDaD4ULbxxGTvSNf1ZIuE",
"redirect_to_merchant_with_http_post": false,
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true
},
"metadata": null,
"routing_algorithm": {
"algorithm_id": null,
"timestamp": 0
},
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": null,
"authentication_connector_details": null,
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": true,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null
}
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_dL6Ns79GbmbVgvowsPH5ih58Yq0HsUUW4DNk1Uot6U1VgdViqIHKddecSjs1WK6J' \
--data '{
"amount": 10000,
"currency": "USD",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"confirm": false,
"customer_id": "cu_1721237981"
}'
{
"payment_id": "pay_wtUNM2Q9VsQRgh1gmzRS",
"merchant_id": "merchant_1721743299",
"status": "requires_payment_method",
"amount": 10000,
"net_amount": 10000,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_wtUNM2Q9VsQRgh1gmzRS_secret_ZQbTBMQpjkfM2UU1XtW6",
"created": "2024-07-23T14:09:06.140Z",
"currency": "USD",
"customer_id": "cu_1721237981",
"customer": {
"id": "cu_1721237981",
"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": "automatic",
"payment_method": null,
"payment_method_data": null,
"payment_token": null,
"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": null,
"cancellation_reason": null,
"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": {
"customer_id": "cu_1721237981",
"created_at": 1721743746,
"expires": 1721747346,
"secret": "epk_4cdfcb3480614ee6a18924a90581c293"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_6HWsZd9W2UzInY0YWvjG",
"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": "2024-07-23T14:24:06.140Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-07-23T14:09:06.157Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
-> Session call
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91' \
--data '{
"payment_id": "pay_AVV9EBPUwiDrIYMDlC4a",
"wallets": [],
"client_secret": "pay_AVV9EBPUwiDrIYMDlC4a_secret_MZQmLy9CUO3ipa7p2HgW"
}'
{
"payment_id": "pay_AVV9EBPUwiDrIYMDlC4a",
"client_secret": "pay_AVV9EBPUwiDrIYMDlC4a_secret_MZQmLy9CUO3ipa7p2HgW",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": true,
"email_required": true,
"shipping_address_parameters": {
"phone_number_required": true
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": true,
"billing_address_parameters": {
"phone_number_required": true,
"format": "FULL"
}
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "cybersource",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721744742767,
"expires_at": 1721748342767,
"merchant_session_identifier": "SSHB08C98B29BE949C98D803024EABF86D6_7E0DD1295E42A30B376B18CB4E6B9B9FB4C5E36B3EDF9FB0DEA51F9419420173",
"nonce": "763e0341",
"merchant_identifier": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "applepay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018730820183020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333134323534325a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d01090431220420c286a5e158cf0da5837c92848f8fca0d6ca30d544d80ffdf0d45801a6a3462ab300a06082a8648ce3d040302044630440220395f134c29d0952b378978c0ee8e6b38da7bb494526e050c997ed58f61413a9502200cf5f04dcf6e951ffc88dd20d0146c53b8fc0dea40cfa598ae653839fcb55776000000000000",
"operational_analytics_identifier": "applepay:76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"retries": 0,
"psp_id": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.hyperswitch.checkout",
"required_billing_contact_fields": [
"postalAddress"
],
"required_shipping_contact_fields": [
"postalAddress",
"phone",
"email"
]
},
"connector": "cybersource",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
-> Pml list
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_AVV9EBPUwiDrIYMDlC4a_secret_MZQmLy9CUO3ipa7p2HgW' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91'
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
},
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"cybersource"
]
},
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": true,
"collect_billing_details_from_wallets": true
}
Test case 3
curl --location 'http://localhost:8080/account/merchant_1721744553/business_profile/pro_UbvlkhzFe49CKOC2Cp6A' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false
}'
{
"merchant_id": "merchant_1721744553",
"profile_id": "pro_UbvlkhzFe49CKOC2Cp6A",
"profile_name": "US_default",
"return_url": "https://google.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "VcvWuegeCGmK3fPk1Wy9mkkGtYxXgbrtzr4CEbPkMcrgDaD4ULbxxGTvSNf1ZIuE",
"redirect_to_merchant_with_http_post": false,
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true
},
"metadata": null,
"routing_algorithm": {
"algorithm_id": null,
"timestamp": 0
},
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": null,
"authentication_connector_details": null,
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null
}
-> Create payment with confirm false
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JUigpqaxc3JIsB3n6tKy1SyUqCOiwMlh8g1jhSl4ogy94UjG9cophbqUD7DNU2dc' \
--data '{
"amount": 10000,
"currency": "USD",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"confirm": false,
"customer_id": "cu_1721237981"
}'
-> Session call
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91' \
--data '{
"payment_id": "pay_6iSqUbkVLMCe92hQKlXb",
"wallets": [],
"client_secret": "pay_6iSqUbkVLMCe92hQKlXb_secret_mpvCuTcZayG421BWwvDR"
}'
{
"payment_id": "pay_6iSqUbkVLMCe92hQKlXb",
"client_secret": "pay_6iSqUbkVLMCe92hQKlXb_secret_mpvCuTcZayG421BWwvDR",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": false,
"email_required": true,
"shipping_address_parameters": {
"phone_number_required": false
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": true,
"billing_address_parameters": {
"phone_number_required": true,
"format": "FULL"
}
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "cybersource",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721745064490,
"expires_at": 1721748664490,
"merchant_session_identifier": "SSH8822ED4B4D484361A81AB71EF1A016D1_7E0DD1295E42A30B376B18CB4E6B9B9FB4C5E36B3EDF9FB0DEA51F9419420173",
"nonce": "90cda932",
"merchant_identifier": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "applepay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018830820184020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333134333130345a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d01090431220420a4ea1ed1a14f7fa5230876d6645d9c0617ad16770e93acf3fc0281ad1c2d8ded300a06082a8648ce3d0403020447304502205a8cfb5be613ca26b68b23558903deec7c9cb2940fe32f2cdc0d5c7041a02d57022100a526ae63fd2837cace3e085b4f890411055f35194c9b085b02fc060052f928cc000000000000",
"operational_analytics_identifier": "applepay:76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"retries": 0,
"psp_id": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.hyperswitch.checkout",
"required_billing_contact_fields": [
"postalAddress"
],
"required_shipping_contact_fields": [
"phone",
"email"
]
},
"connector": "cybersource",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
-> Pml
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_6iSqUbkVLMCe92hQKlXb_secret_mpvCuTcZayG421BWwvDR' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91'
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
},
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"cybersource"
]
},
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": false,
"collect_billing_details_from_wallets": true
}
Test case 4
curl --location 'http://localhost:8080/account/merchant_1721744553/business_profile/pro_UbvlkhzFe49CKOC2Cp6A' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"collect_shipping_details_from_wallet_connector": true,
"collect_billing_details_from_wallet_connector": true,
"always_collect_shipping_details_from_wallet_connector": true,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false
}'
-> Create payment with confirm false
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JUigpqaxc3JIsB3n6tKy1SyUqCOiwMlh8g1jhSl4ogy94UjG9cophbqUD7DNU2dc' \
--data '{
"amount": 10000,
"currency": "USD",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"confirm": false,
"customer_id": "cu_1721237981"
}'
-> Session call
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91' \
--data '{
"payment_id": "pay_mUhoyp7LPvaPKQAqIdDI",
"wallets": [],
"client_secret": "pay_mUhoyp7LPvaPKQAqIdDI_secret_xwVdPWdwTEjbexPM7aYS"
}'
{
"payment_id": "pay_mUhoyp7LPvaPKQAqIdDI",
"client_secret": "pay_mUhoyp7LPvaPKQAqIdDI_secret_xwVdPWdwTEjbexPM7aYS",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": true,
"email_required": true,
"shipping_address_parameters": {
"phone_number_required": true
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": true,
"billing_address_parameters": {
"phone_number_required": true,
"format": "FULL"
}
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "cybersource",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721745482229,
"expires_at": 1721749082229,
"merchant_session_identifier": "SSH0A58E32F13C74163977F0DDE274249C1_BB8E62003687F8FCC159B2B83AAFC02DB625F1F1E3997CCC2FE2CFD11F636558",
"nonce": "c9553225",
"merchant_identifier": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "applepay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018930820185020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333134333830325a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d01090431220420eb0c1b6240e97eb0eceac7447bb4b83520e33f1ee58255666c4b2ff49df587de300a06082a8648ce3d04030204483046022100b391fdb2d99154a8a11e8a60f1311c494f478efbfb19e1c366bed1092357cdfa022100ab34f9f53721da59d5bbb5f12f00b1b8204b44f027c1d046ec3197957a40b773000000000000",
"operational_analytics_identifier": "applepay:76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"retries": 0,
"psp_id": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.hyperswitch.checkout",
"required_billing_contact_fields": [
"postalAddress"
],
"required_shipping_contact_fields": [
"postalAddress",
"phone",
"email"
]
},
"connector": "cybersource",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
-> pml
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_mUhoyp7LPvaPKQAqIdDI_secret_xwVdPWdwTEjbexPM7aYS' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91'
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
},
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"shipping.address.zip": {
"required_field": "shipping.address.zip",
"display_name": "zip",
"field_type": "user_shipping_address_pincode",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"shipping.address.city": {
"required_field": "shipping.address.city",
"display_name": "city",
"field_type": "user_shipping_address_city",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"shipping.address.last_name": {
"required_field": "shipping.address.last_name",
"display_name": "shipping_last_name",
"field_type": "user_shipping_name",
"value": null
},
"shipping.address.country": {
"required_field": "shipping.address.country",
"display_name": "country",
"field_type": {
"user_shipping_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"shipping.address.state": {
"required_field": "shipping.address.state",
"display_name": "state",
"field_type": "user_shipping_address_state",
"value": null
},
"shipping.address.line1": {
"required_field": "shipping.address.line1",
"display_name": "line1",
"field_type": "user_shipping_address_line1",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"shipping.address.first_name": {
"required_field": "shipping.address.first_name",
"display_name": "shipping_first_name",
"field_type": "user_shipping_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"cybersource"
]
},
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": true,
"collect_billing_details_from_wallets": true
}
Test case 6
curl --location 'http://localhost:8080/account/merchant_1721744553/business_profile/pro_UbvlkhzFe49CKOC2Cp6A' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"collect_shipping_details_from_wallet_connector": true,
"collect_billing_details_from_wallet_connector": true,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": true,
"is_connector_agnostic_mit_enabled": false
}'
-> Payment create with confirm false
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JUigpqaxc3JIsB3n6tKy1SyUqCOiwMlh8g1jhSl4ogy94UjG9cophbqUD7DNU2dc' \
--data '{
"amount": 10000,
"currency": "USD",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"confirm": false,
"customer_id": "cu_1721237981"
}'
session call
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91' \
--data '{
"payment_id": "pay_dCVD5EqoFRHbEcJ0tv5y",
"wallets": [],
"client_secret": "pay_dCVD5EqoFRHbEcJ0tv5y_secret_nSYbyiGZeR7PqQzTdUZk"
}'
{
"payment_id": "pay_dCVD5EqoFRHbEcJ0tv5y",
"client_secret": "pay_dCVD5EqoFRHbEcJ0tv5y_secret_nSYbyiGZeR7PqQzTdUZk",
"session_token": [
{
"wallet_name": "google_pay",
"merchant_info": {
"merchant_name": "Stripe"
},
"shipping_address_required": false,
"email_required": true,
"shipping_address_parameters": {
"phone_number_required": false
},
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
],
"billing_address_required": true,
"billing_address_parameters": {
"phone_number_required": true,
"format": "FULL"
}
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2018-10-31",
"stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"transaction_info": {
"country_code": "US",
"currency_code": "USD",
"total_price_status": "Final",
"total_price": "100.00"
},
"delayed_session_token": false,
"connector": "cybersource",
"sdk_next_action": {
"next_action": "confirm"
},
"secrets": null
},
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1721746230537,
"expires_at": 1721749830537,
"merchant_session_identifier": "SSH8124D93142F541A0B86AAD933575175A_CCE257A9D27B42513B2C3CA67DB49F602F3450D996C0811ED462EDCA0D7477FD",
"nonce": "e3b5f1b3",
"merchant_identifier": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"domain_name": "sdk-test-app.netlify.app",
"display_name": "applepay",
"signature": "308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e330820388a003020102020816634c8b0e305717300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3234303432393137343732375a170d3239303432383137343732365a305f3125302306035504030c1c6563632d736d702d62726f6b65722d7369676e5f5543342d50524f4431143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004c21577edebd6c7b2218f68dd7090a1218dc7b0bd6f2c283d846095d94af4a5411b83420ed811f3407e83331f1c54c3f7eb3220d6bad5d4eff49289893e7c0f13a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604149457db6fd57481868989762f7e578507e79b5824300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020349003046022100c6f023cb2614bb303888a162983e1a93f1056f50fa78cdb9ba4ca241cc14e25e022100be3cd0dfd16247f6494475380e9d44c228a10890a3a1dc724b8b4cb8889818bc308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018830820184020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020816634c8b0e305717300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3234303732333134353033305a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d010904312204202fa422ef92b9dade1b318617c4d96a8ee1ed2e306f2ce73fb997f9ee8f60fe5e300a06082a8648ce3d04030204473045022100f85fc317ee62108fbba6bf99a694496396b6f25b372f7347020a1d20664a725d022040558be009cadd743bac1428197c3b21c0f6cb6f7c02cdd7cf960296d0dff910000000000000",
"operational_analytics_identifier": "applepay:76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813",
"retries": 0,
"psp_id": "76B79A8E91F4D365B0B636C8F75CB207D52532E82C2C085DE79D6D8135EF3813"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "100.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.com.hyperswitch.checkout",
"required_billing_contact_fields": [
"postalAddress"
],
"required_shipping_contact_fields": [
"phone",
"email"
]
},
"connector": "cybersource",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
-> pml
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_dCVD5EqoFRHbEcJ0tv5y_secret_nSYbyiGZeR7PqQzTdUZk' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_6b6f32cb55244ccb83ef922d20826d91'
{
"redirect_url": "https://google.com/success",
"currency": "USD",
"payment_methods": [
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "paypal",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "google_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "klarna",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"cybersource"
]
},
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"cybersource"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
},
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"cybersource"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.city": {
"required_field": "payment_method_data.billing.address.city",
"display_name": "city",
"field_type": "user_address_city",
"value": null
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": null
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"value": null
},
"billing.address.line1": {
"required_field": "payment_method_data.billing.address.line1",
"display_name": "line1",
"field_type": "user_address_line1",
"value": null
},
"payment_method_data.card.card_exp_year": {
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
"billing.address.line2": {
"required_field": "payment_method_data.billing.address.line2",
"display_name": "line2",
"field_type": "user_address_line2",
"value": null
},
"billing.address.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": null
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_exp_month": {
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
},
"billing.address.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": null
},
"payment_method_data.card.card_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "billing_last_name",
"field_type": "user_billing_name",
"value": null
},
"payment_method_data.card.card_cvc": {
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"cybersource"
]
},
"bank_transfers": null,
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "NewAge Retailer",
"show_surcharge_breakup_screen": false,
"payment_type": "normal",
"request_external_three_ds_authentication": false,
"collect_shipping_details_from_wallets": false,
"collect_billing_details_from_wallets": true
}
Checklist
- [x] I formatted the code
cargo +nightly fmt --all
- [x] I addressed lints thrown by
cargo clippy
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible