Authorize Card

{{URL}}/api/cps/v1/authorizeTransaction

CARD TRANSACTIONS

PREREQUISITE

The ACCOUNT payment method allows users to make payments by initiating a bank transfer. The following steps outline the process:

To ensure secure communication between your system and Rexpay, all request payloads for card must be encrypted using our PGP public key.

In addition, all response payloads are encrypted. To achieve this, we require that you create your own PGP key pair and share your public key with us via the INSERT CLIENT PUBLIC KEY endpoint.

Upon receipt of the encrypted response, you can use the private key equivalent of your PGP key pair to decrypt the information, ensuring that it is readable only by authorized parties.

You can generate your pgp key pair via online sites such as https://pgptool.org.

Save your private keys and send your public key to the Insert Public Key Endpoint.

Authentication live mode

TEST CARDS

TypeCard numberExpiryPINCVV
MasterCard PIN55312366509429501230581812312345
MasterCard PIN59762222222999991230417845612345
MasterCard PIN507133333322222312303628 78912345
Verve50639905802192174111230123464312345
Verve50609905802192174991230567840412345
Verve50609905802102174991230901221912345
Card Insufficient Funds52585859226665060233567288312345
Incorrect PIN53998346978947230131517288312345
Verve Card - Card enrolment55318828848045170932509256412345

AUTHORIZATION

UsernamePassword
Username{{USERNAME}}
Password{{SECRETKEY}}

HEADERS

Content-Typeapplication/json

BODY PARAMS

{
    "encryptedRequest": "-----BEGIN PGP MESSAGE-----
Version: Didisoft OpenPGP Library for Java 3.2

hIwDT9UVaCho7XYBBACJeW06QdtjPUI0mUgQRfOacgy9uM0qXMseEerzl7TSv4Ic
uaDoWoOC7uy18EHoWB8uRQD478i+7fYxAWePNrcPn0OkQ3hD1GoxmLbNsOZwUg1R
bNbiliuP8jLlRO8ay+Qj/JBJ8zFPusbl2rU/F0w6MuBwcg8mm2uCodHAVY+ZjtKz
AYnNM40lsH99IOIKXOEDlqUZDNiUrpnwl7Xj1FescDGIfPnTrEpbH/Ei5MeVlMLM
6ary3eTmtT4SgPa0g4cj3d4Y0a9n+98aZi/skWsisYIbaLxyi9eMnHKhGW+6KRHh
kICZ2Pw55s1SKbWJDg6BLByg9ctgPjgpXQZ273uakQjnvkCOn70JquvZLuYEIWwh
QFIbVKbRCIq1+tZtmePYp3KiYu7yR6pwwAdKNVM1vQNMTbk=
=k1w9
-----END PGP MESSAGE-----
"
}

Request Parameters

NameTypeDescriptionOptional Mandatory
encryptedRequestStringUnique client identification numbertrue
VersionNumberVersion fortrue

Example Request

var myHeaders = new Headers();

var raw = "{
    "encryptedRequest": "-----BEGIN PGP MESSAGE-----\nVersion: Didisoft OpenPGP Library for Java 3.2\n\nhIwDT9UVaCho7XYBBACJeW06QdtjPUI0mUgQRfOacgy9uM0qXMseEerzl7TSv4Ic\nuaDoWoOC7uy18EHoWB8uRQD478i+7fYxAWePNrcPn0OkQ3hD1GoxmLbNsOZwUg1R\nbNbiliuP8jLlRO8ay+Qj/JBJ8zFPusbl2rU/F0w6MuBwcg8mm2uCodHAVY+ZjtKz\nAYnNM40lsH99IOIKXOEDlqUZDNiUrpnwl7Xj1FescDGIfPnTrEpbH/Ei5MeVlMLM\n6ary3eTmtT4SgPa0g4cj3d4Y0a9n+98aZi/skWsisYIbaLxyi9eMnHKhGW+6KRHh\nkICZ2Pw55s1SKbWJDg6BLByg9ctgPjgpXQZ273uakQjnvkCOn70JquvZLuYEIWwh\nQFIbVKbRCIq1+tZtmePYp3KiYu7yR6pwwAdKNVM1vQNMTbk=\n=k1w9\n-----END PGP MESSAGE-----\n"
}
";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("{{URL}}/api/cps/v1/authorizeTransaction", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response Parameters

NameTypeDescriptionOptional Mandatory
encryptedRequestStringUnique client identification numbertrue
VersionNumberVersion fortrue

Example Response

{
  "encryptedResponse": "-----BEGIN PGP MESSAGE-----
Version: Didisoft OpenPGP Library for Java 3.2

hIwDT9UVaCho7XYBA/4qo0fpTxnJ+MliKu0LSjQBX5/laxfeQraj1ct0485soHGh
TIVy79qY5kNRagxi/540Iz0WMNsQbBAav9HLNRiUhH8DYCWNOEU60l+rFpohCbUR
N2ia97juHu/HR9QPO8bKofog42FMFpFCv0b7WZz8GGXJokVGeHS7YDOBHw5bPNKn
ATVkGrGKMax8hvWFbAkZmUE6T+iZ+JMaHDZ0YOMgzDW0s+R2oQeeri2ebZaWGhzs
zPj9l+HTrGIGJSjDyhSSJn6ydZGOPFHelCCQ5ZH9VO47lgMpxAiOYA/QqCRJOWnz
d5vjKGOqUez3OaujqK2nyvYGluDRECreIQLzrPuHVYNrjh/i4vHRcXdufp7pjzm8
M+loV/31pNfHFhcxeV1VyGlos0YdAi8=
=U22O
-----END PGP MESSAGE-----
"
}

Did you find this page helpful?