Legacy Dev Forum Posts

 View Only

Sign Up

Input Contract not validating

  • 1.  Input Contract not validating

    Posted 06-05-2025 18:49

    agilio | 2020-06-16 17:29:05 UTC | #1

    Customer needs to post to a third party. The input contract looks like this. We are getting an error saying GC doesn't support sub-objects but the interface and the raw JSON allow you to add a sub object. Thoughts?

    POST https://core.spreedly.com/v1/gateways/*************/authorize.json

    Authorization:

    Basic *****************

    Content-Type:application/json

    {

    "transaction": {

    "credit_card": { //test value for success results

    "first_name": "Nathan Th",

    "last_name": "Ha",

    "number": "4111111111111111",

    "verification_value": "123",

    "month": "12",

    "year": "2025"

    },

    "amount": 1025, //amount in cent

    "currency_code": "USD",

    "retainonsuccess": true

    }

    }

    Screen shot of input contract we created


    Jason_Mathison | 2020-06-16 18:32:19 UTC | #2

    Hi agilio,

    Data Action inputs have to be simple key/value pairs, they don't support "complex" inputs. In this case you would need to use the "Body Template" to create the shape of the object that your endpoint expects, and then inject the values in all of the right places.

    --Jason


    agilio | 2020-06-16 18:40:33 UTC | #3

    Bummer :frowning:

    Any ideal if that is on a roadmap?


    system | 2020-07-17 18:40:37 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 8034