Retrieving Extended Payment Account Information
You can extend the response to the default Account GET by passing an additional request parameter, include
The following possible values are currently supported:
Additional Parameter Name | Description | IsEncrypted |
---|---|---|
encryptedCardNumber | Returns the encrypted card number. This is not enabled by default and is only available for authenticated partners and needs to be requested. The card number will be encrypted using a public key provided by the partner. Please see more information on that below. | Yes |
fastFunds | Returns the information if the issuer of a particular card supports Fast Funds. | n/a |
encryptedCardNumber
Generating a public/private key pair for encryption of sensitive data
Information marked as Encrypted in the table above will be encrypted with a public key generated by the partner. Please use the following set of steps for generating the keyPair
1 - Generate a public and private RSA key pair
Use
openssl genrsa -des3 -out private.pem 2048This generates a 2048-bit RSA key pair, encrypts them with a password you provide, and writes them to a file.
2 - Export the RSA Public Key to a File
Use
openssl rsa -in private.pem -outform PEM -pubout -out public.pemThe -pubout flag is important. Be sure to include it.
Open the public.pem and ensure that it starts with a -----BEGIN PUBLIC KEY-----. This is how you know that this file is the public key of the pair and not a private key.
The public key needs to be exchanged with PXP Financial using a secure mechanism.
Decrypting of data
Please use PKCS1 OAEP paddings (OaepEncoding) for decrypting sensitive data with the private key.
Example:
Note
Above GET request only works for credit card payment accounts. If the merchant has both credit and debit cards (Maestro) registered, he should either add the parameter type to get a specific payment account or the parameter typeSpecified = false to get all payment accounts for the specified paymentaccountID and specified userID.
Response:
{
"accounts": [
{
"cardNumber": "************1111",
"expiryMonth": 1,
"expiryYear": 2099,
"holderName": "John Doe",
"cardToken": "6f2a7407-1e7d-480a-83de-41804aa3d00d",
"issuerCountryCode": null,
"issuerName": null,
"accountFundingSource": null,
"encryptedCardNumber": "THe5Vf4i1EcAhXbnCU75qwe3SmGi82N2rhE4lKKj+gbZE0pxcYYif94kPfaK3x98AS19UVBWBbD5QPNczo9BtKbaHQ/kg8rYZDkLOC3O9QrUTFvl7XeWAcljxyWzgvQWOZSIM5PaWgt0ce+Dak3rW4/HthY0Wc/BubXTdrtzTDnLILnHfb8zN3s+H+THbM2DhzutypgLYFwUPQRxFMFsFIwjvir5wa3AX+moDjjOnH97jt61KjPklvhC64wAk+i56jKkiUa1RyxoJVakGGMCQluhHgSTgy/JuGhjV90UaBxkREnhXNjqdgImwBUuv27+PdIesKa062+/K51K9qxq6w==",
"id": "7d3d1fce-3b15-438f-a63d-db92ce576f57",
"paymentAccountTypeID": 1,
"paymentMethodID": 0
}
]
}
fastFunds
Returns the information if the issuer of a particular card supports Fast Funds.
Format of fastFunds
parameter in the response: boolean (true/false)
Only "true" is returned
If the issuer of a particular card supports Fast Funds, then the
fastFunds
parameter will be returned astrue
.
If the issuer of a particular card does not support Fast Funds or the information is not available, then thefastFunds
parameter will not be returned.
Payment Method ID
If a payment method ID
pmid
is included in the request, thefastFunds
parameter will not be returned.
Example:
Response:
{
"accounts": [
{
"cardNumber": "************1111",
"expiryMonth": 1,
"expiryYear": 2099,
"holderName": "John Doe",
"cardToken": "6f2a7407-1e7d-480a-83de-41804aa3d00d",
"issuerCountryCode": null,
"issuerName": null,
"accountFundingSource": null,
"cardType": "Visa",
"id": "7d3d1fce-3b15-438f-a63d-db92ce576f57",
"paymentAccountTypeID": 1,
"paymentMethodID": 0,
"fastFunds": true
}
]
}
Updated about 3 years ago