Skip to content

Emulation

Emulation features are only available in Sandbox environment (which is paired with HiPay's staging environment).

Authorization

To emulate an Authorization you may use the following request with the status corresponding to the behavior you wish to emulate.

ValueEmulated behavior
109Authentication failed
110Blocked
111Denied
112Authorized and Pending
113Refused
114Expired
115Canceled
116Authorized (Default)
142Authorization Requested
143Authorization Cancelled
175Authorization Cancellation Requested
bash
curl -X POST {baseUrl}/simulation/topups/cards/notification/authorizations \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is a {payload} example:

json
{
	"amount": {amount},
	"currency": "EUR",
	"walletId": "{walletId}",
	"userId": "{userId}",					// Optional
	"cardPaymentMethod": { 					// Mandatoy for 116 status only. Omit otherwise.
		"brand": "string",
		"cardExpiryMonth": "string",
		"cardExpiryYear": "string",
		"cardHolder": "string",
		"country": "string",
		"issuer": "string",
		"maskedPan": "string",
		"token": "string"
	}, 		
	"status": {statusOfTheSimulatedNotification},		// optional
	"transactionReference": "{transactionReference}",	// Mandatory for all statuses except 116
	"profile": "{profile}"								// Mandatory for multi-MID
}

Returns the following.

json
{
	"transactionReference": "string",
	"authorizationId": "string"
}

Payin

To emulate a Payin you may use the following request with the status corresponding to the behavior you wish to emulate.

ValueEmulated behavior
117Capture Requested
118Captured (Default)
173Capture Refused
bash
- curl -X POST {baseUrl}/simulation/topups/cards/notification/payins \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is a {payload} example:

json
{
	"amount": {amount},
	"currency": "EUR",
	"walletId": "{walletId}",
	"userId": "{userId}",								// Optional
	// "cardPaymentMethod": "{cardPaymentMethod}", 		// Omit, for status 116 only
	"status": {statusOfTheSimulatedNotification},		// optional
	"transactionReference": "{transactionReference}",	// Mandatory (except 116)
	"profile": "{profile}"								// Mandatory for multi-MID
}

Returns the following:

json
{
    "transactionReference": "string",
	"payinId": "string"
}

Refund

To emulate a Refund you may use the following request with the status corresponding to the behavior you wish to emulate.

ValueEmulated behavior
124Refund Requested
125Refunded (Default)
126Partially Refunded
165Refund Refused
bash
curl -X POST {baseUrl}/simulation/topups/cards/notification/refunds \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is a {payload} example:

json
{
	"amount": {amount},
	"currency": "EUR",
	"walletId": "{walletId}",
	"userId": "{userId}",								// Optional
	// "cardPaymentMethod": "{cardPaymentMethod}", 		// Omit, for status 116 only
	"status": {statusOfTheSimulatedNotification},		// optional
	"transactionReference": "{transactionReference}",	// Mandatory (except 116)
	"profile": "{profile}"								// Mandatory for multi-MID
}

Returns the following.

json
{
	"transactionReference": "string",
	"refundId": "string"
}

Chargeback

To emulate a Chargeback you only need the transactionReference.

The transaction reference is provided in response to the authorization step, or in response to the payin creation step if you have skipped the authorization step.

The following request emulates a Chargeback for the full amount of the transaction.

bash
curl -X POST {baseUrl}/simulation/topups/cards/notification/chargebacks \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is a {payload} example:

json
{
	"transactionReference": "{transactionReference}"
}

Returns an object containing the chargebackId:

json
{
	"transactionReference": "string",
	"chargebackId": "string"
}

Endpoints

EndpointScope
/simulation/topups/cards/notification/authorizations
Simulate an HiPay authorization notification
admin
/simulation/topups/cards/notification/payins
Simulate an HiPay payin notification
admin
/simulation/topups/cards/notification/refunds
Simulate an HiPay refund notification
admin
/simulation/topups/cards/notification/chargebacks
Simulate an HiPay chargeback notification
admin