# Emulation

Emulation features are only available in sandbox environment.

When you are in sandbox environment, all Acquiring V2 endpoints are interconnected with your HiPay staging environment (HiPay's equivalent to our sandbox).

This means that you can emulate the full acquiring process without changing endpoints or payloads.

💡 For more granular testing, you may use the following simulation endpoints.

# Authorization V2 Flow

To emulate an Authorization you may use the following request.

The status attribute can take the following values :

  • 109 Authentication failed
  • 110 Blocked
  • 111 Denied
  • 112 Authorized and Pending
  • 113 Refused
  • 114 Expired
  • 115 Canceled
  • 116 Authorized (Default)
  • 142 Authorization Requested
  • 143 Authorization Cancelled
  • 175 Authorization Cancellation Requested

Here is a {payload} example:

Outputs

# Payin V2 Flow

To emulate a Payin you may use the following request.

The status attribute can take the following values :

  • 117 Capture Requested
  • 118 Captured (Default)
  • 173 Capture Refused

Here is a {payload} example:

Outputs

# Refund V2 Flow

To emulate a Refund you may use the following request.

The status attribute can take the following values :

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

Here is a {payload} example:

Outputs

# Chargeback V2 Flow

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.

Here is a {payload} example:

Outputs an object containing the chargebackId:

# Card Acquisition V1 Flow

You may emulate a Card Acquisition using the following request

# Parameters

  • userId the User's id (expected as a string)
  • walletId the User's Wallet id (expected as a string)
  • amount the amount to credit (expected as a float)
  • currency must be EUR
  • status (expected as a integer)
    • 109 for an authentication failure
    • 110 for a rejection due to fraud supicion
    • 113 for a refusal by the payment institution
    • 115 for a payment timeout
    • 116 for an authorization request
    • 117 for a capture request
    • 118 for a successful Card Acquisition
    • 129 for a chargeback
    • 173 for a refused capture
  • transactionReference an arbitrary reference, optionnal but mandatory when emulating a complete flow composed of multiple requests

💡 To emulate a complete flow, you can set a status = 117 followed by a 118 while specifying the same transactionReference for both requests.

curl -X POST {baseUrl}/simulation/acquiring/payin \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{
		"userId": {userId},
		"walletId": {walletId},
		"amount": 100,
		"currency": "EUR",
		"status": 118,
		"transactionReference" : "{temporaryHiPayTransactionReference}"
	}'
1
2
3
4
5
6
7
8
9
10
11

💡 Note that an emulated payin cannot be refunded.

Updated on: 3/7/2024, 3:05:48 PM