#nugax_api

1 messages ¡ Page 1 of 1 (latest)

uncut shadowBOT
sterile archBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

uncut shadowBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240419575380709470

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

acoustic lynx
sharp plover
#

so there is no way to specificy a payment amount less than amount_due?

#

specify

#

...

acoustic lynx
#

Correct

sharp plover
#

hmm

#

ok, one more question

#

i have invoice->pay working fine..

#

how can I get payment details, (like a confirmation number, or whatever may be returned) from the result of the pay?

#

a link to docs would be good

#

i have looked but cant find what i need

#

this is what ive looked at

acoustic lynx
sharp plover
#

so charge in the repsonse for invoice pay is a charge id, correct?

acoustic lynx
#

Yep

sharp plover
#

so you could then retrieve charge details like:

#

"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 32,
"seller_message": "Payment complete.",
"type": "authorized"
},

acoustic lynx
#

You could indeed

sharp plover
#

so would this work for all types of payment methods, (bank, card)

acoustic lynx
#

The Payment Intent might be better though, since there could be multiple charges on an Invoice, hence the attribute name latest_charge

#

You should look at the Payment Intent instead

sharp plover
#

why would there be multiple charges, if you can only pay once?

acoustic lynx
#

Because charges can fail

sharp plover
#

oh

#

so, "payment_intent": null,

#

in invoice

acoustic lynx
#

That would mean that payment hasne't been attempted yet, unless you're using a legacy integration that only uses charges

sharp plover
#

then latest charge, then retrieve charge info for that charge id

#

so to larify

#

clarify

#
  1. pay. get pay intent
#
  1. from pay intent get latest charge
#
  1. retrieve charge and details you want from the latest_charge id
#

it says latest charge is expandable. what does that mean? does it expand the values from that charge id?

acoustic lynx
#

Yeah, it will give you the whole Charge object if you expand it. You should look through the rest of the attributes on the Payment Intent and familiarize yourself with them before you do that though, as there might be something more usefule there like last_payment_error or next_action or status

sharp plover
#

if you expand the charge id, how do you access it?

#

it is then an assoc array?

#

payment intent may be fine

acoustic lynx
#

I'd say try to use just the Payment Intent for now, but if you do end up using the Charge, then you will get a Charge object with various attributes with different data types

#

All in JSON