Great! Just for future reference. Where was the problem?
After you’ve sent the setup directive, you will receive a custom request called Connections.Response
. Jovo automatically maps that request to the ON_PURCHASE()
intent.
That request will contain a payload
object, which should have an attribute called billingAgreementId
that you need to be able to send the charge
directive, which, as the name says, is used to charge the customer.
Here’s a sample payload object from the official docs:
{
"billingAgreementDetails":{
"billingAgreementId":"C01-0000002-0000003",
"creationTimestamp":"2018-03-24T00:31:57.352Z",
"destination":{
"addressLine1":"1234 Main Street",
"city":"CUPERTINO",
"countryCode":"US",
"name":"Jane Doe",
"phone":"1111122222",
"postalCode":"90000",
"stateOrRegion":"CA"
},
"billingAddress":{
"addressLine1":"1234 Main Street",
"city":"Seattle",
"countryCode":"US",
"name":"Jane Doe",
"phone":"1111122222",
"postalCode":"98104",
"stateOrRegion":"WA"
},
"checkoutLanguage":"en_US",
"billingAgreementStatus":"OPEN",
"releaseEnvironment":"SANDBOX"
}
}
I’ve never tested it myself, but I don’t see any reason why you shouldn’t be able to.
Thanks!