View Source Hyperswitch.Payments (hyperswitch v0.1.0)
Link to this section Summary
Functions
A Payment could can be cancelled when it is in one of these statuses: requires_payment_method
, requires_capture
, requires_confirmation
, requires_customer_action
.
To capture the funds for an uncaptured payment.
This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments Create API.
To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture.
To create the session object or to get session token for wallets.
To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment.
To list the payments.
To update the properties of a PaymentIntent object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created.
Link to this section Types
@type cancel_payment_body() :: %{cancellation_reason: binary()}
@type cancel_payment_response() :: Hyperswitch.Client.response()
@type capture_payment_body() :: %{ merchant_id: merchant_id(), amount_to_capture: integer(), refund_uncaptured_amount: boolean(), statement_descriptor_suffix: binary(), statement_descriptor_prefix: binary() }
@type capture_payment_response() :: Hyperswitch.Client.response()
@type confirm_payment_body() :: map()
@type confirm_payment_response() :: Hyperswitch.Client.response()
@type create_payment_params() :: map()
@type create_payment_response() :: Hyperswitch.Client.response()
@type create_payment_session_token_response() :: Hyperswitch.Client.response()
@type get_payment_params() :: map()
@type get_payment_response() :: Hyperswitch.Client.response()
@type list_payments_params() :: keyword()
@type list_payments_response() :: Hyperswitch.Client.response()
@type merchant_id() :: binary()
@type payment_id() :: binary()
@type update_payment_body() :: map()
@type update_payment_response() :: Hyperswitch.Client.response()
Link to this section Functions
@spec cancel_payment(payment_id(), cancel_payment_body()) :: cancel_payment_response()
A Payment could can be cancelled when it is in one of these statuses: requires_payment_method
, requires_capture
, requires_confirmation
, requires_customer_action
.
@spec capture_payment(payment_id(), capture_payment_body()) :: capture_payment_response()
To capture the funds for an uncaptured payment.
@spec comfirm_payment(payment_id(), confirm_payment_body()) :: confirm_payment_response()
This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments Create API.
@spec create_payment(create_payment_params()) :: create_payment_response()
To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture.
@spec create_payment_session_token(create_payment_session_token_body()) :: create_payment_session_token_response()
To create the session object or to get session token for wallets.
@spec get_payment(payment_id(), get_payment_params()) :: get_payment_response()
To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment.
@spec list_payments(list_payments_params()) :: list_payments_response()
To list the payments.
@spec update_payment(payment_id(), update_payment_body()) :: update_payment_response()
To update the properties of a PaymentIntent object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created.