Create a purchase using a wallet passthrough
/purchases/ The wallet passthrough object
This payload allows a vaulted wallet credential to be decryped and passed to FatZebra to be used for transactions. Currently supported passthrough wallets are ApplePay and GooglePay.
The wallet object should be supplied, including the wallet type and cryptogram, to ensure the correct switch settings are applied. The card and transactions details should be applied using the decrypted wallet details.
The wallet object for a passthrough transaction must contain:
- type, currently supported values:
passthrough_apple_payfor ApplePay walletspassthrough_google_payfor GooglePay wallets
- Cryptogram - decrypted from the wallet
The SLI indicator should be provided in the extra field. This will be based on the eciIndicator in the decrypted payment data for the initial transaction - usually '05' and for subsequent merchant initiated transactions without the token this should be '07'.
Other fields may be applied as per standard purchase field.
BIN blocking based on county of origin will not be performed when using network token passthrough.
As the underlying instrument is not provided, and the network token submitted may have been generated with a BIN that corresponds to a foreign institution, BIN blocking can not be applied to transactions using network token passthrough.
SLI should be provided
The SLI should be provided in the extra object to ensure the wallet is correctly processed by the switch.
For ApplePay transactions, this value will be the eciIndicator in the payment data element. For Google pay transactions, this will be the eciIndicator value in the payment method details element.
In the case of subsequent transactions being provided without the cryptogram and a reference to a previous transaction, this value should be provided as 7
Body Parameters
amountinteger (int32)A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency)
referencestringReference of the transaction. Max length 255 characters.
customer_ipstringRFC791-compliant IP address
currencystring· Defaults to AUDThree letter ISO currency code, in UPPERCASE
card_numberstringCard number decrypted from apple pay wallet
card_holderstringName of the card holder decrypted from wallet. If none is provided by the wallet, a sensible default should be used, such as 'Card Holder' , 'ApplePay Card Holder', 'GooglePay card holder'
card_expirystring(optional)The card expiry decrypted from wallet - format: MM/YYYY
walletobject(optional)Wallet details including type and cryptogram (CAVV)
wallet.typestringThe type of wallet being passed through (currently support 'passthrough_apple_pay' or 'passthrough_google_pay')
wallet.cryptogramstring(optional)Required for ApplePay wallet transactions, optional for GooglePay. This is the cryptogram for the transaction.
testboolean(optional)· Defaults to falseIndicates if this is a test transaction
metadataobject(optional)addendum_datastring(optional)captureboolean(optional)extraobject(optional)extra.ecmstring(optional)· Defaults to 31Specifies the transaction source and type for processing. This value is two digits, the first indicating the source (1 = Mail Order, 2 = Telephone Order, 3 = Internet) and the second indicating the payment type (1 = Single, 2 = Recurring, 3 = Instalment - not commonly supported)
extra.slistring(optional)The Security Level Indicator. This should match the eciIndicator value of the payment data in the decrypted payload.
Request
curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'
{
"card_number": "55555555555555555",
"card_holder": "Valued Cardholder",
"card_expiry": "02/2027",
"customer_ip": "127.0.0.1",
"reference": "abcsd1234",
"amount": 110,
"currency": "AUD",
"capture": true,
"wallet": {
"type": "passthrough_apple_pay",
"cryptogram": "aaabbbcccddd111222333444="
},
"extra": {
"sli":"05"
},
}'Response
{
"successful": true,
"response": {
"authorization": "295229",
"id": "071-P-HEJJINFO",
"card_number": "555555XXXXXX5555",
"card_holder": "Valued Cardholder",
"card_expiry": "2027-02-28",
"card_token": "qwer9876",
"card_type": "MasterCard",
"card_category": "Credit",
"card_subcategory": "Standard",
"amount": 110,
"decimal_amount": 1.1,
"successful": true,
"message": "Approved",
"reference": "fd792da68ea1b8a1ba791a0efc6f73b4",
"currency": "USD",
"transaction_id": "071-P-HEJJINFO",
"settlement_date": "2018-07-06",
"transaction_date": "2018-07-06T10:31:05+10:00",
"response_code": "00",
"captured": true,
"captured_amount": 110,
"rrn": "071PHEJJINFO",
"cvv_match": "M",
"metadata": {},
"addendum_data": {}
},
"errors": [],
"test": true
}{
"successful": false,
"response": {
"authorization": null,
"id": "071-P-QE2I2PCW",
"card_number": "512345XXXXXX2346",
"card_holder": "Jim Smith",
"card_expiry": "2030-02-28",
"card_token": "fke86c5u",
"card_type": "MasterCard",
"card_category": "Credit",
"card_subcategory": "Standard",
"amount": 10000,
"decimal_amount": 100.0,
"successful": false,
"message": null,
"reference": "da5d16122b831b468090a7adaf68758e",
"currency": "XXX",
"transaction_id": "071-P-QE2I2PCW",
"settlement_date": null,
"transaction_date": null,
"response_code": "99",
"captured": false,
"captured_amount": null,
"rrn": null,
"cvv_match": "U",
"metadata": {},
"addendum_data": null
},
"errors": ["Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP"]
}