Appearance
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.
Value | Emulated behavior |
---|---|
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 |
bash
curl -X POST {baseUrl}/simulation/topups/cards/notification/authorizations \
--header 'Authorization: Bearer {accessToken}' \
--header 'Content-Type: application/json' \
-d '{payload}'
1
2
3
4
2
3
4
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
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Returns the following.
json
{
"transactionReference": "string",
"authorizationId": "string"
}
1
2
3
4
2
3
4
Payin
To emulate a Payin you may use the following request with the status
corresponding to the behavior you wish to emulate.
Value | Emulated behavior |
---|---|
117 | Capture Requested |
118 | Captured (Default) |
173 | Capture Refused |
bash
- curl -X POST {baseUrl}/simulation/topups/cards/notification/payins \
--header 'Authorization: Bearer {accessToken}' \
--header 'Content-Type: application/json' \
-d '{payload}'
1
2
3
4
2
3
4
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
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Returns the following:
json
{
"transactionReference": "string",
"payinId": "string"
}
1
2
3
4
2
3
4
Refund
To emulate a Refund you may use the following request with the status
corresponding to the behavior you wish to emulate.
Value | Emulated behavior |
---|---|
124 | Refund Requested |
125 | Refunded (Default) |
126 | Partially Refunded |
165 | Refund Refused |
bash
curl -X POST {baseUrl}/simulation/topups/cards/notification/refunds \
--header 'Authorization: Bearer {accessToken}' \
--header 'Content-Type: application/json' \
-d '{payload}'
1
2
3
4
2
3
4
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
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Returns the following.
json
{
"transactionReference": "string",
"refundId": "string"
}
1
2
3
4
2
3
4
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}'
1
2
3
4
2
3
4
Here is a {payload}
example:
json
{
"transactionReference": "{transactionReference}"
}
1
2
3
2
3
Returns an object containing the chargebackId
:
json
{
"transactionReference": "string",
"chargebackId": "string"
}
1
2
3
4
2
3
4
Endpoints
Endpoint | Scope |
---|---|
/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 |