Skip to content

Instantly share code, notes, and snippets.

@A412
Last active January 6, 2019 03:40
Show Gist options
  • Select an option

  • Save A412/23cd531395f55c2dee979711c31b8a60 to your computer and use it in GitHub Desktop.

Select an option

Save A412/23cd531395f55c2dee979711c31b8a60 to your computer and use it in GitHub Desktop.

Revisions

  1. A412 revised this gist Aug 17, 2016. 1 changed file with 27 additions and 3 deletions.
    30 changes: 27 additions & 3 deletions stripe_api
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,11 @@ stripe

    {state: , message: , stripeid: }

    id
    token

    {state: , message: , stripeid: }

    PUT/PATCH
    id
    cc
    @@ -32,6 +37,11 @@ stripe
    cvc

    {state: , message: , stripeid: }

    id
    token

    {state: , message: , stripeid: }

    DELETE

    @@ -43,19 +53,29 @@ stripe
    account_number
    routing_number

    {state: , stripeid: }
    {state: , message: , stripeid: }

    id
    token

    {state: , message: , stripeid: }

    PUT/PATCH
    id
    account_number
    routing_number

    {state: , stripeid: }
    {state: , message: , stripeid: }

    id
    token

    {state: , message: , stripeid: }

    DELETE
    id

    {state: }
    {state: , message: }

    charge
    POST
    @@ -65,4 +85,8 @@ stripe
    fee

    {state: , message: , chargeid: }

    token
    GET
    id

  2. A412 revised this gist Jul 18, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions stripe_api
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,8 @@ first two indentations are paths
    CAPITALS are request methods
    last identation is queries
    return is in {}
    state is 1 for failure 0 for anything else
    message is failure message
    state is 1 for success 0 for anything else
    message is "success" or failure message
    stripeid/chargeid is stripe internal id for object, already written to firebase so no need to
    site will use HTTPS/SSL in future but currently does not so stick to test ccs / bank accounts
    available from https://stripe.com/docs/testing
  3. A412 revised this gist Jul 18, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions stripe_api
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,8 @@ return is in {}
    state is 1 for failure 0 for anything else
    message is failure message
    stripeid/chargeid is stripe internal id for object, already written to firebase so no need to
    site will use HTTPS/SSL in future but currently does not so stick to test ccs / bank accounts
    available from https://stripe.com/docs/testing

    example request
    curl -X POST www.geeni.org/stripe/customer?id=5ytnsd58DmdNV6OCfg4voI6WhkA2&cc=4242424242424242&expm=07&expy=19&cvc=788
  4. A412 revised this gist Jul 18, 2016. 1 changed file with 29 additions and 12 deletions.
    41 changes: 29 additions & 12 deletions stripe_api
    Original file line number Diff line number Diff line change
    @@ -1,49 +1,66 @@
    base url is www.geeni.org

    first two indentations are paths
    CAPITALS are request methods
    last identation is queries
    return is in {}
    state is 1 for failure 0 for anything else
    message is failure message
    stripeid/chargeid is stripe internal id for object, already written to firebase so no need to

    example request
    curl -X POST www.geeni.org/stripe/customer?id=5ytnsd58DmdNV6OCfg4voI6WhkA2&cc=4242424242424242&expm=07&expy=19&cvc=788

    stripe
    customer
    post
    POST
    id
    cc
    expm
    expy
    cvc

    {state: , stripeid: }
    {state: , message: , stripeid: }

    put
    PUT/PATCH
    id
    cc
    expm
    expy
    cvc

    {state: , stripeid: }
    {state: , message: , stripeid: }

    delete
    DELETE

    {state: }
    {state: , message: }

    account
    post
    tutor
    POST
    id
    account_number
    routing_number

    {state: , stripeid: }

    put
    PUT/PATCH
    id
    account_number
    routing_number

    {state: , stripeid: }

    delete
    DELETE
    id

    {state: }

    charge
    post
    POST
    from_id
    to_id
    amount
    fee

    {state: , stripeid: }
    {state: , message: , chargeid: }

  5. A412 created this gist Jul 17, 2016.
    49 changes: 49 additions & 0 deletions stripe_api
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    stripe
    customer
    post
    id
    cc
    expm
    expy
    cvc

    {state: , stripeid: }

    put
    cc
    expm
    expy
    cvc

    {state: , stripeid: }

    delete

    {state: }

    account
    post
    id
    account_number
    routing_number

    {state: , stripeid: }

    put
    account_number
    routing_number

    {state: , stripeid: }

    delete

    {state: }

    charge
    post
    from_id
    to_id
    amount

    {state: , stripeid: }