Example Code for SiriKit PayBills ?

Anyone seen any sample code from Apple for handling the new SiriKit Bill Pay functions ? The newest sample code on Apple's site (https://developer.apple.com/library/content/navigation/index.html#topic=Sample+Code&section=Resource+Types) is dated 1-19-17, which is before the iOS 10.3 Beta 1 release.


I successfully impIemented a SiriKit SendMoney extension when iOS 10 first came out, but I am seeing a lot of issues when trying to get a working example for their Pay Bills functionality going. Even a slightly modified version of their example phrase from the SDK docs doesn't work.


Speak to Siri - Pay my utility bill due in January using the <appName> app


Resolution callbacks:

resolveBillPayeeForPayBill: called with payee name (null)

resolveTransactionAmountForPayBill: called

no amount specified by the user

resolveBillTypeForPayBill: called with bill type Utilities


Siri speaks "there is a problem with <app name>"


Always possible I am not implementing the callbacks properly, but without an example to go by it is hard to know what the issue is.


Speaking "pay my utility bill using the <appName> app" gives the generic Payment confirmation screen as expected.


Thanks in advance.

Do you have any updates on this? I am running into similar issues that you are, the intent goes through the resolve methods but never reaches `confirm` or `handle` and Siri says there was a problem.

Joining the author's request.

Tried implemeting both INPayBillIntentHandling and the INSearchForBillsIntentHandling.

The bill pay intent handler doesn't seem to recognize anything but the bill payee and the transaction date if I specify it. Trying to resolve the payment method and the payment amount didn't work. When trying to initate a bill pay request without using the resolve methods I'm seeing the generic Siri UI with default placeholders for payment method (CHECKING_ACCOUNT) and payment amount (MINIMUM_DUE($0)).


The Search for Bills intent did get Siri to tell me I have 10 bills due (which is correct according to the mocks I've passed as bill details), however the UI was completely blank.

(I haven't impleneted a UI Extension for the Intents as I wanted to test the native Siri UI).

Hoping the next beta will work out the all the glitches around this capability. It's a really cool feature and I'm really eager on implemeting it 🙂.

First of all, thanks for the replies and am glad it is not just me that is struggling


> I am running into similar issues that you are, the intent goes through the resolve methods but

> never reaches `confirm` or `handle` and Siri says there was a problem.

Paying via <bill type> is still broken in Beta 2. I have an open Radar and at Apple's request just sent Apple sysdiagnose logs this morning...


The following utterances work for me (or at least the success code paths do):

PAY MY <payee name> BILL

PAY MY <payee name> BILL on FRIDAY

PAY MY <payee name> BILL NEXT TUESDAY

PAY <amount> ON MY <payee name> BILL


Pretty much everything else I try is broken in some form or another. I will list out my open Bill Payment Radars in case that helps anyone:

  • 30215664 - Siri response for Payee Not found is Incorrect
  • 30233670 - Attempting to pay a bill using SiriKit when supplying only a bill type fails (there is a problem with <app name>)
  • 30490472 - Unable to remove default UI from Intent UI Extension for INPayBillIntent
  • DUPE 30234224 - Disambiguation for Bill Payment Transaction Amount is Broken
  • DUPE 30236902 - INPayBIllIntent Resolution Methods Are Called in Bad Order
  • CLOSED AS NOT NEEDED - 30216490 - SiriKit INBillTypeResolutionResult Needs Disambiguation Return Value


Resolution callbacks are still coming in the wrong order (in my opinion). Payee name and bill type have to be the first 2, since all the other resolution callbacks depend on you knowing what the bill is (and those 2 calls are the ways to select the bills).


Not having a disambiguation call for bill type is ridiculous - ever hear of 2 car payments or systems that classify all utility bills (electric, gas, water) into a single category (our system does - only 16 million consumers - no biggie).


resolveDueDateForPayBill: is busted in Beta 2, as adding "due in MARCH" just sends a NIL value for due date


resolveFromAccountForPayBill: is busted in Beta 1&2, returning anything gives me a Siri error (there is a problem with <app name>)


Also can't figure out how to remove the default labels and fields. There is no new variable in INUIHostedViewSiriProviding, and setting displaysPaymentTransaction=true doesn't remove the Apple fields.


They have at least updated the doc pages on the resolution calls to at least help you try to figure out what they want your code to do inside those calls. But even with that it is a slog to try to get anything working.


The whole implementation of Siri Bill Payment capability seems very buggy and unbaked at this point. I never thought I would point to the "stability" of Pay a person in iOS 10.0 Beta as being better than anything (but it is light-years better than current bill payment implementation).

> Trying to resolve the payment method and the payment amount didn't work


Agree payment method resolution is borked.


What kind of error are you getting on amount ? Pulling in the amount they spoke works for me when I speak:

PAY <amount> ON MY <payee name> BILL


But if the spoken amount is less than the min amount due on the bill attempting to confirm or disambiguate are broken in different ways.

>> What kind of error are you getting on amount ? Pulling in the amount they spoke works for me when I speak:

PAY <amount> ON MY <payee name> BILL


I don't get an error, the UI simply doesn't display the transaction amount and keeps displaying 0 (even though the intent is being populated with the amount I'm speaking).


By the way - it looks like there might have been some changes on the server side, because it looks like some things started working (I didn't change any of my code and today the results were suddenlly different). For example:

1) The Bill Pay UI now shows "Checkings" and "0" instead of "CHECKING_ACCOUNT" and "MINIMUM_AMOUNT(0)".

2) The Biill Search UI actually shows the bills!


So it looks like someone on Apple is starting to fix things up...

> I don't get an error, the UI simply doesn't display the transaction amount and keeps displaying 0


In confirmPayBill:completion:, you have to set the response tran amount to get it to display (when I remove this line, I get the 0, and when I uncomment it I get the spoken amount (which is what I am returning in resolveTransactionAmountForPayBill:withCompletion: ))

response.transactionAmount = intent.transactionAmount


> 1) The Bill Pay UI now shows "Checkings" and "0" instead of "CHECKING_ACCOUNT" and "MINIMUM_AMOUNT(0)".


I am seeing these changes as well.

However I just retested and resolveFromAccountForPayBill:withCompletion: is still broken.

Thanks for the transactionAmount tip! I missed that 🙂.


I'll try to keep this thread up to date with new information if I encounter it..

> The Search for Bills intent did get Siri to tell me I have 10 bills due (which is correct according

> to the mocks I've passed as bill details), however the UI was completely blank.


Have you had any luck with the resolution functions for Search bills ?


I tried several of them today (payee name, bill type, payment status) and none of them worked right.


The only thing I could get working was "TELL ME MY BILLS USING <app name>" with no additional modifiers.


I did get a UI back, but it was only date (on the left) and amount (on the right). The bills array that you attach to the response has to contain INBillDetails objects (maybe you passed in a different type of object ?)

I didn't try any of the resolution methods for the search for bills intent yet... But I am seeing the same UI you're seeing. Seems like the UI doesn't include the organizatation name/nickname (this is also the case on the pay bill intent, when trying to disambiguate between two bill payees - I'm only seeing account number).

Doesn't look like Beta 3 solved the Payment Account issue...

The UI is much better though.

Beta 4 fixes the payment account issue!

>>The Search for Bills intent did get Siri to tell me I have 10 bills due (which is correct according to the mocks I've passed as bill details),


May I know where I could find documentation about creating bills for SIRI. Thanks.

Example Code for SiriKit PayBills ?
 
 
Q