Credit2Virtual
CREDIT2VIRTUAL request
CREDIT2VIRTUAL request is used to create CREDIT2VIRTUAL transaction in Payment Platform.
This operation transfers money from merchants account to customer account.
If you want to send a payout for the specific sub-account (channel), you need to use channel_id that specified in your Payment Platform account settings.
This request is sent by POST in the background (e.g., through PHP CURL).
Request Parameters
| Parameter | Description | Values | Required |
|---|---|---|---|
action | CREDIT2VIRTUAL | CREDIT2VIRTUAL | + |
client_key | Unique client key (CLIENT_KEY) | + | |
channel_id | Payment channel (Sub-account) | String up to 16 characters | - |
brand | Brand through which the transaction is performed | String up to 36 characters | + |
order_id | Order ID in the Clients system | String up to 255 characters | + |
order_amount | The amount of the transaction | Format depends on currency. Send Integer type value for currencies with zero-exponent. Example: 1000 Send Float type value for currencies with exponents 2, 3, 4. Format for 2-exponent currencies: XX.XX Example: 100.99 Pay attention that currencies 'UGX', 'JPY', 'KRW', 'CLP' must be send in the format XX.XX, with the zeros after comma. Example: 100.00 Format for 3-exponent currencies: XXX.XXX Example: 100.999. Format for 4-exponent currencies: XXX.XXXX Example: 100.9999 | + |
order_currency | Currency | 3-letter code | + |
order_description | Description of the transaction (product name) | String up to 1024 characters | + |
return_url | If the optional parameter return_url is not provided in the request, the customer will be redirected to the default 'Thank You' page after the payment process. This page includes an option to send the receipt to the customer's email | Example: https://example.domain.com | - |
parameters | Array of the parameters for specific brand | (Appendix C) | + |
hash | Special signature to validate your request to Payment Platform | See Appendix A, Credit2Virtual signature. | + |
payee_first_name | Payee’s name | String up to 32 characters | - |
payee_last_name | Payee’s surname | String up to 32 characters | - |
payee_middle_name | Payee’s middle name | String up to 32 characters | - |
payee_birth_date | Payee’s birthday | format yyyy-MM-dd, e.g. 1970-02-17 | - |
payee_address | Payee’s address | String up to 255 characters | - |
payee_address2 | The adjoining road or locality (if required) of the customer’s address | String up to 255 characters | - |
payee_country | Payee’s country | 2-letter code | - |
payee_state | Payee’s state | String up to 32 characters | - |
payee_city | Payee’s city | String up to 32 characters | - |
payee_zip | ZIP-code of the Payee | String up to 10 characters | - |
payee_email | Payee’s email | String up to 256 characters | - |
payee_phone | Payee’s phone | String up to 32 characters | - |
Response Parameters
You will get JSON encoded string with transaction result.
Successful response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | SUCCESS |
status | SETTLED |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Transaction date in the Payment Platform |
amount | Order amount |
currency | Currency |
Response Example (Successful result)
{
"action": "CREDIT2VIRTUAL",
"result": "SUCCESS",
"status": "SETTLED",
"order_id": "1613117050",
"trans_id": "e5098d62-6d08-11eb-9da3-0242ac120013",
"trans_date": "2021-02-12 08:04:15",
"amount": "0.19",
"currency": "USD"
}
Unsuccessful response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | DECLINED |
status | DECLINED |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Transaction date in the Payment Platform |
decline_reason | The reason why the transaction was declined |
amount | Order amount |
currency | Currency |
Response Example (Unsuccessful result)
{
"action": "CREDIT2VIRTUAL",
"result": "DECLINED",
"status": "DECLINED",
"order_id": "1613117050",
"trans_id": "e5098d62-6d08-11eb-9da3-0242ac120013",
"trans_date": "2021-02-12 08:04:15",
"decline_reason": "Declined by procesing",
"amount": "0.19",
"currency": "USD"
}
Undefined response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | UNDEFINED |
status | PREPARE |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Transaction date in the Payment Platform |
amount | Order amount |
currency | Currency |
Response Example (Undefined result)
{
"action": "CREDIT2VIRTUAL",
"result": "UNDEFINED",
"status": "PREPARE",
"order_id": "1613117050",
"trans_id": "e5098d62-6d08-11eb-9da3-0242ac120013",
"trans_date": "2021-02-12 08:04:15",
"amount": "0.19",
"currency": "USD"
}
Callback parameters
Successful response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | SUCCESS |
status | SETTLED |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Transaction date in the Payment Platform |
amount | Order amount |
currency | Currency |
connector_name * | Connector's name (Payment Gateway) |
rrn * | Retrieval Reference Number value from the acquirer system |
approval_code * | Approval code value from the acquirer system |
gateway_id * | Gateway ID – transaction identifier provided by payment gateway |
extra_gateway_id * | Extra Gateway ID – additional transaction identifier provided by payment gateway. |
merchant_name * | Merchant Name |
mid_name * | MID Name |
issuer_country * | Issuer Country |
issuer_bank * | Issuer Bank |
extended_data* | Contains custom key-value data (see “Add Extended Data to Callback” block in the Configurations -> Protocol Mappings section) |
hash | Special signature to validate callback. See Appendix A, Credit2Virtual callback signature |
* The parameters are included if the appropriate setup is configured in the admin panel (see “Add Extended Data to Callback” block in the Configurations -> Protocol Mappings section).
Response Example (Successful result)
action=CREDIT2VIRTUAL&result=SUCCESS&status=SETTLED&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19¤cy=USD
Unsuccessful response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | DECLINED |
status | DECLINED |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Transaction date in the Payment Platform |
decline_reason | Description of the cancellation of the transaction |
hash | Special signature to validate callback. See Appendix A, Credit2Virtual callback signature |
amount | Order amount |
currency | Currency |
Response Example (Unsuccessful result)
action=CREDIT2VIRTUAL&result=DECLINED&status=DECLINED&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19¤cy=USD&decline_reason=reason
Undefined response
| Parameter | Description |
|---|---|
action | CREDIT2VIRTUAL |
result | UNDEFINED |
status | PREPARE |
order_id | Order ID in the Client’s system |
trans_id | Transaction ID in the Payment Platform |
trans_date | Date of CREDIT2CARD action |
hash | Special signature to validate callback. See Appendix A, Credit2Virtual callback signature |
amount | Order amount |
currency | Currency |
Response Example (Undefined result)
action=CREDIT2VIRTUAL&result=UNDEFINED&status=PREPARE&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19¤cy=USD