Happy Business Starts Here

Master

Why Callout for new default payment method is not firing ?

There's a callout for payment method updated but no such callout for adding a new payment method (manually or programatically). How should a callout be configured when a new payment method is added to an account, but the other payment method(s) are left alone. Perhaps the new payment method is set to default or it may not be. 

 

feels similar to this quesiton: https://community.zuora.com/t5/Billing-Payments/Why-Callout-for-new-default-payment-method-is-not-fi...

 

Thank you.

 

- Jeff

- Jeff
3 REPLIES 3
Highlighted
Savvy Scholar

Re: Why Callout for new default payment method is not firing ?

Looks like you'll need a custom event trigger for this. They're quite intuitive and easy to work with, but for some reason the amount that you can have is quite low. From there just key a notification definition on to it and you should be good to go.

 

Something along these lines should work. Please note that I haven't tested this.

 

{
    "active": true,
    "baseObject": "PaymentMethod",
    "condition": "changeType == 'INSERT'",
    "description": "Trigger an event when a Payment method is added to an account.",
    "eventType": {
        "name": "PaymentMethodAdded",
        "displayName": "Payment Method Added",
        "description": "A Payment method has been added to an account."
    }
}

 

Links that may be useful to you:

 

API reference for base object PaymentMethod

https://www.zuora.com/developer/api-reference/#tag/Payment-Methods

 

API reference for create custom event trigger endpoint

https://www.zuora.com/developer/api-reference/#operation/POST_EventTrigger

Tutor

Re: Why Callout for new default payment method is not firing ?

Hi Jamie,

 

Thank you for your reply. I've managed to test this and indeed, it added a new custom callout that is triggered when a new payment method is added.

There is one thing I am still struggling with: I am trying to send some parameters through the callout. Parameters like accountName. Unfortunately, I can only select parameters related to the 'baseObject', which in my case, is PaymentMethod. I have no accountName or accountNumber parameters on that object.

 

Do you know of a way to get those Account related parameters in that parameter list?

 

Thanks and regards!

Mihai

Savvy Scholar

Re: Why Callout for new default payment method is not firing ?

The AccountId field will be what you want. It looks like that's the only account related field which is available when PaymentMethod is the base object.

 

If you hit the end point GET https://rest.zuora.com/v1/accounts/account-id you can then get anything you're looking for related to the account.

 

Sorry for the month late reply, I don't check the forums a lot!