Checkout API (2019-05-01)

Download OpenAPI specification:Download

API Integration Support: integration@dintero.com License: UNLICENSED

Changelog

All notable changes to the API.

2019-07-01

fix: Transaction.status typo, rename PARTICALLY_CAPTURED_REFUNDED to PARTIALLY_CAPTURED_REFUNDED.

changed: replaced card payment type with payex. The payex payment type adds support for payment product types:

  • payex.creditcard
  • payex.swish

changed: Add support for optional custom expires_at parameter when creating a new session either directly or from a profile.

changed: Add support for override of configuration when creating a new session from a profile.

new: support cancel of session

changed: In SessionBase, extend order with partial_payment property that can be used in case where the payment is partial and the order.amount is less or equal to the order.items.amount.

2019-06-01

break: Pay with instabank.finance type requires now additional properties to comply with new regulations from Finanstilsynet.

changed: Remove instabank.installment and instabank.postponement payment type. The types will no longer be accepted by:

2019-05-01

In SessionMeta renamed field expiry_at to expires_at.

new: PaymentConfiguration extended with optional auto_capture boolean field. If set to true the checkout serivce will automatically capture the payment after the transaction is AUTHORIZED.

new: Add support for checkout with SMS. A SMS with link to the checkout can now be sent when a new session is created. See relevant resources for more information.

2019-04-01

fix: Fix documentation for the response from api-keys endpoints. No gateways property will be included in response to api-keys requests.

doc: Document support for JWT Bearer authentication. Use API client to get an JWT access token.

2019-03-01

break: Administration of checkout gateways was moved to new endpoints. Gateway configuration will no longer be supported via the PUT /admin/checkout endpoint.

removed:

  • POST /admin/gateways/{gateway} (check gateway status)

new: Extend transaction.event with created_by property. Include the user who created the event, i.e. applied an operation to the transaction.

2019-01-31

new: Add support for checkout with QR-Code A QR Code can now be generated for a Checkout Session or a Sale Location. See relevant resource for more information.

new: Add support for filter transactions with query parameters. Transactions can now be filtered on: status, payment_product, merchant_reference, session_id, amount and created_at.

2018-11-24

new: Add support for session.url.callback_url. Get system-to-system notification when session payment is completed.

Authentication

JWT

Bearer authentication (also called token authentication) should be used when accessing the API.

Use Get Token to get an access token for client credentials

Authorization by using the Bearer schema The content of the header should look like the following:

Authorization: Bearer {access_token}

where the access_token is JSON Web Tokens (JWT).

Security scheme type: API Key
Header parameter name: Authorization

apikey

X-API-Key authentication for accessing regular endpoints. Use Create api-key to create a key.

The content of the header should look like the following:

x-api-key: {api_key}
Security scheme type: API Key
Header parameter name: x-api-key

adminKey

X-API-Key authentication for accessing admin endpoints. Use Create api-key to create a key.

The content of the header should look like the following:

x-api-key: {api_key}
Security scheme type: API Key
Header parameter name: x-api-key

session

A Checkout Session relates to an order in your system. When an order has been placed you create a corresponding Checkout Session to receive payment for that order.

Create checkout session from profile

post /sessions-profile
https://checkout.dintero.com/v1/sessions-profile

Create a corresponding Checkout Session for an order placed in your system using predefined session profile

Session with Instabank

Note that items is a required property when creating a session with Instabank configured.

scopes:

  • admin:checkout
  • write:checkout
Authorizations:
Request Body schema: application/json
order
required
object
url
required
object
profile_id
required
string

configuration profile

customer
object
expires_at
string <date-time>
configuration
object

Override configuration for the profile.

Responses

200

checkout session created

400

Bad / Invalid request

401

Access forbidden, invalid JWT token was used

403

Forbidden

500

Unexpected Error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "url":
    {},
  • "customer":
    {
    },
  • "order":
    {
    },
  • "expires_at": "2019-07-12T11:27:09Z",
  • "configuration":
    {
    },
  • "profile_id": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{}

Create a checkout session

post /sessions
https://checkout.dintero.com/v1/sessions

Create a corresponding Checkout Session for an order placed in your system

Session with Instabank

Note that items is a required property when creating a session with Instabank configured.

scopes:

  • admin:checkout
  • write:checkout
Authorizations:
Request Body schema: application/json
order
required
object
url
required
object
configuration
required
object (PaymentConfiguration)
customer
object
expires_at
string <date-time>

Responses

200

checkout session created

400

Bad / Invalid request

401

Access forbidden, invalid JWT token was used

403

Forbidden

500

Unexpected Error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "url":
    {},
  • "customer":
    {
    },
  • "order":
    {
    },
  • "expires_at": "2019-07-12T11:27:09Z",
  • "configuration":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{}

List checkout sessions

get /sessions
https://checkout.dintero.com/v1/sessions

List all Checkout session scopes:

  • admin:checkout
  • read:checkout
Authorizations:
query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

starting_after
string <checkout-id>

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

200

list checkout sessions

400

Bad / Invalid request

401

Access forbidden, invalid JWT token was used

403

Forbidden

500

Unexpected Error

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get checkout session details

get /sessions/{session_id}
https://checkout.dintero.com/v1/sessions/{session_id}

scopes:

  • admin:checkout
  • read:checkout
Authorizations:
path Parameters
session_id
required
string <checkout-id>

The session ID

Responses

200

checkout session

400

Bad / Invalid request

401

Access forbidden, invalid JWT token was used

403

Forbidden

404

Resource was not found

500

Unexpected Error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "created_at": "2019-07-12T11:27:09Z",
  • "url":
    {},
  • "customer":
    {
    },
  • "order":
    {
    },
  • "expires_at": "2019-07-12T11:27:09Z",
  • "configuration":
    {
    },
  • "updated_at": "2019-07-12T11:27:09Z",
  • "customer_ip": "string",
  • "user_agent": "string",
  • "events":
    [
    ],
  • "transaction_id": "string",
  • "cancelled_by": "string",
  • "cancelled_at": "2019-07-12T11:27:09Z"
}

Cancel session

post /sessions/{session_id}/cancel
https://checkout.dintero.com/v1/sessions/{session_id}/cancel

Cancel a session

The session transaction will be voided in case where it is initialized or authorized.

Cancel is not allowed in case where the current transaction state is not initialized or authorized.

scopes:

  • admin:checkout
  • write:checkout
Authorizations:
path Parameters
session_id
required
string <checkout-id>

The session ID

Responses

200

checkout session

400

Bad / Invalid request

401

Access forbidden, invalid JWT token was used

403

Forbidden

404

Resource was not found

500

Unexpected Error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "created_at": "2019-07-12T11:27:09Z",
  • "url":
    {},
  • "customer":
    {
    },
  • "order":
    {
    },
  • "expires_at": "2019-07-12T11:27:09Z",
  • "configuration":
    {