Applying Pledge Payments to Pledge with endpoint V2

Has anyone successfully added a pledge payment to a gift batch using the endpoint:
https://api.sky.blackbaud.com/gift/v1/giftbatches/{batch_id}/gifts?

I'm trying to link a pledge payment to an existing pledge on a constituent record with NXT Batch. I have both the System ID of the pledge and the System ID of the installment, but I keep running into errors when submitting the request. If this works it will allow me to take a recurring gift pay-cash and convert it to a pledge payment.

Here is my JSON: Post https://api.sky.blackbaud.com/gift/v1/giftbatches/{batch_id}/gifts

image.png

Here is the existing pledge and installment id:

image.png

Errors:

image.png

Any help or insights would be greatly appreciated. Thanks! @Alex Wong

Best Answer

  • Josh Gould
    edited September 2 Answer ✓

    The error that I kept getting was "

    Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Collections.Generic.IEnumerable`1[Blackbaud.Gift.Service.Models.BatchGift.BatchGiftAddWithTributeLookup]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\nPath 'amount', line 1, position 10."            ],

    After enough trial and error I was able to get a payload to work. I will need to tweak it to my needs but getting a green "200 OK" is a big win! @Alex Wong, Thanks for pointing me to the v2 endpoint.

    Working JSON payload:

    image.png


    I hope this helps someone else out.

Answers

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    A few things to note:

    • Add Gift to Batch in Gift V1 does not allow gift type of PledgePayment, it only allows:
      • The gift type. Available values are DonationOtherGiftInKindRecurringGift, and RecurringGiftPayment.
      • You cannot made up a property pledge_installment_id and use it, the API has to allow it and this property doesn't exists for this endpoint.
    • To create a Pledge Payment, you need to use Add Gift to Batch in Gift V2.
      • This endpoint has the apply_payments property that is an array to apply the gift's amount to multiple pledges and multiple installments.

    I also do not know what you mean by "If this works it will allow me to take a recurring gift pay-cash and convert it to a pledge payment." The endpoint (v2) creates a new gift record as PledgePayment, this would have nothing to do with Recurring Gift Pay-Cash.

  • @Alex Wong We have a recurring gift setup in a different system that is processing the recurring gift. I'm taking the original recurring gift ID and updating the pledge in RE to use that id, then deleting the original recurring gift from RE. This will allow me to target the pledge in RE with all future recurring gift pay-cash gifts and apply them to the Pledge in RE.

    I tried to use v2 but ran into errors. Can you provide me with an example of how to apply a pledge payment with the v2 endpoint? Thanks for taking the time to help me with this.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    I do not use this API to create pledge payment, so I'm only going by what is in the API reference documentation.

    I can help you debug your error, but you will need to provide some information on how you are making the call to the endpoint and the request parameter and body you used.