HI,
We have subscribed to Payment Events webhooks- "net.authorize.payment.authcapture.created".
So every time a transaction is created, a corresponding webhooks is being triggered from auth.net which contains the transaction id.
Sample webhook response:
{
"notificationId":"aa4e6f35-8031-4e10-ab7e-84fd236f4",
"eventType":"net.authorize.payment.authcapture.created",
"eventDate":"2021-11-18T10:25:00.1653606Z",
"webhookId":"72831127-981f-4e6f-b0ce-2778878efe98",
"payload":{
"responseCode":1,
"authCode":"11364Z",
"avsResponse":"Y",
"authAmount":59.9,
"entityName":"transaction",
"id":"63368962738"
}
}
Immediately, We are trying to get the transaction details by passing transaction id to "getTransactionDetailsRequest" using api request .
"https://api.authorize.net/xml/v1/request.api"
We are getting the transaction details like below,
{
"transaction":{
"transId":"63368962738",
"submitTimeUTC":"2021-11-18T10:24:59.383Z",
"submitTimeLocal":"2021-11-18T05:24:59.383",
"transactionType":"authCaptureTransaction",
"transactionStatus":"capturedPendingSettlement",
"responseCode":1,
"responseReasonCode":1,
"responseReasonDescription":"Approval",
"authCode":"11363Z",
"AVSResponse":"Y",
"authAmount":59.9,
"settleAmount":59.9,
"taxExempt":false,
"payment":{
"creditCard":{
"cardNumber":"XXXX4040",
"expirationDate":"XXXX",
"cardType":"MasterCard"
}
},
"billTo":{
"firstName":"Test",
"lastName":"Test",
"address":"490 DORY CT,",
"city":"N RICHLND HLS",
"state":"TX",
"zip":"76180",
"country":"US"
},
"shipTo":{
"firstName":"Test",
"lastName":"Test",
"address":"490 DORY CT,",
"city":"N RICHLND HLS",
"state":"TX",
"zip":"76180",
"country":"US"
},
"recurringBilling":false,
"product":"Card Not Present",
"marketType":"eCommerce"
},
"messages":{
"resultCode":"Ok",
"message":[
{
"code":"I00001",
"text":"Successful."
}
]
}
}
But when we try to get the transaction details after some times, we are getting like below
{
"transaction":{
"transId":"63368962738",
"submitTimeUTC":"2021-11-18T10:24:59.383Z",
"submitTimeLocal":"2021-11-18T05:24:59.383",
"transactionType":"authCaptureTransaction",
"transactionStatus":"capturedPendingSettlement",
"responseCode":1,
"subscription": {
"id": 54536713,
"payNum": 1
},
"responseReasonCode":1,
"responseReasonDescription":"Approval",
"authCode":"11363Z",
"AVSResponse":"Y",
"authAmount":59.9,
"settleAmount":59.9,
"taxExempt":false,
"payment":{
"creditCard":{
"cardNumber":"XXXX4040",
"expirationDate":"XXXX",
"cardType":"MasterCard"
}
},
"billTo":{
"firstName":"Test",
"lastName":"Test",
"address":"490 DORY CT,",
"city":"N RICHLND HLS",
"state":"TX",
"zip":"76180",
"country":"US"
},
"shipTo":{
"firstName":"Test",
"lastName":"Test",
"address":"490 DORY CT,",
"city":"N RICHLND HLS",
"state":"TX",
"zip":"76180",
"country":"US"
},
"recurringBilling":false,
"product":"Card Not Present",
"marketType":"eCommerce"
},
"messages":{
"resultCode":"Ok",
"message":[
{
"code":"I00001",
"text":"Successful."
}
]
}
}
The difference b/t two is we are getting the subscirption property when we try later, but when we try immediately or after 1 minute the subcription property is not available.
So we couldn't identify the subscription for which the transaction was triggered.
Kindly help us to overcome this issue, which causing great loss to all our clients.
Thanks,