upaycard merchant api documentation...upaycard merchant api documentation v1.0.25 5 1. description...
Post on 03-Apr-2020
37 Views
Preview:
TRANSCRIPT
- 2018 07 05-
UPayCard Merchant API Documentation
v1.0.25
UPayCard Merchant API Documentation v1.0.25 2
TABLE OF CONTENTS
Table of Contents ....................................................................................................................................................... 2
1. Description ........................................................................................................................................................ 5
2. Security .............................................................................................................................................................. 5
3. Additional information ...................................................................................................................................... 5
4. Document Revisions .......................................................................................................................................... 5
5. API SERVICES ...................................................................................................................................................... 6
5.1. CreateUser ................................................................................................................................................ 6
5.2. GetUsers .................................................................................................................................................... 8
5.3. GetUserEmail .......................................................................................................................................... 10
5.4. CreateAccount ......................................................................................................................................... 11
5.5. CreateCard .............................................................................................................................................. 12
5.6. GetUserDetails ........................................................................................................................................ 14
5.7. GetUserAddress ...................................................................................................................................... 16
5.8. GetAccountDetails .................................................................................................................................. 18
5.9. GetAccountAddress ................................................................................................................................. 20
5.10. GetUserAccounts .................................................................................................................................... 22
5.11. GetUserCards .......................................................................................................................................... 23
5.12. GetAccountStatus ................................................................................................................................... 25
5.13. GetAccountCards .................................................................................................................................... 26
5.14. GetAccountInventory .............................................................................................................................. 28
5.15. GetCardStatus ......................................................................................................................................... 29
5.16. GetCardDetails ........................................................................................................................................ 30
5.17. GetCardCvv .............................................................................................................................................. 31
5.18. GetCardPin .............................................................................................................................................. 32
5.19. UpdateUserAddress ................................................................................................................................ 33
5.20. UpdateAccountAddress .......................................................................................................................... 35
5.21. UpdateAccountOwner ............................................................................................................................ 37
5.22. AssignCardToAccount.............................................................................................................................. 38
5.23. GetUserKYCStatus ................................................................................................................................... 39
5.24. UpdateUserKyc ........................................................................................................................................ 41
UPayCard Merchant API Documentation v1.0.25 3
5.25. GetTransactionStatus .............................................................................................................................. 43
5.26. TransferAccountToAccount ..................................................................................................................... 44
5.27. TransferAccountToCard .......................................................................................................................... 45
5.28. TransferCardToCard ................................................................................................................................ 46
5.29. GetAccountLastActivity ........................................................................................................................... 47
5.30. GetAccountActivity ................................................................................................................................. 49
5.31. GetCardLastActivity ................................................................................................................................. 51
5.32. GetCardActivity ....................................................................................................................................... 53
5.33. GetShippingMethods .............................................................................................................................. 55
5.34. InitializeTransfer ...................................................................................................................................... 56
5.35. FinishTransfer .......................................................................................................................................... 58
5.36. RefundTransfer........................................................................................................................................ 60
5.37. SendSms .................................................................................................................................................. 61
5.38. SendEmail ................................................................................................................................................ 63
5.39. TransferAccountToUser .......................................................................................................................... 65
5.40. RequestSms ............................................................................................................................................. 66
5.41. RequestEmail ........................................................................................................................................... 68
5.42. ActivateCard ............................................................................................................................................ 70
5.43. CheckCardidInfo ...................................................................................................................................... 71
5.44. CreatePurchase ....................................................................................................................................... 73
5.45. GetPurchaseStatus .................................................................................................................................. 75
5.46. BankTransfer ........................................................................................................................................... 76
5.47. ReceiveMoneyRequest ............................................................................................................................ 81
5.48. GetUserBankAccounts............................................................................................................................. 85
5.49. GetUserExternalCards ............................................................................................................................. 87
5.50. GetTransactionLimits .............................................................................................................................. 88
5.51. VerifyExternalCard .................................................................................................................................. 90
5.52. AddBankAccount ..................................................................................................................................... 91
5.53. LoadFromBank ........................................................................................................................................ 93
5.54. LoadFromCrypto...................................................................................................................................... 96
5.55. LoadFromBitcoin ..................................................................................................................................... 98
5.56. LoadFromEthereum .............................................................................................................................. 101
UPayCard Merchant API Documentation v1.0.25 4
5.57. InitializeWithdrawToBank ..................................................................................................................... 103
5.58. FinishWithdrawToBank ......................................................................................................................... 105
5.59. InitializeLoadFromCard ......................................................................................................................... 107
5.60. FinishLoadFromCard ............................................................................................................................. 109
6. APPENDIX A: Sign Generation ....................................................................................................................... 111
7. APPENDIX B: ENCRYPT/Decrypt information ................................................................................................ 112
8. APPENDIX C: Transaction Codes .................................................................................................................... 114
9. APPENDIX D: User KYC Document Types ....................................................................................................... 115
10. APPENDIX E: User ID Types ....................................................................................................................... 116
11. APPENDIX F: PHP Code Example ............................................................................................................... 116
12. APPENDIX G: Invalid requests error codes ................................................................................................ 118
13. APPENDIX H: Purchase statuses ................................................................................................................ 118
14. APPENDIX I: Purchase IPN CATCHER PHP Code Example .......................................................................... 119
15. APPENDIX J: KYC notification CATCHER PHP Code Example ..................................................................... 120
16. APPENDIX K: Receive money / bank transfer IPN CATCHER PHP Code Example ...................................... 121
17. APPENDIX L: Load From Bank / LOAD FROM CRYPTO IPN CATCHER PHP CODE Example ........................ 122
18. APPENDIX M: Supported crypto currencies .............................................................................................. 123
19. APPENDIX N: Withdrawal purposes .......................................................................................................... 123
UPayCard Merchant API Documentation v1.0.25 5
1. DESCRIPTION UPayCard Merchant API provides access for the third-parties to standard functions and services
implemented in UPayCard.
Developers can build their own custom applications, tools, and services to support their programs
or components of their programs.
2. SECURITY The following aspects create additional security for each third-party:
Both login and password are required for each call to API to authenticate the third-party.
The password is unique per each third-party
HTTPS Security is mandatory – an SSL certificate is required.
All sensitive data are transmitted in an encrypted format under a 3-DES key.
3. ADDITIONAL INFORMATION Request must be encoded in UTF-8
4. DOCUMENT REVISIONS This table outlines latest document revisions.
Revision No. Date Engineer QA Engineer Description
R0 2015-02-05 PK First version of official UPayCard API documentation for Merchant published.
UPayCard Merchant API Documentation v1.0.25 6
5. API SERVICES
5.1. CreateUser Create user in UPayCard.
URL https://api.upaycard.com/api/merchant/v/1.0/function/create_user
CreateUser Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
email Y AN 100
password Y AN 100
first_name N A 60
middle_name N A 60
last_name N A 60
gender N A 1 Possible values: F : female M : male
bday N AN ISO 8601
country N A 2 ISO 3166-1 alpha-3
address_line_1 N AN 100
address_line_2 N AN 100
city N AN 45
state N AN 40
post_code N AN 10
billing_country N A ISO 3166-1 alpha-3
billing_address_line_1 N AN
billing_address_line_2 N AN
billing_city N A
billing_state N A
billing_post_code N AN
preferred_currency Y A 3 ISO 4217
phone_number N AN 20
phone_type N A 1 L = Landline, M = Mobile
government_issued_id_type N N 2 See APPENDIX E: User ID Types
government_issued_id_number N AN 20
government_issued_id_expiration_date N AN ISO 8601
government_issued_id_country_of_issuance N ISO 3166-1 alpha-3
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
If first_name, last_name, gender, bday , address_line_1, city, country, post_code, phone_type, phone_number,
government_issued_id_type, government_issued_id_number, government_issued_id_expiration_date and
government_issued_id_country_of_issuance parameters will be provided, then user profile will be completed.
UPayCard Merchant API Documentation v1.0.25 7
CreateUser JSON Request Sample {
"username":"john.doe",
"email":"john.doe@test.loc",
"password":"password",
"first_name":"John",
"middle_name":null,
"last_name":"Doe",
"gender":"M",
"bday":"1958-08-08",
"country":"GBR",
"address1":"",
"address2":"",
"city":"London",
"state":null,
"post_code":null,
"billing_country":null,
"billing_address1":null,
"billing_address2":null,
"billing_city":null,
"billing_state":null,
"billing_post_code":null,
"preferred_currency":"USD",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
CreateUser JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
users_id Y N 20
msg Y AN 255 See APPENDIX C: Transaction Codes
CreateUser JSON Response Sample {
"status":"success",
"users_id":"220",
"msg":"Account Created Successfully"
}
UPayCard Merchant API Documentation v1.0.25 8
5.2. GetUsers Get all merchants users list.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_users
GetUsers Request
KEY M TYPE LENGHT DESCIPTION
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
date_from N AN 10 ISO 8601
date_to N AN 10 ISO 8601
from_id N N 20 Will return users list with bigger ID than defined (max 100)
GetUsers JSON Request Sample {
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_",
"date_from":"2015-06-01",
"date_to":"2015-06-15",
"from_id":100
}
GetUsers JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg_code Y AN 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
filters N LIST Will return used filters in request
results_count Y N Total count of filtered users
users Y LIST List of all merchant users
id Y N 20
username Y AN 100
first_name N A 60
middle_name N A 60
last_name N A 60
status Y A 1 Possible values: D : Deleted I : Inactive B : Blocked A : Approved C : Completed R : Registered
date_created Y AN 10 ISO 8601
UPayCard Merchant API Documentation v1.0.25 9
date_completed Y AN 10 ISO 8601, date when user profile is completed, if not there will be NULL
CreateUser JSON Response Sample {
"status":"success",
"msg":"Success",
"filters":{
"date_from":"2015-06-01",
"date_to":"2015-06-15",
"from_id":100
},
"results_count":1,
"users":[
{
"id":"220",
"username":"john.doe",
"first_name":"John",
"middle_name":null,
"last_name":"Doe",
"status":"R",
"date_created":"2015-06-06",
"date_completed":"2015-06-16"
}
]
}
UPayCard Merchant API Documentation v1.0.25 10
5.3. GetUserEmail Get user email by username.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_email
GetUserEmail Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserEmail JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetUserEmail JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
email Y AN 100
GetUserEmail JSON Response Sample {
"status":"success",
"msg":"Success",
"email":"john.doe@test.loc"
}
UPayCard Merchant API Documentation v1.0.25 11
5.4. CreateAccount Create additional account to user. User must be approved first.
URL https://api.upaycard.com/api/merchant/v/1.0/function/create_account
CreateAccount Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
CreateAccount JSON Request Sample {
"username":"john.doe",
"currency":"USD",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
CreateAccount JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
account_id Y N 20
msg Y AN 255 See APPENDIX C: Transaction Codes
GetUserEmail JSON Response Sample {
"status":"success",
"account_id":"1753298",
"msg":"Account syccessfuly created."
}
UPayCard Merchant API Documentation v1.0.25 12
5.5. CreateCard Create card to account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/create_card
CreateCard Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
accounts Y N 20 Accounts must be comma (“,”) separated, associated with user and different currency
country Y A 3 ISO 3166-1 alpha-3
nationality Y A 3 ISO 3166-1 alpha-3
first_name Y A 50
last_name Y A 50
embossed_name Y A (3-21) Name to be printed on the plastic card including space (“ “) as separator between Family Name and First Name. Example: JOHN DOE
family_status N A 1 Possible values: S : Single M : Married D : Divorced W : Widower
gender Y A 1 Possible values: M: Male F: Female
title Y A 4 Possible values: Dr : Doctor Mr : Mister Ms : Ms Miss : Miss Mrs : Misses
dob Y AN 10 ISO 8601
email Y AN 50
phone Y AN 16 Phone number without + sign
address1 Y AN 30
address2 N AN 30
city Y AN 100
state Y AN 100
post_code Y AN 10
is_virtual Y A 1 Possible values: Y : yes N : no
shipping_method_id N N 20 Required field for physical card. ID must be get using call
language N A 3 ISO 639-1
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
UPayCard Merchant API Documentation v1.0.25 13
CreateCard JSON Request Sample {
"username":"john.doe",
"accounts":"1753298,1753299",
"country":"GBR",
"nationality":"GBR",
"first_name":"John",
"middle_name":"",
"last_name":"Doe",
"embossed_name":"John/Doe",
"family_status":"M",
"gender":"M",
"title":"Mr",
"dob":"1981-11-28",
"email":" john.doe@test.loc",
"phone":"4432611151",
"phone2":"",
"address1":"Super str 115",
"address2":"",
"city":" London",
"state":"",
"post_code":"15452",
"is_virtual":"Y",
"language":"ENG",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
CreateCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255
CreateCard JSON Response Sample {
"status":"success",
"msg":"You have successfully ordered a new card. Your request is under
administration review now."
}
Note: use function "GetUserCards" in order to see if your card order was approved.
UPayCard Merchant API Documentation v1.0.25 14
5.6. GetUserDetails Get user detail by username.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_details
GetUserDetails Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserDetails JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetUserDetails JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes user_details Y
id N N 20
username N AN 100
user_permission_group N AN 100
date_register N AN 10 ISO 8601
first_name N AN 60
middle_name N AN 60
last_name N AN 60
date_Of_birth N AN 100
merchant_sponsor N AN 100
gender N A 1
address N AN 100
address_2 N AN 100
city N AN 45
state N AN 40
postal_code N AN 100
country N AN 100
home_phone N AN 100
work_phone N AN 100
cell_phone N AN 100
email N AN 100
billing_address N AN 100
UPayCard Merchant API Documentation v1.0.25 15
billing_address_2 N AN 100
billing_city N AN 100
billing_state N AN 100
billing_postal_code N AN 100
billing_country N AN 100
GetUserDetails JSON Response Sample {
"status":"success",
"msg":"Success",
"user_details":{
"id":"1",
"username":"username",
"user_permission_group":"merchant",
"date_register":"2015-04-01",
"timezone":"Europe/London",
"first_name":"Name",
"middle_name":"",
"last_name":"Surname",
"date_Of_birth":"1980-01-01",
"merchant_sponsor":"",
"gender":"M",
"address":"",
"address_2":"",
"city":"",
"state":"",
"postal_code":"",
"country":"United Kingdom",
"home_phone":"",
"work_phone":"",
"cell_phone":"",
"email":"merchant@mailinator.com",
"billing_address":"",
"billing_address_2":"",
"billing_city":"",
"billing_state":"",
"billing_postal_code":"",
"billing_country":"United Kingdom"
}
}
UPayCard Merchant API Documentation v1.0.25 16
5.7. GetUserAddress Get user addresses by username.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_address
GetUserAddress Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserAddress JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 17
GetUserAddress JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
address Y
address_line1 N AN 100
address_line2 N AN 100
city N A 45
state N AN 40
postal_code N AN 10
country_code N A 3 ISO 3166-1 alpha-3
country N A 200
billing_address_line1 N AN 100
billing_address_line2 N AN 100
billing_city N A 45
billing_state N AN 40
billing_postal_code N AN 10
billing_country_code N A 200 ISO 3166-1 alpha-3
billing_country N A 200
GetUserAddress JSON Response Sample {
"status":"success",
"msg":"Success",
"address":{
"address_line1":"410 Parkway House",
"address_line2":"",
"city":"London",
"state":"Sheen Lane",
"postal_code":"SW14 8LS",
"country_code":"GBR",
"country":"United Kingdom",
"billing_address_line1":"",
"billing_address_line2":"",
"billing_city":"",
"billing_state":"",
"billing_postal_code":"",
"billing_country_code":"",
"billing_country":""
}
}
UPayCard Merchant API Documentation v1.0.25 18
5.8. GetAccountDetails Get account detail by account ID.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_details
GetAccountDetails Request
KEY M TYPE LENGHT DESCIPTION
account Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountDetails JSON Request Sample {
"account":"1753298",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountDetails JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes account_details Y
account_number N N 20
currency N A 3 ISO 4217
account_program_group N AN 100
account_owner N AN 200
account_type N AN 100 business / personal
register_date N AN 10 ISO 8601
timezone N AN 100
account_address N AN 100
account_address_2 N AN 100
account_city N AN 100
account_state N AN 100
account_postal_code N AN 100
account_country N AN 100
account_home_phone N AN 100
account_work_phone N AN 100
account_cell_phone N AN 100
account_billing_address N AN 100
account_billing_address_2 N AN 100
account_billing_city N AN 100
account_billing_state N AN 100
account_billing_postal_code N AN 100
UPayCard Merchant API Documentation v1.0.25 19
account_billing_country N AN 100
GetAccountDetails JSON Response Sample {
"status":"success",
"msg":"Success",
"account_details":{
"account_number":"1753298",
"currency":"USD",
"account_program_group":"Payroll Type 2",
"account_owner":"First name Middle name Last name",
"account_type":"business",
"register_date":"2015-04-01",
"timezone":"Europe/London",
"account_address":"",
"account_address_2":"",
"account_city":"",
"account_state":"",
"account_postal_code":"",
"account_country":"United Kingdom",
"account_home_phone":"",
"account_work_phone":"",
"account_cell_phone":"",
"account_billing_address":"",
"account_billing_address_2":"",
"account_billing_city":"",
"account_billing_state":"",
"account_billing_postal_code":"",
"account_billing_country":"United Kingdom"
}
}
UPayCard Merchant API Documentation v1.0.25 20
5.9. GetAccountAddress Get account addresses.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_address
GetAccountAddress Request
KEY M TYPE LENGHT DESCIPTION
account Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountAddress JSON Request Sample { "account":"1753298", "key":"_MERCHANT_KEY_", "ts":_TIMESTAMP_, "sign":"_SIGN_" }
UPayCard Merchant API Documentation v1.0.25 21
GetAccountAddress JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
address Y
address_line1 Y AN 100
address_line2 N AN 100
city N A 45
state N AN 40
postal_code N AN 10
country_code N A 3 ISO 3166-1 alpha-3
country Y A 200
billing_address_line1 Y AN 100
billing_address_line2 N AN 100
billing_city N A 45
billing_state N AN 40
billing_postal_code N AN 10
billing_country_code N A 3 ISO 3166-1 alpha-3
billing_country Y A 200
GetAccountAddress JSON Response Sample {
"status":"success",
"msg":"Success",
"address":{
"address_line1":"410 Parkway House",
"address_line2":"",
"city":"London",
"state":"Sheen Lane",
"postal_code":"SW14 8LS",
"country_code":"GBR",
"country":"United Kingdom",
"billing_address_line1":"",
"billing_address_line2":"",
"billing_city":"",
"billing_state":"",
"billing_postal_code":"",
"billing_country_code":""
"billing_country":""
}
}
UPayCard Merchant API Documentation v1.0.25 22
5.10. GetUserAccounts Get all users accounts by username.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_accounts
GetUserAccounts Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserAccounts JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetUserAccounts JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
accounts Y LIST
id Y N 20
balance N N 10,2
currency Y A 3 ISO 4217
status_code Y N 1
status Y A 10
GetUserAccounts JSON Response Sample {
"status":"success",
"msg":"Success",
"accounts":[
{
"id":"1753298",
"balance":"0.00",
"currency":"USD",
"status_code":"1",
"status":"Normal"
}
]
}
UPayCard Merchant API Documentation v1.0.25 23
5.11. GetUserCards Get all users cards.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_cards
GetUserCards Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserCards JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetUserCards JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes cards Y LIST
id Y LIST
id Y N 20
status Y A 1 Possible values: A: Activated N: Not Activated B: Blocked S: Suspended T: Admin Suspend(Temporary Blocked) E: Expired
accounts Y LIST
currency Y LIST
account Y N 20
currency Y A 3 ISO 4217
card_balance N N 10,2
UPayCard Merchant API Documentation v1.0.25 24
GetUserCards JSON Response Sample {
"status":"success",
"msg":"Success",
"cards":{
"296":{
"id":"296",
"status":"A",
"accounts":{
"USD":{
"account":"1753792",
"currency":"USD",
"card_balance":"7368.07"
},
"EUR":{
"account":"1777364",
"currency":"EUR",
"card_balance":"1354.07"
}
}
},
"388":{
"id":"388",
"status":"A",
"accounts":{
"EUR":{
"account":"1777364",
"currency":"EUR",
"card_balance":"4897.57"
}
}
}
}
}
UPayCard Merchant API Documentation v1.0.25 25
5.12. GetAccountStatus Get account status.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_status
GetAccountStatus Request
KEY M TYPE LENGHT DESCIPTION
account Y N 10
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountStatus JSON Request Sample {
"account":"100002",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountStatus JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
account Y
id Y N 20
balance N N 10,2
currency Y A 3 ISO 4217
status_code Y N 1
status Y A 10
GetAccountStatus JSON Response Sample {
"status":"success",
"msg":"Success",
"account":[
{
"id":"1753298",
"balance":"0.00",
"currency":"USD",
"status_code":"1",
"status":"Normal"
}
]
}
UPayCard Merchant API Documentation v1.0.25 26
5.13. GetAccountCards Get all account cards.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_cards
GetAccountCards Request
KEY M TYPE LENGHT DESCIPTION
account Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountCards JSON Request Sample {
"account":"100002",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountCards JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
cards Y LIST
id Y N 20
balance N N 10,2
status Y A 1 Possible values: A: Activated N: Not Activated B: Blocked S: Suspended T: Admin Suspend(Temporary Blocked) E: Expired
currency Y A 3 ISO 4217
GetAccountCards JSON Response Sample {
"status":"success",
"msg":"Success",
"cards":[
{
"id":"20",
"balance":"0.00",
"status":"N",
"currency":"USD"
}
UPayCard Merchant API Documentation v1.0.25 27
]
}
UPayCard Merchant API Documentation v1.0.25 28
5.14. GetAccountInventory Get a list of envelope numbers and card ids
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_inventory
GetAccountInventory Request
KEY M TYPE LENGHT DESCIPTION
account Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountInventory JSON Request Sample {
"account":"100002",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountInventory JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
account Y AN 20 Account ID
inventory Y AN Result is ‘env1,cid1|env2,cid2|etc…’
GetAccountInventory JSON Response Sample {
"status":"success",
"msg":"Success",
"account":"100002",
"inventory":"742652000000,15|742652000001,16|742652000002,17",
}
UPayCard Merchant API Documentation v1.0.25 29
5.15. GetCardStatus Get card status by card ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_status
GetCardStatus Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardStatus JSON Request Sample {
"card_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardStatus JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
card_status Y A 1 Possible values: A: Activated N: Not Activated B: Blocked S: Suspended T: Admin Suspend(Temporary Blocked) E: Expired
card_status_decription Y A 40
GetUserCards JSON Response Sample {
"status":"success",
"msg":"Success",
"card_status":"N",
"card_status_description":"Not Activated"
}
UPayCard Merchant API Documentation v1.0.25 30
5.16. GetCardDetails Get card details by card ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_details
GetCardDetails Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardDetails JSON Request Sample {
"card_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardDetails JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
card_details Y
client_id Y N 20
card number Y AN Encrypted card number (See APPENDIX B: ENCRYPT/Decrypt information)
date_expired Y AN Encrypted expired date (mm/yy) (See APPENDIX B: ENCRYPT/Decrypt information)
date_created Y AN 10 ISO 8601
name_on_card Y AN
card_type Y AN virtual / physical
GetCardDetails JSON Response Sample {
"status":"success",
"msg":"Success",
"card_details": {
"client_id": "8181581815",
"card_number": "PlKaAjbbDYfuBkH7P7WCnVRL3pEkqC5C",
"date_expired": "5O6ku6OmfG4=",
"date_created": "2015-05-26",
"name_on_card": "Name",
"card_type": "physical"
}
}
UPayCard Merchant API Documentation v1.0.25 31
5.17. GetCardCvv Get card CVV by card ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_cvv
GetCardCvv Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardCvv JSON Request Sample {
"card_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardCvv JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
card_cvv Y AN Encrypted card cvv (See APPENDIX B: ENCRYPT/Decrypt information)
GetCardCvv JSON Response Sample {
"status":"success",
"msg":"Success",
"card_cvv":"2pulYPkKkjY="
}
UPayCard Merchant API Documentation v1.0.25 32
5.18. GetCardPin Get card PIN by card ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_pin
GetCardPin Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardPin JSON Request Sample {
"card_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardPin JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
card_pin Y AN Encrypted card PIN (See APPENDIX B: ENCRYPT/Decrypt information)
GetCardPin JSON Response Sample {
"status":"success",
"msg":"Success",
"card_pin":"0widB10vG/Y="
}
UPayCard Merchant API Documentation v1.0.25 33
5.19. UpdateUserAddress Update users address
URL https://api.upaycard.com/api/merchant/v/1.0/function/update_user_address
UpdateUserAddress Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
country_code N A 3 ISO 3166-1 alpha-3
address_line1 N AN 100
address_line2 N AN 100
city N A 45
state N AN 40
postal_code N AN 10
billing_country_code N A 3 ISO 3166-1 alpha-3
billing_address_line1 N AN 100
billing_address_line2 N AN 100
billing_city N A 45
billing_state N AN 40
billing_postal_code N AN 10
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
UpdateUserAddress JSON Request Sample {
"username":"test11",
"country_code":"GBR",
"address1":"",
"address2":"",
"city":"London",
"state":"",
"post_code":"",
"billing_country_code":"",
"billing_address1":"",
"billing_address2":"",
"billing_city":"",
"billing_state":"",
"billing_post_code":"",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 34
UpdateUserAddress JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
UpdateUserAddress JSON Response Sample {
"status":"success",
"msg":"Address updated"
}
UPayCard Merchant API Documentation v1.0.25 35
5.20. UpdateAccountAddress Update account address
URL https://api.upaycard.com/api/merchant/v/1.0/function/update_account_address
UpdateAccountAddress Request
KEY M TYPE LENGHT DESCIPTION
account Y AN 100
country_code N A 3 ISO 3166-1 alpha-3
address_line1 N AN 100
address_line2 N AN 100
city N A 45
state N AN 40
postal_code N AN 10
billing_country_code N A 3 ISO 3166-1 alpha-3
billing_address_line1 Y AN 100
billing_address_line2 N AN 100
billing_city N A 45
billing_state N AN 40
billing_postal_code N AN 10
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
UpdateAccountAddress JSON Request Sample {
"account":1753298,
"country_code":"GBR",
"address_line1":"",
"address_line2":"",
"city":"London",
"state":"",
"post_code":"",
"billing_country_code":"",
"billing_address_line1":"",
"billing_address_line2":"",
"billing_city":"",
"billing_state":"",
"billing_post_code":"",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 36
UpdateAccountAddress JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
UpdateAccountAddress JSON Response Sample {
"status":"success",
"msg":"Address updated"
}
UPayCard Merchant API Documentation v1.0.25 37
5.21. UpdateAccountOwner Change account owner.
URL https://api.upaycard.com/api/merchant/v/1.0/function/update_account_owner
UpdateAccountOwner Request
KEY M TYPE LENGHT DESCIPTION
account Y N 20
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
UpdateAccountOwner JSON Request Sample {
"account":1753242,
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UpdateAccountOwner JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
UpdateAccountOwner JSON Response Sample {
"status":"success",
"msg":"Account owner updated"
}
UPayCard Merchant API Documentation v1.0.25 38
5.22. AssignCardToAccount Can assign card without movements from own account to other own or user’s account
URL https://api.upaycard.com/api/merchant/v/1.0/function/assign_card_to_account
AssignCardToAccount Request
KEY M TYPE LENGHT DESCIPTION
inventoryaccount Y N 20 From account
card_id Y N 20 Card ID
account Y N 20 To account
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
AssignCardToAccount JSON Request Sample {
"inventoryaccount":1000001,
"card_id":"1",
"account":"1000002",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
AssignCardToAccount JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
AssignCardToAccount JSON Response Sample {
"status":"success",
"msg":"Card assigned to account"
}
UPayCard Merchant API Documentation v1.0.25 39
5.23. GetUserKYCStatus Get users KYC files status.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_kyc_status
GetUserKYCStatus Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserKYCStatus JSON Request Sample {
"username":"john.doe",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 40
GetUserKYCStatus JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
kyc_statuses Y LIST
id Y N 20
date_provided Y AN 10 ISO 8601
type_id Y N 20 See APPENDIX D: User KYC Document Types
type Y A 20
status_code Y N 1 Possible values: 2 : Approved 3 : Rejected 4 : Pending 6 : Requested 8 : Under Review
status Y A 20
GetUserKYCStatus JSON Response Sample {
"status":"success",
"msg":"Success",
"kyc_statuses":[
{
"id":"29",
"date_provided":"2015-01-30",
"type_id":"1",
"type":"Utility Bill",
"status":"Requested"
}
]
}
UPayCard Merchant API Documentation v1.0.25 41
5.24. UpdateUserKyc Upload user’s KYC files. Acceptable file types are .jpg, .png, .pdf, .doc
URL https://api.upaycard.com/api/merchant/v/1.0/function/update_user_kyc
UpdateUserKyc Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
filename Y AN 50 Must be with file extension
doctype Y N 2 See APPENDIX D: User KYC Document Types
organizations_name N AN 100 Mandatory in some cases. See APPENDIX D: User KYC Document Types
file_body Y AN 2MB base64 encoded file content
notification_url N AN 255 If provided - URL where notifications will be pushed when KYC status will be changed. Note that POST will be made to the provided URL address. e.g. http://www.mydomain.com/kyc_notifications See APPENDIX J: KYC notification CATCHER PHP Code Example
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
UpdateUserKyc JSON Request Sample {
"username":"rka",
"filename":"example_passport.jpg",
"doctype":1,
"organization_name":null,
"file_body":"_BASE_64_ENCODED_FILE_",
"notification_url":"http://www.mydomain.com/kyc_notifications",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 42
UpdateUserKyc JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See
id Y N 20 Updated KYC document ID
UpdateUserKyc JSON Response Sample {
"status":"success",
"msg":"Kyc updated.",
"id":"81815"
}
UPayCard Merchant API Documentation v1.0.25 43
5.25. GetTransactionStatus Get transaction status by transaction ID.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_transaction_status
GetTransactionStatus Request
KEY M TYPE LENGHT DESCIPTION
transaction_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetTransactionStatus JSON Request Sample {
"transaction_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetTransactionStatus JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See
transaction_status Y A 1 Possible values: C: Completed P: Pending R: Rejected
transaction_code Y A 3 See
transaction_status_desc Y N 50
test Y A 1 Possible values: Y: Yes N: No
GetTransactionStatus JSON Response Sample {
"status":"success",
"msg":"Success",
"transaction_status":"C",
"transaction_code":"000",
"transaction_status_desc":"Transaction successfully completed",
"test":"N"
}
UPayCard Merchant API Documentation v1.0.25 44
5.26. TransferAccountToAccount Initiate account to account transfer.
URL https://api.upaycard.com/api/merchant/v/1.0/function/transfer_a_to_a
TransferAccountToAccount Request
KEY M TYPE LENGHT DESCIPTION
sender_account Y N 20
receiver_account Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
test Y N 1 Is it test transaction? Possible values: 1:Yes 0:No
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
TransferAccountToAccount JSON Request Sample {
"sender_account":"1753154",
"receiver_account":"1753242",
"amount":15.00,
"currency":"USD",
"test":1,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
TransferAccountToAccount JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
transaction_id Y A 20
TransferAccountToAccount JSON Response Sample {
"status":"success",
"msg":"Operation completed.",
"transaction_id":"324"
}
UPayCard Merchant API Documentation v1.0.25 45
5.27. TransferAccountToCard Initiate account to card transfer.
URL https://api.upaycard.com/api/merchant/v/1.0/function/transfer_a_to_c
TransferAccountToCard Request
KEY M TYPE LENGHT DESCIPTION
sender_account Y N 20
receiver_card Y N 20
amount Y N 10,2 Minimum amount 50 USD (or equivalent in other currency).
currency Y A 3 ISO 4217
test Y N 1 Is it test transaction? Possible values: 1:Yes 0:No
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
TransferAccountToCard JSON Request Sample {
"sender_account":"1753154",
"receiver_card":16,
"amount":60.00,
"currency":"USD",
"test":1,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
TransferAccountToCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
transaction_id Y A 20
code Y A Error code
TransferAccountToCard JSON Response Sample {
"status":"success",
"msg":"Operation completed.",
"transaction_id":"326",
"code":"000"
}
UPayCard Merchant API Documentation v1.0.25 46
5.28. TransferCardToCard Initiate card to card transfer.
URL https://api.upaycard.com/api/merchant/v/1.0/function/transfer_c_to_c
TransferCardToCard Request
KEY M TYPE LENGHT DESCIPTION
sender_card Y N 20
receiver_card Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
TransferCardToCard JSON Request Sample {
"sender_card":"18",
"receiver_card":16,
"amount":1.01,
"currency":"USD",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
TransferCardToCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
transaction_id Y A 20
TransferCardToCard JSON Response Sample {
"status":"success",
"msg":"Operation completed.",
"transaction_id":"328"
}
UPayCard Merchant API Documentation v1.0.25 47
5.29. GetAccountLastActivity Returns list of 10 latest account transactions.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_last_activity
GetAccountLastActivity Request
KEY M TYPE LENGHT DESCIPTION
account Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountLastActivity JSON Request Sample {
"account":"100002",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountLastActivity JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
activity Y [ ] List of transactions
UPayCard Merchant API Documentation v1.0.25 48
GetAccountLastActivity JSON Response – Transaction list item
KEY M TYPE LENGHT DESCIPTION
id Y N 20 Transaction Id
date Y AN 10 ISO 8601
datetime Y N 11 Unix timestamp
sender Y AN 20 Account or Card number of sender
recipient Y AN 20 Account or Card number of recipient
debit Y N 11 Amount debited
credit Y N 11 Amount debited
currency Y A 3 ISO 4217
description Y A 100 Description
GetAccountLastActivity JSON Response Sample {
"status":"success",
"msg":"Success",
"activity":[
{
"id":"4320",
"date":"2015-06-13",
"datetime":"1434197442",
"sender":"100002",
"recipient":"1000023",
"debit":null,
"credit":"-1160.82",
"currency":"USD",
"description":"Account (100002) to account(1000023) transaction"
},
{
"id":"4140",
"date":"2015-06-13",
"datetime":"1434192457",
"sender":"",
"recipient":"100002",
"debit":"1160.82",
"credit":null,
"currency":"USD",
"description":"Confirmed bank account to account transfer"
}
]
}
UPayCard Merchant API Documentation v1.0.25 49
5.30. GetAccountActivity
Returns list of account transactions from period (max 31 day).
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_account_activity
GetAccountActivity Request
KEY M TYPE LENGHT DESCIPTION
account Y N 11
date_from Y AN 10 ISO 8601
date_to Y AN 10 ISO 8601
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetAccountActivity JSON Request Sample {
"account":"100002",
"date_from":"2015-06-10",
"date_to":"2015-06-13",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetAccountActivity JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
totals Y LIST Totals for filtered period
total_count Y N 11 Number of transactions
rejected_count Y N 11 Number of rejected transactions
sum_credits Y N 11 Total credited amount
sum_debits Y N 11 Total debited amount
count_credits Y N 11 Number of credit transactions
count_debits Y N 11 Number of debit transactions
activity Y [ ] List of transactions
id Y N 20 Transaction Id
Is_rejected Y N 1 Is transaction rejected
date Y AN 10 ISO 8601
datetime Y N 11 Unix timestamp
sender Y AN 20 Account or Card number of sender
recipient Y AN 20 Account or Card number of recipient
debit Y N 11 Amount debited
credit Y N 11 Amount debited
currency Y A 3 ISO 4217
description Y A 100 Description
UPayCard Merchant API Documentation v1.0.25 50
GetAccountActivity JSON Response Sample {
"status":"success",
"msg":"Success",
"totals":{
"total_count":2,
"rejected_count":0,
"sum_credits":-1160.82,
"sum_debits":1160.82,
"count_credits":1,
"count_debits":1
},
"activity":[
{
"id":"4320",
"is_rejected":"0",
"date":"2015-06-13",
"datetime":"1434197442",
"sender":"100002",
"recipient":"1000023",
"debit":null,
"credit":"-1160.82",
"currency":"USD",
"description":"Account (100002) to account (1000023) transaction"
},
{
"id":"4140",
"is_rejected":"0",
"date":"2015-06-13",
"datetime":"1434192457",
"sender":"",
"recipient":"100002",
"debit":"1160.82",
"credit":null,
"currency":"USD",
"description":"Confirmed bank account to account transfer"
}
]
}
UPayCard Merchant API Documentation v1.0.25 51
5.31. GetCardLastActivity Returns list of 10 latest card transactions.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_last_activity
GetCardLastActivity Request
KEY M TYPE LENGHT DESCIPTION
card_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardLastActivity JSON Request Sample {
"card_id":"1001",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardLastActivity JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
activity Y [ ] List of transactions
GetCardLastActivity JSON Response – Transaction list item
KEY M TYPE LENGHT DESCIPTION
id Y N 20 Transaction Id
date Y AN 10 ISO 8601
datetime Y N 11 Unix timestamp
sender Y AN 20 Account or Card number of sender
recipient Y AN 20 Account or Card number of recipient
debit Y N 11 Amount debited
credit Y N 11 Amount debited
currency Y A 3 ISO 4217
description Y A 100 Description
UPayCard Merchant API Documentation v1.0.25 52
GetCardLastActivity JSON Response Sample {
"status":"success",
"msg":"Success",
"activity":[
{
"id":"4320",
"date":"2015-06-16",
"datetime":"1434157436",
"sender":"000000******1234",
"recipient":"100002",
"debit":null,
"credit":"-116.02",
"currency":"USD",
"description":"Card (000000******1234) to account (100002) transaction"
},
{
"id":"4140",
"date":"2015-06-13",
"datetime":"1434192457",
"sender":"100002",
"recipient":"000000******1234",
"debit":"120.24",
"credit":null,
"currency":"USD",
"description":"Account (100002) to card (000000******1234) transaction"
}
]
}
UPayCard Merchant API Documentation v1.0.25 53
5.32. GetCardActivity Returns list of card transactions from period (max 31 day).
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_card_activity
GetCardActivity Request
KEY M TYPE LENGHT DESCIPTION
card_id Y N 20
date_from Y AN 10 ISO 8601
date_to Y AN 10 ISO 8601
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetCardActivity JSON Request Sample {
"card_id":"1001",
"date_from":"2015-06-13",
"date_to":"2015-06-16",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetCardActivity JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
totals Y LIST Totals for filtered period
total_count Y N 11 Number of transactions
rejected_count Y N 11 Number of rejected transactions
sum_credits Y N 11 Total credited amount
sum_debits Y N 11 Total debited amount count_credits Y N 11 Number of credit transactions
count_debits Y N 11 Number of debit transactions
activity Y [ ] List of transactions
id Y N 20 Transaction Id
Is_rejected Y N 1 Is transaction rejected
date Y AN 10 ISO 8601
datetime Y N 11 Unix timestamp
sender Y AN 20 Account or Card number of sender
recipient Y AN 20 Account or Card number of recipient
debit Y N 11 Amount debited
credit Y N 11 Amount debited
currency Y A 3 ISO 4217
description Y A 100 Description
UPayCard Merchant API Documentation v1.0.25 54
GetCardActivity JSON Response Sample {
"status":"success",
"msg":"Success",
"totals":{
"total_count":2,
"rejected_count":0,
"sum_credits":-116.02,
"sum_debits":120.24,
"count_credits":1,
"count_debits":1
},
"activity":[
{
"id":"4320",
"is_rejected":"0",
"date":"2015-06-16",
"datetime":"1434157436",
"sender":"000000******1234",
"recipient":"100002",
"debit":null,
"credit":"-116.02",
"currency":"USD",
"description":"Card (000000******1234) to account (100002) transaction"
},
{
"id":"4140",
"is_rejected":"0",
"date":"2015-06-13",
"datetime":"1434192457",
"sender":"100002",
"recipient":"000000******1234",
"debit":"120.24",
"credit":null,
"currency":"USD",
"description":"Account (100002) to card (000000******1234) transaction"
}
]
}
UPayCard Merchant API Documentation v1.0.25 55
5.33. GetShippingMethods Get list of all available shipping methods for country.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_shipping_methods
GetShippingMethods Request
KEY M TYPE LENGHT DESCIPTION
country_code Y A 3 ISO 3166-1 alpha-3
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetShippingMethods JSON Request Sample {
"country_code":"GBR",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetShippingMethods JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
shipping_methods Y LIST
id Y N 20
name Y AN 100
GetUserAccounts JSON Response Sample {
"status":"success",
"msg":"Success",
"shipping_methods":[
{
"id":"1",
"name":"Standard"
}
]
}
UPayCard Merchant API Documentation v1.0.25 56
5.34. InitializeTransfer Prepare transfer from any user to merchant account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/initialize_transfer
InitializeTransfer Request
KEY M TYPE LENGHT DESCIPTION
receiver_account Y N 20 Your account ID for receive transfer
sender Y AN 100 Here can be username or user email or account number from which made transfer. If user did not have requested currency account or have several accounts then there must be account number
amount Y N 10,2 / 10,8
For currencies like EUR or USD use 10,2. For bitcoin 10,8 can be used.
currency Y A 3 ISO 4217, for bitcoin use BTC
order_id Y AN 30 Unique identification of request
description Y AN 100 Transfer description
account_by_user_country N N 1 If parameter provided and its value = 1, then if user is from Europe, transfer will be prepared to merchant EUR account, otherwise to merchant USD account. If merchants EUR or USD account not found – transfer will be prepared to the account provided in the receiver_account parameter.
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
InitializeTransfer JSON Request Sample {
"receiver_account":"1000001",
"sender":"user",
"amount":1.01,
"currency":"USD",
"order_id":"15_20151110080801",
"description":"Payment for order #15",
"account_by_user_country":0,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 57
InitializeTransfer JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN Detailed explanation of error
order_id N AN 100 UniqueID of request
hash N AN
token_number N AN 10
InitializeTransfer JSON SUCCESS Response Sample {
"status":"success",
"msg":"Transfer initialized.",
"order_id":"15_20151110080801",
"hash":"a64fb511c885f9aeff211f7bfefc5648",
"token_number":"48-QI"
}
InitializeTransfer JSON FAILED Response Sample {
"status":"error",
"code":509,
"msg":"Define sender account",
"description":"Did not found active account for currency",
"hash":"5640bf0cb3e5c"
}
UPayCard Merchant API Documentation v1.0.25 58
5.35. FinishTransfer Finish prepared transfer from any user to merchant account. Request user to enter his Key Code
for given token_number.
URL https://api.upaycard.com/api/merchant/v/1.0/function/finish_transfer
FinishTransfer Request
KEY M TYPE LENGHT DESCIPTION
receiver_account Y N 20 Your account ID for receive transfer
hash Y AN hash code given in InitializeTransfer success response
token_number Y AN 10 token_number given in InitializeTransfer success response
token_code Y N 6 User’s entered Key Code for given token_number
account_by_user_country N N 1 If InitializeTransfer was called with this param (value=1), then add this param to the FinishTransfer with value=1
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
FinishTransfer JSON Request Sample {
"receiver_account":"1000001",
"hash":"5640bf0cb3e5c",
"token_number":"48-QI"
"token_code":"123456",
"account_by_user_country":0,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 59
FinishTransfer JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN Detailed explanation of error
transaction_id N N 20
order_id N AN 100 UniqueID of request
FinishTransfer JSON SUCCESS Response Sample {
"status":"success",
"code":000,
"msg":"Transaction successfully completed",
"transaction_id":"100687",
"order_id":"15_20151110080801",
}
FinishTransfer JSON FAILED Response Sample {
"status":"error",
"code":512,
"msg":"Wrong Key Code provided",
}
If finish transaction was failed then procedure must start again from InitializeTransfer
UPayCard Merchant API Documentation v1.0.25 60
5.36. RefundTransfer Support several partial refunds.
URL https://api.upaycard.com/api/merchant/v/1.0/function/refund_transfer
RefundTransfer Request
KEY M TYPE LENGHT DESCIPTION
transaction_id Y N 20 Transaction ID which to refund
amount Y N 10,2 Amount to refund
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
RefundTransfer JSON Request Sample {
"transaction_id":"100687",
"amount":0.50,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
RefundTransfer JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN Detailed explanation of error
transaction_id N N 20
amount N N 10,2
currency N A 3 ISO 4217
RefundTransfer JSON Response Sample {
"status":"success",
"code":000,
"msg":"Transaction successfully completed",
"transaction_id":"100688",
"amount":0.50,
"currency":"USD",
}
UPayCard Merchant API Documentation v1.0.25 61
5.37. SendSms Send SMS message to merchant sponsored account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/send_sms
SendSms Request
KEY M TYPE LENGHT DESCIPTION
id Y N 20 SMS receiver account ID or card ID
type Y N 1 Id type, 1 = account ID, 2 = card ID
message Y AN 1600 SMS Message. Note: Messages with one or more non-GSM characters are limited to 70 characters. Any SMS messages that include 1 or more non-GSM characters will be separated into messages of 70 characters or less. Available tags: [[account_id]], [[username]], [[firstname]], [[lastname]], [[balance]], [[pin_code]].
tx_id N N 20 Transaction ID. Note: in this case id is provided, you can use tags: [[tx_id]], [[tx_amount]] and [[tx_currency]] in your message, which will be replaced by tx id, tx amount and tx currency
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
SendSms JSON Request Sample {
"id":"1000001",
"type":"1",
"message":"test message",
"tx_id":"2001",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 62
SendSms JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
SendSms JSON SUCCESS Response Sample {
"status":"success",
"msg":" Message successfully sent",
}
SendSms JSON FAILED Response Sample {
"status":"error",
"msg":" User not found",
}
UPayCard Merchant API Documentation v1.0.25 63
5.38. SendEmail Send email message to merchant sponsored account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/send_email
SendEmail Request
KEY M TYPE LENGHT DESCIPTION
id Y N 20 Email receiver account ID or card ID
type Y N 1 Id type, 1 = account ID, 2 = card ID
subject Y AN 78 Email subject
message Y AN Email message. Available tags: [[account_id]], [[username]], [[firstname]], [[lastname]], [[balance]], [[pin_code]].
tx_id N N 20 Transaction ID. Note: in this case id is provided, you can use tags: [[tx_id]], [[tx_amount]] and [[tx_currency]] in your message, which will be replaced by tx id, tx amount and tx currency
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
SendEmail JSON Request Sample {
"id":"1000001",
"type":"1",
"subject":"test subject",
"message":"test message",
"tx_id":"2001",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 64
SendEmail JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 Message
SendEmail JSON SUCCESS Response Sample {
"status":"success",
"msg":" Email successfully sent",
}
SendEmail JSON FAILED Response Sample {
"status":"error",
"msg":" User not found",
}
UPayCard Merchant API Documentation v1.0.25 65
5.39. TransferAccountToUser Initiate account to user transfer.
URL https://api.upaycard.com/api/merchant/v/1.0/function/transfer_a_to_u
TransferAccountToUser Request
KEY M TYPE LENGHT DESCIPTION
sender_account Y N 20
receiver Y AN 100 Here can be username or user email or account number where transfer money to. If submitted not account number and user did not have requested currency account or have several accounts then transfer will be made to primary account
amount Y N 10,2
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
TransferAccountToUser JSON Request Sample {
"sender_account":"1753154",
"receiver":"user",
"amount":15.00,
"currency":"USD",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
TransferAccountToUser JSON Response
KEY M TYPE LENGHT DESCIPTION
Status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
transaction_id Y N 20
TransferAccountToUser JSON Response Sample {
"status":"success",
"msg":"Operation completed.",
"transaction_id":"324"
}
UPayCard Merchant API Documentation v1.0.25 66
5.40. RequestSms Send requested SMS message to merchant sponsored account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/request_sms
RequestSms Request
KEY M TYPE LENGHT DESCIPTION
user_id Y N 20 Sms receiver user id
type Y AN 9 Sms type. 'accountbal' = Request Account Balance 'cardbal' = Request Card Balance, 'pincode' = Request UPayCard MasterCard PIN Code 'accounttx' = Request Account recent transactions 'cardtx' = Request UPayCard MasterCard recent transactions
id Y N 20 Account id or last 4 digits of UPayCard MasterCard
order N N 1 1, 2, or 3 to indicate if you want request the most recent, second to last or third to last transaction.
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
RequestSms JSON Request Sample {
"user_id":"1000001",
"type":"accountbal",
"id":"10002",
"order ":"1",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 67
RequestSms JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
RequestSms JSON SUCCESS Response Sample {
"status":"success",
"msg":"SMS successfully sent",
}
RequestSms JSON FAILED Response Sample {
"status":"error",
"msg":" User not found",
}
UPayCard Merchant API Documentation v1.0.25 68
5.41. RequestEmail Send requested email message to merchant sponsored account.
URL https://api.upaycard.com/api/merchant/v/1.0/function/request_email
RequestEmail Request
KEY M TYPE LENGHT DESCIPTION
user_id Y N 20 Email receiver user id
type Y AN 9 Email type. 'accountbal' = Request Account Balance 'cardbal' = Request Card Balance, 'pincode' = Request UPayCard MasterCard PIN Code 'accounttx' = Request Account recent transactions 'cardtx' = Request UPayCard MasterCard recent transactions
id Y N 20 Account id or last 4 digits of UPayCard MasterCard
order N N 1 1, 2, or 3 to indicate if you want request the most recent, second to last or third to last transaction.
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
RequestEmail JSON Request Sample {
"user_id":"1000001",
"type":"acountbal",
"id":"10002",
"order ":"1",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 69
RequestEmail JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
code N N 3 See APPENDIX C: Transaction Codes
msg Y AN 255 See APPENDIX C: Transaction Codes
RequestEmail JSON SUCCESS Response Sample {
"status":"success",
"msg":"Email sent",
}
RequestEmail JSON FAILED Response Sample {
"status":"error",
"msg":" User not found",
}
UPayCard Merchant API Documentation v1.0.25 70
5.42. ActivateCard Activate card by ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/activate_card
ActivateCard Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
ActivateCard JSON Request Sample {
"card_id":22,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
ActivateCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
ActivateCard JSON Response Sample {
"status":" Card succefully activated",
"msg":"Success",
}
UPayCard Merchant API Documentation v1.0.25 71
5.43. CheckCardidInfo Check card information by ID
URL https://api.upaycard.com/api/merchant/v/1.0/function/check_cardid_info
CheckCardInfo Request
KEY M TYPE LENGHT DESCIPTION
card_id Y AN 20 Card ID
cardnumber Y N 16 Full card number, must be encrypted by 3DES algorithm with 3DES key – provided by UPayCard
cvv Y N 3 cvv number, must be encrypted by 3DES algorithm with 3DES key – provided by UPayCard
nameoncard Y AN 30
expirymonth Y N 2
expiryyear Y N 4 firstname Y A 60
lastname Y A 60
email Y A 50
mobile Y AN 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
CheckCardInfo JSON Request Sample {
"card_id":"1353",
"cardnumber":"+auQjcJ8sh6xiArXQpsyYA==",
"cvv":"qcsc0SC\/V\/A=",
"nameoncard":"kazkas",
"expirymonth":"12",
"expiryyear":"15",
"firstname":"ppll",
"lastname":"asd",
"email":"facsa@dasd.com",
"mobile":"38741220012",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 72
CheckCardInfo JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
data
cardnumber Y A 5 ok or notok
cvv Y A 5 ok or notok
nameoncard Y A 5 ok or notok
expirymonth Y A 5 ok or notok
expiryyear Y A 5 ok or notok
firstname Y A 5 ok or notok
lastname Y A 5 ok or notok
email Y A 5 ok or notok
mobile Y A 5 ok or notok
CheckCardInfo JSON Response Sample {
"status":"success",
"data":{
"cardnumber":"ok",
"cvv":"ok",
"nameoncard":"notok",
"expirymonth":"notok",
"expiryyear":"notok",
"firstname":"notok",
"lastname":"notok",
"email":"notok",
"mobile":"notok"
}
}
UPayCard Merchant API Documentation v1.0.25 73
5.44. CreatePurchase Initiates purchase procedure.
URL https://api.upaycard.com/api/merchant/v/1.0/function/create_purchase
CreatePurchase Request
KEY M TYPE LENGHT DESCIPTION
receiver_account Y N 20 Your account ID for receive transfer
amount Y N 10,2
currency Y A 3 ISO 4217
order_id Y A 50 Unique order ID
sender_user_id N N 20 Upaycard user ID
sender_account N N 20 Upaycard account ID
url_user_on_success N A 255 URL where user will returned after successful purchase
url_user_on_fail N A 255 URL where user will returned in case of failed purchase
url_api_on_success N A 255 URL where will be sent IPN (instant payment notification) in case of successfully completed purchase. See APPENDIX I: Purchase IPN CATCHER PHP Code Example
url_api_on_fail N A 255 URL where will be sent IPN (instant payment notification) in case of failed or canceled purchase. See APPENDIX I: Purchase IPN CATCHER PHP Code Example
language N A 2 Preferred language. If not provided – English will be used
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
CreatePurchase JSON Request Sample {
"receiver_account":"1000001",
"amount":"1.01",
"currency":"USD",
"order_id":"my_order_81815",
"sender_user_id": null,
"sender_account": null,
"url_user_on_success":"https://www.myeshopexample.com/success_purchase",
"url_user_on_fail":" https://www.myeshopexample.com/failed_purchase",
"url_api_on_success":"https://www.myeshopexample.com/ipn_success_purchase",
"url_api_on_fail":"https://www.myeshopexample.com/ipn_failed_purchase",
"language":"en",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 74
CreatePurchase JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See
reference_id Y AN 16 Unique ID of the purchase request
order_id Y A 50 Unique order ID
amount Y N 10,2
currency Y A 3 ISO 4217
purchase_status Y N 11 See APPENDIX H: Purchase statuses
url Y AN 255 URL where user can finish or cancel his purchase (encode this URL using base64_encode function and redirect to Upaycard login page with additional "redirect" param, e.g.: https://user.upaycard.com/en/auth/login/redirect/_base64_encoded_url)
CreatePurchase JSON Response Sample {
"status":"success",
"msg":"Success",
"reference_id":"ap-57fce78057df6",
"order_id":"my_order_81815",
"amount":"1.01",
"currency":"USD",
"purchase_status":1,
"url":"https://upaycard.com/en/purchase/confirmpurchase/ref/ap-57fce78057df6"
}
UPayCard Merchant API Documentation v1.0.25 75
5.45. GetPurchaseStatus Gets purchase status.
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_purchase_status
GetPurchaseStatus Request
KEY M TYPE LENGHT DESCIPTION
reference_id Y AN 255 Unique ID of the purchase request
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetPurchaseStatus JSON Request Sample {
"reference_id":"ap-57fce78057df6"
}
GetPurchaseStatus JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See
reference_id Y AN 255 Unique ID of the purchase request
order_id Y A 50 Unique order ID
amount Y N 10,2
currency Y A 3 ISO 4217
purchase_status Y N 11 See APPENDIX H: Purchase statuses
GetPurchaseStatus JSON Response Sample {
"status":"success",
"msg":"Success",
"reference_id":"ap-57fce78057df6",
"order_id":"my_order_81815",
"amount":"1.01",
"currency":"USD",
"purchase_status":9
}
UPayCard Merchant API Documentation v1.0.25 76
5.46. BankTransfer Send money payment request.
URL https://api.upaycard.com/api/merchant/v/1.0/function/bank_transfer
BankTransfer Request
KEY M TYPE LENGHT DESCIPTION
service Y N 1 Possible values: 1 : All 2 : International wire 3: Local wire
sending_account Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
custom_order_id N AN 50
item_name N AN 100
item_description N AN
note N AN See important notes below
message_to_receiver N AN
receiver_title N AN 5
receiver_first_name Y AN 60
receiver_middle_name N AN 60
receiver_last_name Y AN 60
receiver_email Y AN 100
receiver_dob N AN ISO 8601
receiver_gender Y A 1 Possible values: F : female M : male
receiver_mobile Y AN 20
receiver_address Y AN 50
receiver_city Y AN 50
receiver_state N AN 50
receiver_postal Y AN 50
receiver_country Y A 3 ISO 3166-1 alpha-3
receiver_id_type N N 2 See APPENDIX E: User ID Types
receiver_id_number N AN 20
receiver_id_expire N AN ISO 8601
receiver_id_issued_country N A ISO 3166-1 alpha-3
receiver_bank_name Y AN 100
receiver_full_name_on_bank_account Y AN 255
receiver_bank_address Y AN 100
receiver_bank_city Y AN 100
receiver_bank_iban Y AN 40
receiver_bank_swift Y AN 11
receiver_bank_country Y A 3 ISO 3166-1 alpha-3
receiver_correspondent_bank_name N AN 50
receiver_correspondent_bank_swift N AN 50
receiver_correspondent_bank_city N AN 100
receiver_correspondent_bank_currency_code N AN 3
withdrawal_method_id N N 20 S - Standard (1-5 days bank transfer out), E - Express (0-2 days bank transfer out)
UPayCard Merchant API Documentation v1.0.25 77
withdrawal_purpose Y A 3 See APPENDIX N: WITHDRAWAL PURPOSES
poa_filename N AN 255
poa_filebody N AN base64 encoded file content
poi_filename N AN 255
poi_filebody N AN base64 encoded file content
i_filename N AN 255
i_filebody N AN base64 encoded file content
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
Important notes:
"note" parameter is mandatory when 'receiver_bank_country' is one of the
following: Costa Rica, India, South Africa, UAE (United Arab Emirates), Qatar,
Israel.
Costa Rica:
o Please add account number in 'receiver_bank_iban' field. Not provided
information may cause the payment delay.
o Please add Receiver Bank IBAN in 'note' field. Not provided information
may cause the payment delay
India:
o Please add IFSC code and purpose in 'note' field. Not provided
information may cause the payment delay.
South Africa:
o Please add purpose of the payment and clearing code in 'note' field. Not
provided information may cause the payment delay.
United Arab Emirates, Qatar, Israel:
o Please add purpose of the payment in 'note' field. Not provided
information may cause the payment delay.
BankTransfser JSON Request Sample {
"service":"1",
"sending_account":"1783142",
"amount":"1.23",
"currency":"USD",
"custom_order_id":"order123",
"item_name":"name",
"item_description":"description",
"note":"note",
UPayCard Merchant API Documentation v1.0.25 78
"message_to_receiver":"messager",
"receiver_title":"mr",
"receiver_first_name":"John",
"receiver_middle_name":"Ben",
"receiver_last_name":"Dobe",
"receiver_email":"JohnDobe@gmail.com",
"receiver_dob":"1990-05-31",
"receiver_gender":"m",
"receiver_mobile":"12341234532",
"receiver_address":"payer_address",
"receiver_city":"Chicago",
"receiver_state":"Illinois",
"receiver_postal":"12345",
"receiver_country":"USA",
"receiver_id_type":"4",
"receiver_id_number":"20164343432",
"receiver_id_expire":"2016-12-12",
"receiver_id_issued_country":"USA",
"receiver_bank_name":"bank_name",
"receiver_full_name_on_bank_account":"John Doe",
"receiver_bank_address":"payer_bank_address",
"receiver_bank_city":"Chicago",
"receiver_bank_iban":"2342342",
"receiver_bank_swift":"2342342",
"receiver_bank_country":"USA",
"receiver_correspondent_bank_name":"International bank of Chicago",
"receiver_correspondent_bank_swift":"2342342",
"receiver_correspondent_bank_city":" Chicago ",
"receiver_correspondent_bank_currency_code":"USD",
"withdrawal_method_id":"",
"withdrawal_purpose":"MWP",
"poa_filename":"null",
"poa_filebody":"null",
"poi_filename":"null",
"poi_filebody":"null",
"i_filename":"null",
"i_filebody":"null",
"key":"36d8416f2938fb64",
"ts":1478704902,
"sign":"26aac768e19294b33c256f8c8e26b947"
}
UPayCard Merchant API Documentation v1.0.25 79
UPayCard Merchant API Documentation v1.0.25 80
BankTransfer JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255
BankTransfer JSON Response Sample {
"status":"success",
"msg":"Operation completed"
}
Whenever bank transfer is completed or canceled IPN is sent to the merchant provided URL.
Merchant can setup different URL for successfully completed or failed transfer if needed. Of course
same URL can be used for both cases. URL setup page can be found under profile tab “API”. Note
that POST will be sent to the provided URLs. Example of data sent: APPENDIX K: Receive money /
bank transfer IPN CATCHER PHP Code Example.
UPayCard Merchant API Documentation v1.0.25 81
5.47. ReceiveMoneyRequest Receive money payment request.
URL https://api.upaycard.com/api/merchant/v/1.0/function/receive_money_request
ReceiveMoneyRequest Request
KEY M TYPE LENGHT DESCIPTION
service Y N 1 Possible values: 1 : All 2 : International wire 3: Local wire
receiving_account Y N 20
amount Y A 10,2
currency Y A 3 ISO 4217
custom_order_id N AN 50
item_name N AN 100
item_description N AN
note N AN
message_to_payer N AN
payer_title N AN 5
payer_first_name Y AN 60
payer_middle_name N AN 60
payer_last_name Y AN 60
payer_email Y AN 100
payer_dob N AN ISO 8601
payer_gender Y A 1 Possible values: F : female M : male
payer_mobile Y AN 20 E.164
payer_address Y AN 50
payer_city Y AN 50
payer_state N AN 50
payer_postal Y AN 50
payer_country Y A 3 ISO 3166-1 alpha-3
payer_id_type N N 20 See APPENDIX E: User ID Types
payer_id_number N AN 20
payer_id_expire N AN ISO 8601
payer_id_issued_country N A ISO 3166-1 alpha-3
payer_bank_name N AN 100
payer_full_name_on_bank_account N AN 255
payer_bank_address N AN 100
payer_bank_city N AN 100
payer_bank_iban N AN 40
payer_bank_swift N AN 11
payer_bank_country N A 3 ISO 3166-1 alpha-3
payer_correspondent_bank_name N AN 50
payer_correspondent_bank_swift N AN 50
payer_correspondent_bank_city N AN 100
payer_correspondent_bank_currency_code N AN 3
poa_filename N AN 255
poa_filebody N AN base64 encoded file content
poi_filename N AN 255
UPayCard Merchant API Documentation v1.0.25 82
poi_filebody N AN base64 encoded file content
i_filename N AN 255
i_filebody N AN base64 encoded file content
ipn_url N AN 255 URL where IPN will be sent (Note: that if this parameter is empty URL for IPN will be taken from profile settings). See more
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
ReceiveMoneyRequest JSON Request Sample {
"service":"1",
"receiving_account":"1783142",
"amount":"1.23",
"currency":"USD",
"custom_order_id ":"Order1234",
"item_name":"name",
"item_description":"description",
"note":"note",
"message_to_payer":"messager",
"payer_title":"mr",
"payer_first_name":"John",
"payer_middle_name":"Ben",
"payer_last_name":"Dobe",
"payer_email":"JohnDobe@gmail.com",
"payer_dob":"1990-05-31",
"payer_gender":"m",
"payer_mobile":"+12341234532",
"payer_address":"payer_address",
"payer_city":"Chicago",
"payer_state":"Illinois",
"payer_postal":"12345",
"payer_country":"USA",
"payer_id_type":"4",
"payer_id_number":"20164343432",
"payer_id_expire":"2016-12-12",
"payer_id_issued_country":"USA",
"payer_bank_name":"bank_name",
"payer_full_name_on_bank_account":"John Doe",
"payer_bank_address":"payer_bank_address",
"payer_bank_city":"Chicago",
"payer_bank_iban":"2342342",
UPayCard Merchant API Documentation v1.0.25 83
"payer_bank_swift":"2342342",
"payer_bank_country":"USA",
"payer_correspondent_bank_name":"International bank of Chicago",
"payer_correspondent_bank_swift":"2342342",
"payer_correspondent_bank_city":" Chicago ",
"payer_correspondent_bank_currency_code":"USD",
"poa_filename":"null",
"poa_filebody":"null",
"poi_filename":"null",
"poi_filebody":"null",
"i_filename":"null",
"i_filebody":"null",
"ipn_url ":" http://www.mysite.com/ipn_catcher" ",
"key":"36d8416f2938fb64",
"ts":1478704902,
"sign":"26aac768e19294b33c256f8c8e26b947"
}
ReceiveMoneyRequest JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255
summary Y
account_name Y AN 50 Account name
bank Y AN 100 Bank name
branch Y AN 100 Bank address
sort_code Y AN 100 Sort code
account_number Y AN 50 Account number
iban Y AN 100 Iban
bic Y AN 100 Bic
swift Y AN 100 Swift
beneficiary_address Y AN 100 Account address
currency_id Y N 11
currency_code Y A 3 ISO 4217
reference_number Y AN 20 Reference number by which money load will be recognized
url Y AN 255 URL where payment request can be confirmed (if in request was not auto confirm) or payment request status can be checked
payment_request_status Y N 1 Possible values: 1 – created; 2 – confirmed; 3 – paid; 4 – canceled; 5 - failed
UPayCard Merchant API Documentation v1.0.25 84
ReceiveMoneyRequest JSON Response Sample {
"status":"success",
"msg":"Operation completed",
"summary":[
{
"account_name":"test account name", "bank":"Test bank",
"branch":"Test address",
"sort_code":"55-44-33",
"account_number":"1234567890",
"iban":"GB12345",
"bic":"TestGB",
"swift":"TestGB",
"beneficiary_address":"accounts address",
"currency_id":"43",
"currency_code":"EUR",
"reference_number":"81815-81815-81815",
"url":"https://user.upaycard.com/en/pub/wiretransferconfirm/reference/81-
81-81",
"payment_request_status":"1"
}
]
}
Whenever receive money request is completed or canceled IPN is sent to the merchant provided
URL. Merchant can setup different URL for successfully completed or failed transfer if needed. Of
course same URL can be used for both cases. URL setup page can be found under profile tab “API”.
Note that POST will be sent to the provided URLs. Example of data sent: APPENDIX K: Receive money /
bank transfer IPN CATCHER PHP Code Example.
UPayCard Merchant API Documentation v1.0.25 85
5.48. GetUserBankAccounts
Get all user external bank accounts URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_bank_accounts
GetUserBankAccounts Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserBankAccounts JSON Request Sample {
"username":"timer",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"}
GetUserBankAccounts JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
accounts Y LIST
id Y LIST
id Y N 20
account_number Y A 30
status Y A 1 A: Activated, N: Not Activated
bank Y A 255
country Y A 5
swift Y A 11
GetUserBankAccounts JSON Response Sample {
"status":"success",
"msg":"Success",
"accounts":{
"9592":{
"id":"9592",
"account_number":"123456",
"status":"A",
"bank":"Bankas Vienas",
"country":"LT",
"swift":"654321"
}
UPayCard Merchant API Documentation v1.0.25 86
}
}
UPayCard Merchant API Documentation v1.0.25 87
5.49. GetUserExternalCards Get all user external cards
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_user_external_cards
GetUserExternalCards Request
KEY M TYPE LENGHT DESCIPTION
username Y AN 100
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetUserExternalCards JSON Request Sample {
"username":"timer4",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetUserExternalCards JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
cards Y LIST
id Y LIST
id Y N 20
number Y A 19 Partial card number
status Y A 1 A: Activated N: Not Activated B: Blocked
GetUserExternalCards JSON Response Sample {
"status":"success",
"msg":"Success",
"cards":{
"33209":{
"id":"33209",
"number":"**** **** **** 1199",
"status":"A",
}
}
}
UPayCard Merchant API Documentation v1.0.25 88
5.50. GetTransactionLimits Get limits for account transactions
URL https://api.upaycard.com/api/merchant/v/1.0/function/get_transaction_limits
GetTransactionLimits Request
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
GetTransactionLimits JSON Request Sample {
"account_id":"1824406",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
GetTransactionLimits JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
limits Y LIST
type_key Y LIST
resource_calc Y LIST
Y LIST
description Y A 255
value Y AN 255
currency Y A 3 ISO 4217
period Y AN 255
UPayCard Merchant API Documentation v1.0.25 89
GetTransactionLimits JSON Response Sample {
"status":"success",
"msg":"Success",
"limits":{
"AB2C":{
"MAX_VALUE":[
{
"description":"MAX amount",
"value":"1555",
"currency":"EUR"
}
],
"TX_AMOUNT_SUM":[
{
"description":"Transactions amounts sum per 1 hours",
"value":"200",
"currency":"EUR",
"period":"1 hour"
}
]
},
"CC2AB":{
"TX_COUNT":[
{
"description":"Failed transactions count per card per 24 hours",
"value":"5",
"period":"24 hour"
}
]
}
}
UPayCard Merchant API Documentation v1.0.25 90
5.51. VerifyExternalCard Verify previously linked external card
URL https://api.upaycard.com/api/merchant/v/1.0/function/verify_external_card
VerifyExternalCardRequest
KEY M TYPE LENGHT DESCIPTION
credit_card_id Y N 20
verification_amount Y N 10,2
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
VerifyExternalCardRequest JSON Request Sample {
"credit_card_id":"33220",
"verification_amount":"0.66",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
VerifyExternalCardRequest JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
credit_card_id Y N 20
VerifyExternalCardRequest JSON Response Sample {
"status":"success",
"msg":"External card has been verified",
"credit_card_id":"33220",
}
UPayCard Merchant API Documentation v1.0.25 91
5.52. AddBankAccount Add external bank account
URL https://api.upaycard.com/api/merchant/v/1.0/function/add_bank_account
AddBankAccount
KEY M TYPE LENGHT DESCIPTION
full_name_on_bank_account Y AN 255
bank_name Y AN 100
bank_address Y AN 100
bank_iban Y AN 40
bank_swift Y AN 11
bank_city Y AN 100
bank_country_code Y A 2
bank_contact_phone N AN 100
branch_code N AN 100
bank_state N AN 100
corresponding_bank_swift N AN 11
corresponding_bank_name N AN 100
corresponding_bank_city N AN 100
corresponding_bank_currency_code N A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
AddBankAccount JSON Request Sample {
"full_name_on_bank_account":"Vardas Pavard\u0117",
"bank_name":"SEB",
"bank_address":"Gedimino g. 1",
"bank_iban":"123456",
"bank_swift":"654321",
"bank_city":"Vilnius",
"bank_country_code":"LT",
"bank_contact_phone":"+37012312345",
"branch_code":"73195",
"bank_state":"Vilniaus m.",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 92
AddBankAccount JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
bank_accounts_id Y N 20
AddBankAccount JSON Response Sample {
"status":"success",
"msg":"Bank account added",
"bank_accounts_id":"9625",
}
UPayCard Merchant API Documentation v1.0.25 93
5.53. LoadFromBank Load money from external saved bank
URL https://api.upaycard.com/api/merchant/v/1.0/function/load_from_bank
LoadFromBank
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
bank_account_id Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
ipn_url N AN 255 URL where IPN will be sent (Note: that if this parameter is empty URL for IPN will be taken from profile settings). See more
key Y AN 16 Merchant API Key – provided by UPayCard ts Y N 10 Request timestamp
sign Y AN 32 See 111
LoadFromBank JSON Request Sample {
"account_id":"1824406",
"bank_account_id":"9625",
"amount":"105.11",
"currency":"EUR",
" ipn_url":" http://www.mysite.com/ipn_catcher",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 94
LoadFromBank JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
amount Y N 10,2
fee_amount Y N 10,2
total_amount Y N 10,2
currency Y A 3 ISO 4217
reference_number Y AN 100
account_name Y AN 255
bank Y AN 100
branch Y AN 100
account_number Y N 11
iban Y AN 40
swift Y AN 11
LoadFromBank JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"amount":"105.11",
"fee_amount":"0.00",
"total_amount":"105.11",
"currency":"EUR",
"reference_number":"UPC107817236",
"account_name":"UPAYCARD LTD 20 Mortlake High Street STE 308\/309SW14 8JN London
United Kingdom",
"bank":"Kbh Andelskasse",
"branch":"Tingskiftevej 5, 2900 Hellerup Copenhagen Denmark",
"account_number":"78726600337",
"iban":"DK3878720006600337",
"swift":"KOANDKK1"
}
UPayCard Merchant API Documentation v1.0.25 95
LoadFromBank IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 20
reference_number Y AN 100
amount Y N 10,2
currency Y A 3 ISO 4217
settled_amount Y N 10,2
settled_currency Y A 3 ISO 4217
transaction_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
LoadFromBank IPN Call Sample {
"type":"b2a",
"account_id":"1824406",
"amount":"105.11",
"currency":"EUR",
"reference_number":"UPC107817236",
"settled_amount":"106.00",
"settled_currency":"EUR",
"status":"success",
"transaction_id":"1166070",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 96
5.54. LoadFromCrypto Load money from crypto
URL https://api.upaycard.com/api/merchant/v/1.0/function/load_from_crypto
LoadFromCrypto
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
amount Y N 10,2 / 20,8 / 20,9
For currencies like “USD” or “EUR” use 10,2, for crypto currencies see APPENDIX M: Supported crypto currencies
currency Y A 3 ISO 4217, for crypto currencies see APPENDIX M: Supported crypto currencies
crypto_currency Y A 3 See APPENDIX M: Supported crypto currencies
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
order_id Y AN 50 Unique identification of request
LoadFromCrypto JSON Request Sample {
"account_id":"1824406",
"amount":"100.01",
"currency":"EUR",
"crypto_currency":"BTC",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_",
"order_id":"_ORDER_ID_"
}
LoadFromCrypto JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
funds_loads_id Y N 20
crypto_currency Y A 3 See APPENDIX M: Supported crypto currencies
crypto_amount Y N 20,8 / 20,9
See APPENDIX M: Supported crypto currencies
crypto_address Y AN 35
destinationTag N N 10 Destnaton tag. Returned only for Ripple (XRP) crypto currency.
UPayCard Merchant API Documentation v1.0.25 97
LoadFromCrypto JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"funds_loads_id":"68044",
"crypto_amount":"0.09791538",
"bitcoin_address":"1KmJT4rHiCogXyzqCTEMsXLSBDG46ypTN8",
}
LoadFromCrypto IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 20
order_id Y AN 13
settled_amount Y N 10,2 / 20,8 / 20,9
For currencies like “USD” or “EUR” use 10,2, for crypto currencies see APPENDIX M: Supported crypto currencies
currency Y A 3 ISO 4217, for crypto currencies see APPENDIX M: Supported crypto currencies
transaction_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
LoadFromBitcoin IPN Call Sample {
"type":"api_btc2a",
"account_id":"1824406",
"currency":"EUR",
"order_id":"5902019b5f9f8",
"settled_amount":"100.01",
"status":"success",
"transaction_id":"1166071",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 98
5.55. LoadFromBitcoin Load money from bitcoin
URL https://api.upaycard.com/api/merchant/v/1.0/function/load_from_bitcoin
LoadFromBitcoin
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
order_id Y AN 50 Unique identification of request
LoadFromBitcoin JSON Request Sample {
"account_id":"1824406",
"amount":"100.01",
"currency":"EUR",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_",
"order_id":"_ORDER_ID_"
}
LoadFromBitcoin JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
funds_loads_id Y N 20
bitcoin_amount Y N 10,8
bitcoin_address Y AN 35
LoadFromBitcoin JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"funds_loads_id":"68044",
"bitcoin_amount":"0.09791538",
UPayCard Merchant API Documentation v1.0.25 99
"bitcoin_address":"1KmJT4rHiCogXyzqCTEMsXLSBDG46ypTN8",
}
UPayCard Merchant API Documentation v1.0.25 100
LoadFromBitcoin IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 20
order_id Y AN 13
settled_amount Y N 10,2
currency Y A 3 ISO 4217
transaction_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
LoadFromBitcoin IPN Call Sample {
"type":"api_btc2a",
"account_id":"1824406",
"currency":"EUR",
"order_id":"5902019b5f9f8",
"settled_amount":"100.01",
"status":"success",
"transaction_id":"1166071",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
Note that LoadFromBitcoin is a legacy method, for new integrations please refer to
method instead.
UPayCard Merchant API Documentation v1.0.25 101
5.56. LoadFromEthereum
Load money from ethereum
URL https://api.upaycard.com/api/merchant/v/1.0/function/load_from_ethereum
LoadFromEthereum
KEY M TYPE LENGHT DESCIPTION
account_id Y N 11
amount Y N 10,2
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
order_id Y AN 50 Unique identification of request
LoadFromEthereum JSON Request Sample {
"account_id":"1824406",
"amount":"100.01",
"currency":"EUR",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_",
"order_id":"_ORDER_ID_"
}
Note that LoadFromBitcoin is a legacy method, for new integrations please refer to
method instead.
LoadFromEthereum JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
funds_loads_id Y N 11
ethereum_amount Y N 10,8
crypto_currency_address Y AN 35
UPayCard Merchant API Documentation v1.0.25 102
LoadFromEthereum JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"funds_loads_id":"68044",
"ethereum_amount":"0.09791538",
"crypto_currency_address":"1KmJT4rHiCogXyzqCTEMsXLSBDG46ypTN8",
}
LoadFromEthereum IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 11
order_id Y AN 13
settled_amount Y N 10,2
currency Y A 3 ISO 4217
transaction_id Y N 11
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN See 111
LoadFromEthereum IPN Call Sample {
"type":"api_eth2a",
"account_id":"1824406",
"currency":"EUR",
"order_id":"5902019b5f9f8",
"settled_amount":"100.01",
"status":"success",
"transaction_id":"1166071",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 103
5.57. InitializeWithdrawToBank Prepare withdraw money to an external saved bank
URL https://api.upaycard.com/api/merchant/v/1.0/function/initialize_withdraw_to_bank
InitializeWithdrawToBank
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
bank_account_id Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
withdrawal_method_id N N 20 S - Standard (1-5 days wire transfer), E - Express (0-2 days)
withdrawal_purpose Y A 3 See APPENDIX N: WITHDRAWAL PURPOSES
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
InitializeWithdrawToBank JSON Request Sample {
"account_id":"1824406",
"bank_account_id":"9625",
"amount":"19.5",
"currency":"EUR",
"withdrawal_method_id":"",
"withdrawal_purpose":"MWP",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 104
InitializeWithdrawToBank JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
amount Y N 10,2
fee_amount Y N 10,2
total_amount Y N 10,2
currency Y A 3 ISO 4217
reference_number Y AN 100
hash Y AN
token_number Y AN 10
InitializeWithdrawToBank JSON Response Sample {
"status":"success",
"msg":"Transaction initialized",
"amount":"19.50",
"fee_amount":"0.00",
"total_amount":"19.50",
"currency ":"EUR",
"reference_number":"UPC203104934",
"hash":"ab52ac887bea1be397da742932b4611d",
"token_number":"19-EQ",
}
UPayCard Merchant API Documentation v1.0.25 105
5.58. FinishWithdrawToBank Finish prepared withdraw money to external saved bank. Request user to enter his Key Code for
given token_number
URL https://api.upaycard.com/api/merchant/v/1.0/function/finish_withdraw_to_bank
FinishWithdrawToBank
KEY M TYPE LENGHT DESCIPTION
hash Y AN
reference_number Y AN 100
token_number Y AN 10
token_code Y N 6
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
FinishWithdrawToBank JSON Request Sample {
"hash":"ab52ac887bea1be397da742932b4611d",
"reference_number":"UPC203104934",
"token_number":"19-EQ",
"token_code":"123456",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
FinishWithdrawToBank JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
transaction_id Y N 20
FinishWithdrawToBank JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"transaction_id":"1166075",
}
UPayCard Merchant API Documentation v1.0.25 106
FinishWithdrawToBank IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 20
reference_number Y AN 100
amount Y N 10,2
currency Y A 3 ISO 4217
settled_amount Y N 10,2
settled_currency Y A 3 ISO 4217
transaction_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
FinishWithdrawToBank IPN Call Sample {
"type":"a2b",
"account_id":"1824406",
"amount":"19.50",
"currency":"EUR",
"reference_number":"UPC203104934",
"settled_amount":"19.50",
"settled_currency":"EUR",
"status":"success",
"transaction_id":"1166075",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 107
5.59. InitializeLoadFromCard Prepare load money from external saved cards
URL https://api.upaycard.com/api/merchant/v/1.0/function/initialize_load_from_card
InitializeLoadFromCard
KEY M TYPE LENGHT DESCIPTION
account_id Y N 20
credit_card_id Y N 20
amount Y N 10,2
currency Y A 3 ISO 4217
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
InitializeLoadFromCard JSON Request Sample {
"account_id":"1824416",
"credit_card_id":"33209",
"amount":"77.01",
"currency":"EUR",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 108
InitializeLoadFromCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
amount Y N 10,2
fee_amount Y N 10,2
total_amount Y N 10,2
currency Y A 3 ISO 4217
hash Y AN
token_number Y AN 10
InitializeLoadFromCard JSON Response Sample {
"status":"success",
"msg":"Transaction initialized",
"amount":"77.01",
"fee_amount":"2.23",
"total_amount":"79.24",
"currency ":"EUR",
"hash":"dcbcfbf7b355f3f48b5497dd1516a447",
"token_number":"92-AR",
}
UPayCard Merchant API Documentation v1.0.25 109
5.60. FinishLoadFromCard Finish prepared load money from external saved card. Request user to enter his Key Code for
given token_number
URL https://api.upaycard.com/api/merchant/v/1.0/function/finish_load_from_card
FinishLoadFromCard
KEY M TYPE LENGHT DESCIPTION
hash Y AN
cvv Y AN 100 cvv number, must be encrypted by 3DES algorithm with 3DES
token_number Y AN 10
token_code Y N 6
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
FinishLoadFromCard JSON Request Sample {
"hash":"dcbcfbf7b355f3f48b5497dd1516a447",
"cvv":"XXVfy2ZhiN4=",
"token_number":"92-AR",
"token_code":"123456",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
FinishLoadFromCard JSON Response
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or error
msg Y AN 255 See APPENDIX C: Transaction Codes
description N AN
transaction_id Y N 20
FinishLoadFromCard JSON Response Sample {
"status":"success",
"msg":"Transaction in progress",
"transaction_id":"1166095",
}
UPayCard Merchant API Documentation v1.0.25 110
FinishLoadFromCard IPN Call
KEY M TYPE LENGHT DESCIPTION
status Y AN 10 success or fail
type Y AN 4
account_id Y N 20
order_id Y AN 13
settled_amount Y N 10,2
currency Y A 3 ISO 4217
transaction_id Y N 20
key Y AN 16 Merchant API Key – provided by UPayCard
ts Y N 10 Request timestamp
sign Y AN 32 See 111
FinishLoadFromCard IPN Call Sample {
"type":"cc2a",
"account_id":"1824416",
"currency":"EUR",
"order_id":"5904623acb440",
"settled_amount":"77.01",
"status":"success",
"transaction_id":"1166095",
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
UPayCard Merchant API Documentation v1.0.25 111
6. APPENDIX A: SIGN GENERATION Sign of request, it is MD5 hash of keys, values and secret.
Example of Sign generation:
MD5("key1:value1: key2: value2:…:key:_MERCHANT_KEY_:ts:_TIMESTAMP_:_SECRET_")
Example in PHP:
function _sign($params)
{
$strToSign = '';
$params['key'] = '_MERCHANT_KEY_';
$params['ts'] = time();
ksort($params);
foreach ($params as $k => $v)
if($v !== NULL)
$strToSign .= "$k:$v:";
$strToSign .= '_MERCHANT_SECRET_';
$params['sign'] = md5($strToSign);
return $params;
}
UPayCard Merchant API Documentation v1.0.25 112
7. APPENDIX B: ENCRYPT/DECRYPT INFORMATION Some information in response (like credit card number) will be encrypted so must use decryption
function to get real information. For decrypt must have MERCHANT_3DES_KEY.
Decryption function in PHP:
function decrypt3DES($encrypted) {
$len = strlen(_MERCHANT_3DES_KEY_);
$key = $len < 24 ? _MERCHANT_3DES_KEY_ . substr(_MERCHANT_3DES_KEY_, 0,
24 - $len) : _MERCHANT_3DES_KEY_;
$encrypted = base64_decode( $encrypted ) ;
$out = mcrypt_decrypt(MCRYPT_3DES, $key, $encrypted, MCRYPT_MODE_CBC,
substr(_MERCHANT_3DES_KEY_, 0, 8));
$block = mcrypt_get_block_size('tripledes', 'cbc');
$packing = ord($out{strlen($out) - 1});
if ($packing && ($packing < $block)) {
for ($P = strlen($out) - 1; $P >= strlen($out) - $packing; $P--) {
if (ord($out{$P}) != $packing) {
$packing = 0;
}
}
}
$out = substr($out,0,strlen($out) - $packing);
return $out;
}
function encrypt3DES($data) {
$len = strlen(_MERCHANT_3DES_KEY_);
$key = $len < 24 ? _MERCHANT_3DES_KEY_ . substr(_MERCHANT_3DES_KEY_, 0,
24 - $len) : _MERCHANT_3DES_KEY_;
$l = 8 - strlen($data) % 8;
if ($l > 0)
$data .= str_repeat(chr($l), $l);
UPayCard Merchant API Documentation v1.0.25 113
$out = mcrypt_encrypt(MCRYPT_3DES, $key, $data, MCRYPT_MODE_CBC,
substr(_MERCHANT_3DES_KEY_, 0, 8));
return base64_encode($out);
}
UPayCard Merchant API Documentation v1.0.25 114
8. APPENDIX C: TRANSACTION CODES
Code Description
000 Transaction successfully completed 100 Load limit exceeded (value of transactions) 101 Load limit exceeded (number of transactions) 102 Transfer limit exceeded (maximum transaction amount allowed) 103 Transfer limit exceeded (value of transactions) 104 Transfer limit exceeded (number of transactions) 105 Withdrawal limit exceeded (value of transactions) 106 Withdrawal limit exceeded (number of transactions) 107 Withdrawal limit exceeded (maximum transaction amount allowed) 108 Card throughput limit exceeded (must provide KYC documents) 110 Transfer restricted 111 Load restricted 112 Recipient cannot accept transfers 113 Account balance exceeded 114 Operation is not allowed 200 Insufficient funds 300 Card is inactive 400 Could not find currency rate. 500 Invalid signature 501 Error creating session 502 Operation is not allowed 503 Missing field 504 Field format error 505 Invalid receiver account 506 User not found 507 Invalid currency code 508 Invalid sender account 509 Define sender account 510 Duplicate order_id 511 Initialized transaction not found 512 Wrong Key Code provided 513 Transfer request already confirmed 514 Transaction not found 515 Transaction cannot be refunded 516 Cannot refund this amount 517 Your transaction request was sent to our Bank for processing 520 Invalid username provided 521 Invalid account provided 522 Invalid data provided 523 Invalid external card id provided 524 Wrong verification amount 525 Verification attempts limit reached 526 Verification failed 527 Invalid card status 528 S3D cards not supported 529 Configuration error 810 Destination tag is required 999 Unknown error
UPayCard Merchant API Documentation v1.0.25 115
9. APPENDIX D: USER KYC DOCUMENT TYPES
Type ID Description Mandatory to provide company name
4 Passport N 5 Drivers License Front N 6 State/Province ID Front N 7 Utility Bill Y 8 Bank Statement N 9 Credit/Debit Card Front N 10 ACH Voided Check N 11 Check21 N 12 Marriage Certificate N 13 Power of Attorney N 14 Subpoena N 15 Marriage Dissolution N 16 Notarized Statement N 17 Document of Legal Name Change N 18 Police Report N 19 Disputes N 20 Wire Transfers N 21 Limit Increase N 22 Email Change N 23 ACH Demand Draft N 24 Application Form N 26 Contract N 28 Incorporation of Company N 30 Memorandum and Articles Y 32 Shareholder Documentation N 34 Proof of Company Address N 36 Other N 38 Company registration documents N 40 UPayCard Statement N 42 Credit/Debit Card Back N 44 Business Proposal N 46 Business Agreement N 48 Agent Agreement N 50 Driver’s License Back (If applicable) N 52 Passport-Additional Pages (If applicable) N 54 State/Province ID Back (If applicable) N 56 Government-issued ID N 58 Personal Identification Card N 60 Residence Permit N 62 Screenshot N
UPayCard Merchant API Documentation v1.0.25 116
10. APPENDIX E: USER ID TYPES
Type ID Description
1 Passport Registry No. 2 Personal Identification No. 3 Identity Card No. 4 Utility Bill 8 Travel Document 12 Residence Permit 13 Identity Certificate No. 16 Registro Federal de Contribuyentes 17 Credencial de Elector 19 Social Security Number (US ONLY) 20 Tax File Number (Australia Only)
11. APPENDIX F: PHP CODE EXAMPLE
function _request($servicename, $params)
{
ini_set('max_execution_time', 300);
$uri = '_SERVICE_URL_'. '/v/' . '_VERSION_' .'/function/'.
'_API_FUNCTION_NAME_' ;
$str = json_encode($params);
$ch = curl_init( $uri );
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT,300);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Content-Length: ' . strlen($str)]
);
$response = curl_exec($ch);
curl_close($ch);
UPayCard Merchant API Documentation v1.0.25 117
return $response;
}
UPayCard Merchant API Documentation v1.0.25 118
12. APPENDIX G: INVALID REQUESTS ERROR CODES
Type ID Description
1001 API version parameter 'v' is not provided 1002 Wrong API version provided 1003 Function name parameter 'function' is not provided 1004 Wrong method name provided 1005 No data received 1006 Required field is not provided or is empty 1007 System error
13. APPENDIX H: PURCHASE STATUSES
Type ID Description
1 Created 2 Logged in 4 Processing 7 Canceled 8 Failed 9 Successful
UPayCard Merchant API Documentation v1.0.25 119
14. APPENDIX I: PURCHASE IPN CATCHER PHP CODE
EXAMPLE
if (!empty($_POST)) {
$status_id = $_POST['status_id']; // 7
$reference_id = $_POST['reference_id']; // 'ap-57fcb50701182'
$order_id = $_POST['order_id']; // 'my_order_81815'
$data_amount = $_POST['data_amount']; // 1.01
$currency = $_POST['currency']; // 'USD'
$transaction_id = $_POST['transaction_id']; // transaction ID
$key = $_POST['key']; // merchant key
$time = $_POST['ts']; // UNIX timestamp
// note that transaction ID will be not empty only if status is 8 or 9
if (!empty($_POST['sign'])) {
$sign = $_POST['sign'];
$arrToHash = [];
ksort($_POST);
foreach ($_POST as $field => $value) {
if ($field == 'sign' || $value === null) { continue; }
$arrToHash[] = $field . ':' . $value;
}
$hash = md5(implode(':', $arrToHash) . ':' . '_MERCHANT_SECRET_');
if ($hash == $sign) {
// sign correct - any needed actions further
}
else {
// wrong sign - any needed actions further
}
}
else {
// no sign - any needed actions further
}
}
UPayCard Merchant API Documentation v1.0.25 120
15. APPENDIX J: KYC NOTIFICATION CATCHER PHP CODE
EXAMPLE
if (!empty($_POST)) {
$kyc_id = $_POST['id']; // 81815
$msg = $_POST['msg']; // 'Status changed from
[Requested] to [Rejected]'
$old_status = $_POST['old_status']; // 'Requested'
$new_status = $_POST['new_status']; // 'Rejected'
$old_status_id = $_POST['old_status_id']; // '6'
$new_status_id = $_POST['new_status_id']; // '3'
$key = $_POST['key']; // merchant key
$time = $_POST['ts']; // UNIX timestamp
if (!empty($_POST['sign'])) {
$sign = $_POST['sign'];
$arrToHash = [];
ksort($_POST);
foreach ($_POST as $field => $value) {
if ($field == 'sign' || $value === null) {
continue;
}
$arrToHash[] = $field . ':' . $value;
}
$hash = md5(implode(':', $arrToHash) . ':' . '_MERCHANT_SECRET_');
if ($hash == $sign) {
// sign correct - any needed actions further
}
else {
// wrong sign - any needed actions further
}
}
else {
// no sign - any needed actions further
}
}
UPayCard Merchant API Documentation v1.0.25 121
16. APPENDIX K: RECEIVE MONEY / BANK TRANSFER IPN
CATCHER PHP CODE EXAMPLE
if (!empty($_POST)) {
$status_id = $_POST['status_id']; // 3
$ref_number = $_POST['reference_number']; // reference number
$order_id = $_POST['custom_order_id'] ?? null;// custom order id
$amount = $_POST['amount']; // amount requested
in payment request
$currency = $_POST['currency']; // requested currency
code, e.g. EUR
$transaction_id = $_POST['transaction_id']; // transaction ID
$transferred_amount = $_POST['transferred_amount']; // amount which was
transfered
$transferred_currency = $_POST['transferred_currency']; // currency in which
transfer was done
$key = $_POST['key']; // merchant key
$time = $_POST['ts']; // UNIX timestamp
if (!empty($_POST['sign'])) {
$sign = $_POST['sign'];
$arrToHash = [];
ksort($_POST);
foreach ($_POST as $field => $value) {
if ($field == 'sign' || $value === null) { continue; }
$arrToHash[] = $field . ':' . $value;
}
$hash = md5(implode(':', $arrToHash) . ':' . '_MERCHANT_SECRET_');
if ($hash == $sign) {
// sign correct - any needed actions further
}
else {
// wrong sign - any needed actions further
}
}
else {
// no sign - any needed actions further
}
}
UPayCard Merchant API Documentation v1.0.25 122
17. APPENDIX L: LOAD FROM BANK / LOAD FROM CRYPTO
IPN CATCHER PHP CODE EXAMPLE
if (!empty($_POST)) {
$type = $_POST['type']; // 'api_b2a'
$status = $_POST['status']; // 'success' or 'fail'
$reference_number = $_POST['reference_number']; // reference number
$account_id = $_POST['account_id']; // account ID
$amount = $_POST['amount']; // amount
$currency = $_POST['currency']; // currency
$settled_amount = $_POST['settled_amount']; // settled amount
$settled_currency = $_POST['settled_currency']; // settled currency
$transaction_id = $_POST['transaction_id']; // transaction ID
if (!empty($_POST['sign'])) {
$sign = $_POST['sign'];
$arrToHash = [];
ksort($_POST);
foreach ($_POST as $field => $value) {
if ($field == 'sign' || $value === null) {
continue;
}
$arrToHash[] = $field . ':' . $value;
}
$hash = md5(implode(':', $arrToHash) . ':' . '_MERCHANT_SECRET_');
if ($hash == $sign) {
// sign correct - any needed actions further
}
else {
// wrong sign - any needed actions further
}
}
else {
// no sign - any needed actions further
}
}
UPayCard Merchant API Documentation v1.0.25 123
18. APPENDIX M: SUPPORTED CRYPTO CURRENCIES
Name Key Lenght
Bitcoin BTC 20,8 Ethereum ETH 20,9 Litecoin LTC 20,8 Ripple XRP 20,6 Bitcoin Cash BCH 20,8
19. APPENDIX N: WITHDRAWAL PURPOSES
C Description
MWI MOBILE WALLET CASH IN MWO MOBILE WALLET CASH OUT MWP MOBILE WALLET PAYMENTS SVI STORED VALUE CARD CASH-IN SVO STORED VALUE CARD CASH-OUT SVP STORED VALUE CARD PAYMENTS FSA Equity other than investment fund shares in the related companies abroad ACM Agency Commission AFA Receipts or payments from personal residents bank account or deposits abroad ALW Allowances ATS Air transport CCP Corporate Card Payment CEA Equity for the establishment of new company from residents abroad equity of
merger or acquisition of companies abroad from residents and participation to capital increase of related company abroad
CEL Equity for the establishment of new company in the UAE from residents equity of merger or acquisition of companies in the UAE from n-residents participation to capital increase of related companies
CHC Charitable Contributions COM Commission COP Compensation CRP Credit Card Payments DCP Pre-Paid Reloadable and Personalized Debit Card Payments DIV Dividend Payouts DOE Dividends on equity not intra group EDU Educational Support EMI Equated Monthly Instalments EOS End of Service FAM Family Support FIS Financial services FSL Equity other than investment fund shares in related companies in the UAE GDS Goods Bought or Sold GMS Processing repair and maintenance services on goods GOS Government goods and services embassies etc GRI Government related income taxes tariffs capital transfers etc IFS Information services IGD Intra group dividends IGT INTER GROUP TRANSFER
UPayCard Merchant API Documentation v1.0.25 124
INS Insurance services IPC Charges for the use of intellectual property royalties ITS Computer services LAS Leave Salary MCR Monetary Claim Reimbursements Medical Insurance or Auto Insurance etc. OAT OWN ACCOUNT TRANSFER OTS Other modes of transport OVT Overtime PEN Pension PMS Professional and management consulting services POS POS Merchant Settlement PRS Personal cultural audio visual and recreational services RDS Research and development services RNT Rent Payments SAL Salary SCO Construction STR Travel STS Sea transport SAA Salary Advance TCS Telecommunication services TKT Tickets TOF Transfer of funds between persons Normal and Juridical UTL Utility Bill Payments
top related