Skip to main content

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

ParameterDescriptionValuesRequired
actionCREDIT2VIRTUALCREDIT2VIRTUAL+
client_keyUnique client key (CLIENT_KEY)+
channel_idPayment channel (Sub-account)String up to 16 characters-
brandBrand through which the transaction is performedString up to 36 characters+
order_idOrder ID in the Clients systemString up to 255 characters+
order_amountThe amount of the transactionFormat 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_currencyCurrency3-letter code+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
return_urlIf 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 emailExample: https://example.domain.com-
parametersArray of the parameters for specific brand(Appendix C)+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Credit2Virtual signature.+
payee_first_namePayee’s nameString up to 32 characters-
payee_last_namePayee’s surnameString up to 32 characters-
payee_middle_namePayee’s middle nameString up to 32 characters-
payee_birth_datePayee’s birthdayformat yyyy-MM-dd,
e.g. 1970-02-17
-
payee_addressPayee’s addressString up to 255 characters-
payee_address2The adjoining road or locality (if required) of the customer’s addressString up to 255 characters-
payee_countryPayee’s country2-letter code-
payee_statePayee’s stateString up to 32 characters-
payee_cityPayee’s cityString up to 32 characters-
payee_zipZIP-code of the PayeeString up to 10 characters-
payee_emailPayee’s emailString up to 256 characters-
payee_phonePayee’s phoneString up to 32 characters-

Response Parameters

You will get JSON encoded string with transaction result.

Successful response

ParameterDescription
actionCREDIT2VIRTUAL
resultSUCCESS
statusSETTLED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
amountOrder amount
currencyCurrency
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

ParameterDescription
actionCREDIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined
amountOrder amount
currencyCurrency
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

ParameterDescription
actionCREDIT2VIRTUAL
resultUNDEFINED
statusPREPARE
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
amountOrder amount
currencyCurrency
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

ParameterDescription
actionCREDIT2VIRTUAL
resultSUCCESS
statusSETTLED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
amountOrder amount
currencyCurrency
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)
hashSpecial 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&currency=USD

Unsuccessful response

ParameterDescription
actionCREDIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature to validate callback. See Appendix A, Credit2Virtual callback signature
amountOrder amount
currencyCurrency
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&currency=USD&decline_reason=reason

Undefined response

ParameterDescription
actionCREDIT2VIRTUAL
resultUNDEFINED
statusPREPARE
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateDate of CREDIT2CARD action
hashSpecial signature to validate callback. See Appendix A, Credit2Virtual callback signature
amountOrder amount
currencyCurrency
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&currency=USD