Code Monkey home page Code Monkey logo

intro_epayment's Introduction

SIMPLE-PAYMENT-INTRO

Endpoints

Pay (POST, /version/pay)

This performs a whole payment process from create to capture

  • Create payment
  • Tokenize payment
  • Capture payment

An endpoint with a UI is also available

  • Version 1 (/v1)
  • Version 2 (/v2)

*Not all fields are present in the UI

{
    "amount": {
        "currency": "EUR",
        "value": 2500
    },
    "card": {
        "cardholderName": "Wile E. Coyote",
        "cardNumber": "4567350000427977",
        "expiryMonth": "12",
        "expiryYear": "20",
        "cvv": "123"
    }
}

Create Payment (POST, /payments/create)

Initiate a payment by posting all the required payment details

{
    "amount": {
        "currency": "EUR",
        "value": 2500
    },
    "card": {
        "cardholderName": "Wile E. Coyote",
        "cardNumber": "4567350000427977",
        "expiryMonth": "12",
        "expiryYear": "20",
        "cvv": "123"
    }
}
Capture Payment (POST, /payments/capture/:paymentId)

This will make the transaction eligible to be captured. Depending on the payment product and the 3rd party used to process the payment this might be done in real-time or in more off-line batch like fashion.

{
    "amount": 1000
}
Get Payment Status (GET, /payments/check/:paymentId)

Retrieves the details of a payment that has previously been created by suppling the unique paymentId that was returned to you with the create payment request.

GET /payments/check/000000238700000001300000100001
Refund Payment (POST, /payments/refund/:paymentId)

Refunds any transaction.

{
    "amount": {
        "currency": "EUR",
        "value": 10
    }
}
Cancel Payment (POST, /payments/cancelPayment/:paymentId)

This makes it impossible to process the payment any further and will also try to reverse an authorization on a card.

POST /payments/cancelPayment/000000238700000001300000100001
Cancel Approval (POST, /payments/cancelApproval/:paymentId)

Cancels the capture request made for the payment transaction.

POST /payments/cancelApproval/000000238700000001300000100001

If request body is missing, it will provide default values based on ingenico's sample requests


Versions

Version 1

Makes use of ingenico's connect-sdk.

Version 2

Consumes ingenico's payment API without using the connect-sdk

intro_epayment's People

Contributors

ypt3 avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

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.