API Error Code 4

Hi,

Using postman to try and place a test transaction from endpoint

When submitting, I'm getting an error:

[

{

"message": "Transaction is required.",

"error_name": "TransactionValidationError",

"error_code": 4,

"raw_message": "Transaction is required."

}

]

I'm sending data as raw json with content-type: application/json but the error makes me think no data is being sent at all. Any insight to this?

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 4 bbcon 2025 Attendee Badge

    @Joshua Morlan
    You will need to provide more details on your call.

    I'm assuming you are using the POST Transaction API endpoint?

    782bfa5365bb2d4053e5c5d027338808-huge-im

    if so, you need to provide a JSON of the transaction detail in the request body, hard to help without seeing what you provided as request body in postman. you can remove the sensitive info before posting here

  • @Alex Wong

    Thanks for the reply, yes I am trying a POST transaction as a test. Here is the full CURL request to hopefully help troubleshoot this:

    curl --location --request POST 'https://api.sky.blackbaud.com/payments/v1/transactions' \\

    --header 'Bb-Api-Subscription-Key: #######' \\

    --header 'Content-Type: application/json' \\

    --header 'Authorization: Bearer #########' \\

    --data-raw '{

    "amount": 1.00,

    "billing_contact": {

    "address": "###",

    "city": "###",

    "country": "US",

    "first_name": "Josh",

    "post_code": "#####",

    "state": "MI"

    },

    "comment": "Test Transaction",

    "credit_card": {

    "exp_month": 7,

    "exp_year": 2023,

    "name": "####",

    "number": "####"

    },

    "csc": "###",

    "donor_ip": "###",

    "payment_configuration_id": "###",

    "tokenize": false

    }'

  • For anyone else running into this issue, I figured it out, the problem was the transaction_id in the request.

    The documentation states you can specify a transaction_id for the transaction, or leave it blank and one will be generated for you, and it is not marked as a required field. This is not correct. The transaction_id cannot be omitted and it cannot be blank or you will get the error in my screenshot. If you want a transaction id to be auto-generated you must include an all 0 id like so: "transaction_id": "00000000-0000-0000-0000-000000000000" and only when I did this did the call work correctly. If the documentation or error message was more clear this would have been an easy fix.

  • Mina Mistry
    Mina Mistry Blackbaud Employee
    Seventh Anniversary Kudos 2 Name Dropper Participant

    @Joshua Morlan
    Thank you for the feedback, we will review and address this in the documentation!

Categories