Giter Site home page Giter Site logo

pay's Introduction

Getting Started with Monetary Pay API

Authorization

Authorization is easy, just insert your secret key in the Authorization header:

Authorization: secretKEYGOESHERE

Identification

Let us know who you are! Send your product name and version in the User-Agent header:

User-Agent: AwesomePOS/1.2.3

Content Types

Communicate with us in your favorite content type!

We support the following for Content-Type and Accepts values:

  • application/json
  • application/xml
  • x-www-url-encoded

Transactions

Success Responses

  • 200 OK Approved Transaction
  • 402 PAYMENT REQUIRED Declined Transaction

Failure Responses

  • 400 BAD REQUEST Invalid Transaction Request
  • 401 UNAUTHORIZED Unauthorized Transaction
  • 404 NOT FOUND Resource Not Found

Example Credit Sale Request

POST https://pay.monetary.co/v1/credit/sale

Authorization: secretKEYGOESHERE
User-Agent: AwesomePOS/1.2.3
Content-Type: application/json
Accept: application/json

{
  "Amount": "1.00",
  "Account": "4242424242424242",
  "Expiration": "1220"
}

Example Credit Sale Response

200 OK

{
  "Status": "Approved",
  "Message": "APPROVAL",
  "Account": "XXXXXXXXXXXX4242",
  "Expiration": "XXXX",
  "Brand": "VISA",
  "AuthCode": "ABC123",
  "RefNo": "123",
  "Amount": "1.00",
  "Authorized": "1.00",
  "Token": "card1ABCDEFG2"
}

Using Tokens

As you can see in the example response above, every successful transaction response will include a Token which you can use in subsequent transactions for that account!

For example, this is how to void the above example sale using the RefNo and Token it returned:

Example Credit Void Request with Token

POST https://pay.monetary.co/v1/credit/sale/123/void

Authorization: secretKEYGOESHERE
User-Agent: AwesomePOS/1.2.3
Content-Type: application/json
Accept: application/json

{
  "Token": "card1ABCDEFG2"
}

Example Credit Void Response with Token

200 OK

{
  "Status": "Approved",
  "Message": "APPROVAL",
  "Account": "XXXXXXXXXXXX4242",
  "Expiration": "XXXX",
  "Brand": "VISA",
  "RefNo": "124",
  "Amount": "1.00",
  "Authorized": "1.00",
  "Token": "card1ABCDEFG2"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.