# Emulation
Emulation features are only available in sandbox
environment.
When you are in Sandbox environment, all endpoints are interconnected with your HiPay staging environment (HiPay's equivalent to Treezor's Sandbox).
This means that you can emulate the full acquiring process without changing endpoints or payloads.
# Authorization V2 Flow
To emulate an Authorization you may use the following request.
The status
attribute can take the following values :
109
Authentication failed110
Blocked111
Denied112
Authorized and Pending113
Refused114
Expired115
Canceled116
Authorized (Default)142
Authorization Requested143
Authorization Cancelled175
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 Requested118
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 Requested125
Refunded (Default)126
Partially Refunded165
Refund Refused
curl -X POST {baseUrl}/simulation/topups/cards/notification/refunds \
--header 'Authorization: Bearer {accessToken}' \
--header 'Content-Type: application/json' \
-d '{payload}'
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 astring
)walletId
the User's Wallet id (expected as astring
)amount
the amount to credit (expected as afloat
)currency
must beEUR
status
(expected as ainteger
)109
for an authentication failure110
for a rejection due to fraud supicion113
for a refusal by the payment institution115
for a payment timeout116
for an authorization request117
for a capture request118
for a successful Card Acquisition129
for a chargeback173
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}"
}'
2
3
4
5
6
7
8
9
10
11
💡 Note that an emulated payin cannot be refunded.
← Errors Introduction →