Sample Apple token variables
paymentData:: version:EC_v1, data:3O…w=, signature:MI…YX
header:: ephemeralPublicKey:MF…A==, publicKeyHash:TM…8=, transactionId:c5…3f
paymentMethod:: displayName:Visa 0492, network:Visa, type:debit, transactionIdentifier:C5..93F
These token variables must be sent to Telr on their URL https://secure.telr.com/gateway/remote.json.
Please ensure the POST content type is set to application/x-www-form-urlencoded and perform a URL encode for the Apple Pay data.
- applepay_enc_paydata
- applepay_enc_paysig
- applepay_enc_pubkey
Request parameter
Field | Value | Description |
---|---|---|
ivp_method | applepay | Set value as 'applepay' |
ivp_store | 15164 | Your store ID |
ivp_authkey | cxkwshbs68ejbh | V2 Authentication Key |
ivp_amount | 10 | Transaction amount |
ivp_currency | AED | Transaction currency |
ivp_test | 0 | Test mode indicator |
ivp_desc | Description | Purchase description |
return_auth | return url for authorised transaction | Return URL for authorised transactions |
return_decl | return url upon declined | Return URL for declined transactions |
return_can | return url upon cancelled | Return URL for cancelled transactions |
bill_fname | FirstName | The customer’s forename plus any other middle names or initials they may have. |
bill_sname | Lastname | Customer surname (also known as family name) |
bill_addr1 | Address | Customer address |
bill_city | city | City |
bill_region | Region | Region |
bill_country | Country | Country |
bill_zip | 123456 | Zip code |
bill_email | [email protected] | Email address |
ivp_lang | en | Payment language Page inreface |
ivp_cart | CartID | Your reference for the transaction. For example this could be a cart ID or order ID generated by your shopping system. This must be unique for each request. Maximum length is 63 characters. |
ivp_trantype | Sale/Auth/Capture/Verify | Purchase, Authorize, Capture, or Verify. Set as per the terminal configuration. |
ivp_tranclass | ecom | Set 'ecom' |
delv_addr1 | Bill address | Bill address |
delv_addr2 | Address 2 | Additional address details |
delv_addr3 | Address 3 | Additional address details |
delv_city | City | City |
delv_region | Region | Region |
delv_country | Country | Country |
applepay_enc_version | version | From Apple pay token get "version" |
applepay_enc_paydata | data | From Apple pay token get "data" |
applepay_enc_paysig | signature | From ApplePay token get "signature" |
applepay_enc_pubkey | ephemeralPublicKey | From Apple Pay token get "ephemeralPublicKey" |
applepay_enc_keyhash | publicKeyHash | From Apple Pay token get "publicKeyHash" |
applepay_tran_id | transactionId | From Apple Pay token get "transactionId" |
applepay_card_desc | type | From ApplePay token get "type" |
applepay_card_scheme | displayName | From ApplePay token get "displayName" |
applepay_card_type | network | From Applepay token get "network" |
applepay_tran_id2 | transactionIdentifier | From Apple Pay token get "transactionIdentifier" |
Request format
{
"store": "{{store_id}}",
"authkey": "{{remote_api_key}}",
"tran": {
"id": "1236100014",
"class": "ecom",
"type": "sale",
"description": "ApplePay transaction",
"amount": "5.1",
"test": "0",
"currency": "AED",
"method": "applepay"
},
"applepay": {
"token": {
"paymentData": {
"header": {
"transactionId": "xxxxxxxx",
"ephemeralPublicKey": "xxxxxxxx",
"publicKeyHash": ""
},
"data": "",
"signature": ""
},
"transactionIdentifier": "",
"paymentMethod": {
"network": "MasterCard 1234",
"type": "MasterCard",
"displayName": 2
}
}
},
"customer": {
"name": {
"forenames": "Test User",
"surname": ""
},
"email": "[email protected]",
"address": {
"line1": "Address",
"country": "AE",
"city": "Dubai"
},
"phone": "0123456789"
}
}
Response format
{
"trace": "4001/5151/%ea6bba9",
"transaction": {
"ref": "040024871559",
"type": "sale",
"class": "ECom",
"status": "D",
"code": "31",
"message": "Not authorised"
},
"customer": {
"email": "[email protected]",
"name": {
"forenames": "A bcd",
"surname": "sff"
},
"address": {
"line1": "No address",
"city": "Unknown",
"country": "AE"
}
}
}
The Status field can have the following values, which are used to notify the user on the Apple Pay screen about the transaction status:
- A: Authorised
- D: Declined
- C: Cancelled
Using a pre-decrypted Applepay token
This feature supports merchants in making a payment using a decrypted Apple Pay network token.
Use the same request parameters as above, but replace the parameters starting with 'applepay_' with the following additional parameters:
Additional Request Parameters
Field | Value | Description |
---|---|---|
applepay_net_scheme | Card scheme | Card Scheme |
applepay_net_dpan | Card number | Retrieve from Apple Pay network token's "PrimaryAccountNumber" |
applepay_net_exm | Card expiry month | Retrieve from Apple Pay network token's "applicationExpirationDate". If in YYMMDD format, use MM value |
applepay_net_exy | Card expiry year | Retrieve from Apple Pay network token's "applicationExpirationDate". If in YYMMDD format, use YYYY value, e.g., 2024 |
applepay_net_eci | ECI Value | Retrieve from Apple Pay network token's "eciIndicator" |
applepay_net_iav | Cryptogram | Retrieve from Apple Pay network token's "onlinePaymentCryptogram" |
Sample JSON request
{
"store": "{{store_id}}",
"authkey": "{{remote_api_key}}",
"tran": {
"id": "4216109714",
"class": "ecom",
"type": "sale",
"description": "ApplePay transaction",
"amount": "5.1",
"test": "0",
"currency": "AED",
"method": "applepay"
},
"applepay": {
"networkToken": {
"card": {
"scheme":"visa",
"number":"4**************6",
"expiry":{
" month":"02",
"year":"2**8"
}
},
"cryptogram":"A*******************A="
}
},
"customer": {
"name": {
"forenames": "Test User",
"surname": ""
},
"email": "[email protected]",
"address": {
"line1": "Digital Park - Dubai - United Arab Emirates",
"country": "AE",
"city": "Dubai"
},
"phone": "0123456789"
}
}