Skip to main content
POST
Revenue Recovery - Create

Authorizations

Authorization
string
header
required

Format: api-key=<api_key>

Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Headers

X-Profile-Id
string
required

Unique identifier of the business profile under which the invoice is processed. The billing and payment merchant connector accounts in the request must belong to this profile.

Body

application/json
amount_details
object
required
merchant_reference_id
string
required

Unique identifier of the invoice in the merchant's billing system against which the transaction is being recorded.

Required string length: 30
Example:

"invoice_mbabizu24mvu3mela5njyh"

billing_merchant_connector_id
string
required

Unique identifier of the billing connector account, such as Chargebee, that manages the invoice. The account must belong to the profile passed in the X-Profile-Id header.

Example:

"mca_1234567890"

payment_merchant_connector_id
string
required

Unique identifier of the payment connector account, such as Stripe, on which the transaction was processed. The account must belong to the profile passed in the X-Profile-Id header.

Example:

"mca_1234567890"

transaction_status
enum<string>
required

Status of the transaction reported.

Available options:
charged,
failure,
partial_charged,
partial_charged_and_chargeable
payment_method_sub_type
enum<string>
required

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

Available options:
ach,
affirm,
afterpay_clearpay,
alfamart,
ali_pay,
ali_pay_hk,
alma,
amazon_pay,
paysera,
apple_pay,
atome,
bacs,
bancontact_card,
becs,
benefit,
bizum,
blik,
bluecode,
boleto,
bca_bank_transfer,
bni_va,
breadpay,
bri_va,
bhn_card_network,
card_redirect,
cimb_va,
classic,
credit,
crypto_currency,
cashapp,
dana,
danamon_va,
debit,
duit_now,
efecty,
eft,
eft_debit_order,
eps,
flexiti,
fps,
evoucher,
giropay,
givex,
google_pay,
go_pay,
gcash,
ideal,
interac,
indomaret,
klarna,
kakao_pay,
local_bank_redirect,
mandiri_va,
knet,
mb_way,
mobile_pay,
momo,
momo_atm,
multibanco,
neteller,
online_banking_thailand,
online_banking_czech_republic,
online_banking_finland,
online_banking_fpx,
online_banking_poland,
online_banking_slovakia,
oxxo,
pago_efectivo,
permata_bank_transfer,
open_banking_uk,
pay_bright,
payjustnow,
paypal,
paze,
pix,
pix_key,
pix_emv,
pix_qr,
pix_automatico_qr,
pix_automatico_push,
pay_safe_card,
przelewy24,
prompt_pay,
pse,
qris,
red_compra,
red_pagos,
samsung_pay,
sepa,
sepa_bank_transfer,
sepa_guarenteed_debit,
skrill,
sofort,
swish,
touch_n_go,
trustly,
twint,
upi_collect,
upi_intent,
upi_qr,
vipps,
viet_qr,
venmo,
walley,
wero,
we_chat_pay,
seven_eleven,
lawson,
mini_stop,
family_mart,
seicomart,
pay_easy,
local_bank_transfer,
mifinity,
open_banking_pis,
direct_carrier_billing,
instant_bank_transfer,
instant_bank_transfer_finland,
instant_bank_transfer_poland,
revolut_pay,
indonesian_bank_transfer,
open_banking,
network_token,
payshap,
payshap_proxy,
ted
transaction_created_at
string<date-time>
required

The time at which the transaction was created at the payment connector.

Example:

"2022-09-10T10:11:12Z"

payment_method_type
enum<string>
required

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

Available options:
card,
card_redirect,
pay_later,
wallet,
bank_redirect,
bank_transfer,
crypto,
bank_debit,
reward,
real_time_payment,
upi,
voucher,
gift_card,
open_banking,
mobile_payment,
network_token
connector_customer_id
string
required

Unique identifier of the customer at the payment connector, with which the payment method token used for the transaction is associated.

Example:

"cust_12345"

billing_started_at
string<date-time>
required

Invoice billing started at billing connector's end.

Example:

"2022-09-10T10:11:12Z"

connector_transaction_id
string
required

Unique identifier of the transaction at the payment connector. It is used to identify the transaction among the attempts recorded for the invoice.

Example:

"993672945374576J"

payment_method_data
object
required
action
enum<string>
required

Action to be taken on the transaction reported through the revenue recovery API

Available options:
schedule_failed_payment,
success_payment_external
error
object | null

Error details for the payment

billing
object | null
enable_partial_authorization
boolean | null
default:false

Allow partial authorization for this payment

metadata
object | null

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

Response

Revenue Recovery Transaction Recorded Successfully

id
string
required

Unique identifier of the invoice in Hyperswitch against which the transaction has been recorded.

Required string length: 30
Example:

"pay_mbabizu24mvu3mela5njyhpit4"

intent_status
enum<string>
default:requires_confirmation
required

Represents the overall status of a payment intent. The status transitions through various states depending on the payment method, confirmation, capture method, and any subsequent actions (like customer authentication or manual capture).

Available options:
succeeded,
failed,
cancelled,
cancelled_post_capture,
processing,
requires_customer_action,
requires_merchant_action,
requires_payment_method,
requires_confirmation,
requires_capture,
partially_captured,
partially_captured_and_capturable,
partially_authorized_and_requires_capture,
partially_captured_and_processing,
conflicted,
expired,
review
merchant_reference_id
string | null

Unique identifier of the invoice in the merchant's billing system against which the transaction is being recorded.

Required string length: 30
Example:

"invoice_mbabizu24mvu3mela5njyh"