#battbot - Terminal Interac Refunds

1 messages ยท Page 1 of 1 (latest)

meager urchin
#

Hello again! Can you give me an example event ID to take a look at?

meager garden
#

{
"id": "evt_1LLsr0J93KfFVesbewYvttWj",
"object": "event",
"api_version": "2016-03-07",
"created": 1657908186,
"data": {
"object": {
"id": "tmr_EslGaA0IlxUdzR",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"status": "succeeded",
"type": "refund_payment"
},
"device_sw_version": "2.4.2.3",
"device_type": "bbpos_wisepos_e",
"ip_address": "10.0.0.113",
"label": "Frank's Reader",
"livemode": false,
"location": "tml_Er0QQF6mxxwqBF",
"metadata": {
},
"serial_number": "WSC513142030549",
"status": "online"
}
},
"livemode": false,
"pending_webhooks": 3,
"request": null,
"type": "terminal.reader.action_succeeded"
}

#

this is what we got on the webhook

meager urchin
#

You should also have a separate charge.refunded event with the details you mentioned.

meager garden
#

yeah, but we are hoping to only listen to reader events

#

for in-person payment

#

because for our online payments we map a different webhook url

#

since we have both online and in-person payements, we use different servers to process them

#

we don't want our online Refund messages to come to the In-Person server

meager urchin
#

That's not really a practical approach, not if you want to get this information.

meager garden
#

The "process_payment_intent" type for the reader message contains the payment_intent id, why doesn't the refund_payment type contain anything about the payment intent or the Refund?

meager urchin
#

Terminal generates PaymentIntents, which generate Charges, which generate Refunds, and all of those objects have their own events with their own details.

meager garden
#

also if it allowed some metadata attached, we can also do something

meager urchin
#

Correct. You really need to listen for the other events. You can filter the ones you care about by looking for things like card_present or interac_present and other things like that which indicate it's related to a Terminal transaction.

meager garden
#

ok thanks for the help

#

i guess it can't be helped

#

but it would be really convinient if you guys added just payment_intent id to the refund_payment type, like what you already do for the process_payment type

meager urchin
#

I'll flag that feedback internally!

meager garden
#

I just tried:
data": {
"object": {
"id": "re_3LLspxJ93KfFVesb1ZcbTq9M",
"object": "refund",
"amount": 1000,
"balance_transaction": "txn_3LLspxJ93KfFVesb1d5nClDt",
"charge": "ch_3LLspxJ93KfFVesb1x5krrRH",
"created": 1657908183,
"currency": "cad",
"metadata": {
},
"payment_intent": "pi_3LLspxJ93KfFVesb1Wj0XrrZ",
"payment_method_details": {
"interac_present": {
"brand": "visa",
"cardholder_name": "USA INTERAC/Test Card 01",
"country": "CA",
"emv_auth_data": "8A023030",
"exp_month": 12,
"exp_year": 2022,
"fingerprint": "kwhaBRtMRFi693Wo",
"funding": "debit",
"generated_card": null,
"last4": "1933",
"network": "interac",
"read_method": "contact_emv",
"receipt": {
"account_type": "checking",
"application_cryptogram": "6F7FACA425F8AB63",
"application_preferred_name": "Interac",
"authorization_code": null,
"authorization_response_code": "3030",
"cardholder_verification_method": "offline_pin",
"dedicated_file_name": "A0000002771010",
"terminal_verification_results": "8000008000",
"transaction_status_information": "6800"
}
},
"type": "interac_present"
},

#

the refund object has the "type" interac_present" under the payment_method_details property of the Refund Object

#

But ironically, your java sdk's Refund object doesn't have the "payment_method_details" property

#

so when I use your sdk to obtain the Refund object, it doesn't actually contain the information i need to filter

meager urchin
#

Ah, you're using the Java SDK. Gotcha. Let me dig a little, hang on...

meager garden
#

that's very helpful, i'll try it out, thanks

meager garden
#

Hi again,

meager urchin
#

Hello!

meager garden
#

continuing from earlier

#

if i listen to the Refund events, i can handle successful cases

#

but if the refund wasn't successful on the Reader, only the Reader.failed event happens

#

at this point again, i need to know the payment_intent or Refund.id so i can know what failed

meager urchin
#

This is for Interac refunds specifically, correct?

meager garden
#

yes

meager urchin
#

For Interac refunds you need to specify the Charge ID when attempting to create the refund. If the refund fails you can relay the Charge ID to your server from the client when it gets the error.

meager garden
#

as a parameter i specify the payment_intent id to that API

meager urchin
meager garden
#

i'm using server-side integration

#

not client-side

meager urchin
#

You mean server-driven? That's only available in the US, so I didn't expect someone doing payments in CA to be using it.

meager garden
#

no it's beta on CA as well

#

we got approval

meager urchin
#

We can't talk about unreleased betas here on Discord, you would need to get help from the people who provided you access to the beta.

meager garden
#

yeah.. about that, they told me to come to discord to ask

meager urchin
#

Who told you that?

meager garden
#

originally i was asking them via email but they said this Discord channel is the best way to ask questions

#

Kristen Kalez

meager urchin
#

This is a great place to get answers to questions about anything public, but we can't help with non-public betas here. I apologize for the miscommunication.

meager garden
#

I'm kinda stuck with this then. The stripe support and this channel just bouncing me between

meager urchin
#

I'll get things sorted out internally. Really sorry about the misdirection!

#

Can you DM me the email address we sent the email to that you mentioned above?

meager garden
#

which email address?

#

Kristen?

meager urchin
#

Your email address. I don't know who you are. ๐Ÿ™‚

#

You may want to delete that message, this is a public server. ๐Ÿ™‚

#

But I got it, thank you!

meager garden
#

yeah sorry forgot this was public

meager urchin
#

No worries!

#

You should be getting an email soon with further details. Sorry again about the mixup!

meager garden
#

great, thanks for the help