Skip to main content

Payment Service (2022-04-07)

Download OpenAPI specification:Download

Introduction

The Dojo API is RESTful, using HTTP response codes to convey status, including successful responses and errors. Additionally, it accepts and returns JSON in the HTTP body.

Base URLs

Use the following base URL when making requests to the API: https://api.dojo.tech/

Looking for no-code solutions?

Try one of our pre-built solutions for your site.

Authentication

The Dojo API uses Basic HTTP auth. You can generate API keys in Developer Portal. Secret keys for the test environment have the prefix sk_sandbox_ and for production have the prefix sk_prod_.

You must include your secret API key in the header of all requests, for example:

curl
  --header 'content-type: application/json' \
  --header 'Authorization: Basic sk_prod_your_key' \
...

API requests without authentication will fail.

HTTP Responses

The API returns standard HTTP response codes RFC 7231 on each request to indicate the success or otherwise of API requests. HTTP status codes summary are listed below:

  • 200 OK—The request was successful.

  • 201 Created—The request was successful, and a new resource was created as a result.

  • 204 No Content—The request was successful, but there is no content to send.

  • 400 Bad Request—Bad request, probably due to a syntax error.

  • 401 Unauthorized—Authentication required.

  • 403 Forbidden—The API key doesn't have permissions.

  • 404 Not Found—The resource doesn't exist.

  • 405 Method Not Allowed—The request method is known by the server but isn't supported by the target resource.

  • 409 Conflict—The request couldn't be completed because it conflicted with another request or the server's configuration.

  • 500, 502, 503, 504 Server Errors—An error occurred with our API.

Errors

Dojo follows the error response format proposed in RFC 7807 also known as Problem Details for HTTP APIs. All errors are returned in the form of JSON.

Error Schema

In case of an error, the response object contains the following fields:

  • errors [object]—A human-readable explanation of errors.

  • type [string]— A URI reference RFC 3986 that identifies the problem type.

  • title [string]—A short, human-readable summary of the error.

  • status [integer]—The HTTP status code.

  • detail [string]—A human-readable message giving more details about the error. Not always present.

  • traceId [string]—The unique identifier of the failing request.

The following example shows a possible error response:

{
    "errors": {
        "Reference": [
            "The Reference field is required."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-a405f077df056a498323ffbcec05923f-aa63e6f4dbbc734a-01",
}

Versioning

Dojo API uses the yyyy-mm-dd API version-naming scheme. You have to pass the version as the version header in all API calls, for example:

curl
  --header 'content-type: application/json' \
  --header 'Authorization: Basic sk_prod_your_key' \
  --header 'version: 2022-04-07' \

When we make breaking changes to the API, we release new dated versions.

The current version is 2022-04-07.

Payment intents

Allows you to take and manage payments.

Documentation: Payment intents

Create a payment intent

Creates a payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
CaptureMode (string)

The type of capture for the payment:

required
Money (object)

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

reference
required
string [ 1 .. 60 ] characters

Details of the reference for the payment.

description
string or null <= 4096 characters

The payment description.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

(TransactionSource (string or null))

Information about the transaction source type.

(PaymentIntentConfigRequest (object or null))

Details about the payment intent configuration.

(RequestSecurity (object or null))

Customer's device information.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(ActionLink (object or null))

The link to the payment's associated actions.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

Content type
application/json
{
  • "amount": {
    },
  • "reference": "Order 234",
  • "description": "Demo payment intent"
}

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Retrieve a payment intent

Retrieves the details of a payment intent.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/payment-intents/pi_sandbox_RBMHTJ4fIkmSppDILZVCGw", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Cancel a payment intent

Cancels a payment intent. The payment intent can be canceled if it's in the Created status. After cancellation, the payment intent will change the status to Canceled and any operations on the payment intent will fail with an error.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/payment-intents/pi_sandbox_RBMHTJ4fIkmSppDILZVCGw", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Canceled",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Charge a card

Allows you to charge a card later. This is available for merchant-initiated transactions only.

path Parameters
paymentIntentId
required
string or null
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
paymentIntentId
string or null

Unique identifier for the payment intent.

status
string
Enum: "Created" "Successful" "Declined" "Failed"

Current capture status.

message
string

The description of the operation.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/payment-intents/pi_sandbox_RBMHTJ4fIkmSppDILZVCGw/charge", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "paymentIntentId": "string",
  • "status": "Created",
  • "message": "string"
}

Update a client session secret

Updates a client session secret.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/payment-intents/pi_sandbox_RBMHTJ4fIkmSppDILZVCGw/refresh-client-session-secret", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Change tip amount

Changes tips amount for a payment intent. Available if you allowed tips when creating this payment intent.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
required
Money (object)

The tips amount.

One of
value
required
integer <int64>

The amount in the minor unit, for example "100" for 1.00 GBP.

currencyCode
required
string [ 1 .. 10 ] characters

Three-letter currency code in ISO 4217 alpha-3 format.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

Content type
application/json
{
  • "tipsAmount": {
    }
}

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Change a payment intent amount

Changes the amount for a payment intent. Available if you allowed the amount changes when creating this payment intent.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
required
Money (object)

The amount intended to be collected by this payment intent.

One of
value
required
integer <int64>

The amount in the minor unit, for example "100" for 1.00 GBP.

currencyCode
required
string [ 1 .. 10 ] characters

Three-letter currency code in ISO 4217 alpha-3 format.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the payment intent.

captureMode
string
Default: "Auto"
Enum: "Auto" "Manual"
clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

(PaymentDetails (object or null))

Details about the payment.

status
string
Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled"

Current status of the payment intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Money (object or null))

The amount intended to be collected by this payment intent.

(Money (object or null))

The tips amount.

(Money (object or null))

The amount that was requested by this Payment intent.

(Money (object or null))

The total amount after applying discounts and taxes.

refundedAmount
integer or null <int64>

The amount that was refunded.

(Customer (object or null))

Details about the customer.

(RequestSecurity (object or null))

Customer's device information.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(Money (object or null))

The total amount after applying discounts and taxes.

Array of objects or null

The line items purchased by the customer.

Array of objects or null

The taxes applied to the items.

(ActionLink (object or null))

The link to the payment's associated actions.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

expireAt
string or null <date-time>

The timestamp and date of when a payment intent will be voided, in ISO 8601 UTC format. This occurs when a payment intent is created and not yet authorized. If null, the payment intent is voided after 30 days.

autoExpireIn
string or null <timespan>

The time interval after which paymentIntent: Manual will be captured or reversed, in dd.hh:MM:ss format. The timestamp value must be more than 30 seconds and less than 7 days.

(AutoExpireAction (string or null))

The action that happens with the Manual payment intent after the time interval is set in autoExpireIn parameter.

object or null

A set of key-value pairs that you can use for storing additional information.

setupIntentId
string or null

Unique identifier for the setup intent.

Array of objects or null

The past events of the payment.

Request samples

Content type
application/json
{
  • "amount": {
    }
}

Response samples

Content type
application/json
{
  • "id": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "captureMode"": "Auto",
  • "clientSessionSecret": "lmoFsbTJxoiOBgeWkEoFS05ADIQ6STJfJE3oGVNO2cFSb9kza06wGan2DVNceOYCsmZ5I1SiEioFausOAkecUPz8BKSmMV96ecXZZ4-NzoiYZJF0uVYeW8xosG6blQKtZ6HqIIF8--2a7DC_iQ==",
  • "clientSessionSecretExpirationDate": "2022-02-21T15:09:21Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "amount": {
    },
  • "totalAmount": {
    },
  • "createdAt": "2022-02-21T14:39:21.6050276Z",
  • "updatedAt": "2022-02-21T14:39:21.6050277Z",
  • "reference": "Order 234",
  • "description": "Demo payment intent",
  • "itemLines": [ ],
  • "taxLines": [ ],
  • "metadata": { }
}

Send a receipt

Sends a receipt to the email addresses you specified.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
emails
required
Array of strings

The list of email addresses to which the receipt should be sent.

Responses

Request samples

Content type
application/json
{
  • "emails": [
    ]
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Refunds

Allows you to manage a refund for payments.

Documentation: Refunds

Create a refund

Creates a refund. Refund allows you to return a payment that has previously been created but not yet refunded. You can refund the full amount or a partial amount.

path Parameters
paymentIntentId
required
string

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

idempotencyKey
required
string <= 100 characters

An idempotency key to recognize subsequent retries of the same request. How you generate the idempotency key is up to you. Must be unique for each new refund for the payment intent.

Request Body schema: application/json
required
amount
required
integer <int64>

The refund amount.

refundReason
string or null <= 1024 characters

The reason for the refund.

notes
string or null <= 4096 characters

The description of the refund.

Responses

Response Schema: application/json
paymentIntentId
string or null

Unique identifier for the payment intent.

refundId
string or null

Unique identifier for the refund.

refundReason
string or null

The reason for the refund.

notes
string or null

The description of the refund.

Request samples

Content type
application/json
{
  • "amount": 1000,
  • "refundReason": "Demo refund"
}

Response samples

Content type
application/json
{
  • "paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "refundId": "rfnd_127usj",
  • "refundReason": "Demo refund",
  • "notes": null
}

Retrieve a refund

Retrieves the details of a refund that has previously been created.

path Parameters
refundId
required
string <= 50 characters

Unique identifier for the refund.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
paymentIntentId
string or null

Unique identifier for the payment intent.

refundId
string or null

Unique identifier for the refund.

refundReason
string or null

The reason for the refund.

notes
string or null

The description of the refund.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/payment-intents/refunds/%7BrefundId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  • "refundId": "rfnd_127usj",
  • "refundReason": "Demo refund",
  • "notes": null
}

Reversal

Allows you to create a reversal for payments.

Documentation: Reversal

Create a reversal

Reverses a payment intent.

path Parameters
paymentIntentId
required
string

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
message
string or null

The description of the operation.

reversalId
string or null

Unique identifier for the reversal.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/payment-intents/%7BpaymentIntentId%7D/reversal", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "message": null,
  • "reversalId": "rvs_127usj"
}

Captures

Allows you to capture the full payment amount or part of the amount.

Documentation: Captures

Captures a payment

Captures a payment intent that has previously been created but not yet refunded or reversed. You can capture the full amount or a partial amount.

path Parameters
paymentIntentId
required
string
Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw

Unique identifier for the payment intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
amount
required
integer <int64>

The amount to capture. You can capture the full amount or a partial amount.

Responses

Response Schema: application/json
message
string or null

The description of the operation.

captureId
string or null

Unique identifier for the capture.

Request samples

Content type
application/json
{
  • "amount": 1000
}

Response samples

Content type
application/json
{
  • "message": "Demo capture",
  • "captureId": "cp_itIiJMEAvES3ynYF_Yhs2g"
}

Webhooks

Webhooks notify you when a specific event has occurred.

Documentation: Webhooks

List all events

Retrieves a list of all events.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
Array
model
string

The webhook type.

events
Array of strings

The list of events.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/webhooks/events", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

List all subscriptions

Retrieves a list of all subscriptions.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
Array
id
string

Unique identifier for the subscription.

accountId
string or null

Unique identifier for the account.

events
Array of strings

The list of events.

url
string <uri> non-empty ^https://*.+

The URL of your webhook endpoint.

description
string or null

The subscription description.

Array of objects

The list of subscription’s secrets, used to generate signatures.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/webhooks", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
[
  • {
    }
]

Subscribe to an event

Creates a new subscription.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
events
required
Array of strings

The list of events.

url
required
string <uri> non-empty ^https://*.+

The URL of your webhook endpoint.

description
string or null

The subscription description.

Responses

Response Schema: application/json
id
string

Unique identifier for the subscription.

accountId
string or null

Unique identifier for the account.

events
Array of strings

The list of events.

url
string <uri> non-empty ^https://*.+

The URL of your webhook endpoint.

description
string or null

The subscription description.

Array of objects

The list of subscription’s secrets, used to generate signatures.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "ws_aNkU6yob0vOMxUlghg2oynUw",
  • "accountId": "acc_4z3k2xP17e1JQY",
  • "events": [
    ],
  • "description": "Demo webhooks",
  • "secrets": [
    ],
  • "createdAt": "2022-03-30T12:21:04.143Z",
  • "updatedAt": "2022-03-30T12:21:04.143Z"
}

List all secrets

Retrieves a list of all secrets.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string

Unique identifier for the subscription.

Array of objects

The list of subscription’s secrets, used to generate signatures.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/webhooks/%7BsubscriptionId%7D/secrets", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "ws_lgQzejyXb0SD8oIDE2zcqA",
  • "secrets": [
    ]
}

Generate a secret

Generates a new secret.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string

Unique identifier for the subscription.

Array of objects

The list of subscription’s secrets, used to generate signatures.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/webhooks/%7BsubscriptionId%7D/secrets", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "secrets": [
    ]
}

Activate a secret

Activates a secret.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

secretId
required
string

Unique identifier for the secret.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("PUT", "/webhooks/%7BsubscriptionId%7D/secrets/%7BsecretId%7D/activate", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Delete a secret

Deletes a secret.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

secretId
required
string

Unique identifier for the secret.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/webhooks/%7BsubscriptionId%7D/secrets/%7BsecretId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Update a subscription

Updates you subscription details. You can change the URL or the list of events.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
events
Array of strings or null

The list of events.

url
string or null <uri> ^https://*.+

The URL of your webhook endpoint.

description
string or null

The subscription description.

Responses

Response Schema: application/json
id
string

Unique identifier for the subscription.

accountId
string or null

Unique identifier for the account.

events
Array of strings

The list of events.

url
string <uri> non-empty ^https://*.+

The URL of your webhook endpoint.

description
string or null

The subscription description.

Array of objects

The list of subscription’s secrets, used to generate signatures.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

Request samples

Content type
application/json
{
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ws_aNkU6yob0vOMxUlghg2oynUw",
  • "accountId": "acc_4z3k2xP17e1JQY",
  • "events": [
    ],
  • "description": "Demo webhooks",
  • "secrets": [
    ],
  • "createdAt": "2022-03-30T12:21:04.143Z",
  • "updatedAt": "2022-03-30T12:21:04.143Z"
}

Delete a subscription

Deletes a subscription.

path Parameters
subscriptionId
required
string

Unique identifier for the subscription.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/webhooks/%7BsubscriptionId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Customers

Allows to create and manage a customer of your business.

Create a customer

Creates a new customer.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
name
string or null <= 100 characters

The customer's name.

(Address (object or null))

The address where to send the order.

(Address (object or null))

The address where to send the invoice.

emailAddress
string or null <= 254 characters

The customer's email address.

phoneNumber
string or null [ 5 .. 50 ] characters

The customer's phone number.

vatNumber
string or null <= 50 characters

The VAT number of the customer.

Responses

Response Schema: application/json
id
string or null

Unique identifier of the customer.

name
string or null

The customer's name.

(Address (object or null))

The address where to send the order.

(Address (object or null))

The address where to send the invoice.

emailAddress
string or null

The customer's email address.

phoneNumber
string or null

The customer's phone number.

vatNumber
string or null

The VAT number of the customer.

createdAt
string or null <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string or null <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

documentVersion
integer <int32>

The version of the customer's data, updated with every change.

Request samples

Content type
application/json
{
  • "name": "Alex",
  • "emailAddress": "alex@dojo.com"
}

Response samples

Content type
application/json
{
  • "id": "cs_qNkU6yob0vOMxUlb2oynUw",
  • "name": "Alex",
  • "emailAddress": "alex@dojo.com",
  • "documentVersion": 0,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete a customer

Deletes a customer.

path Parameters
customerId
required
string <= 100 characters
Example: cust_qNkU6yob0vOMxUlb2oynUw

Unique identifier of the customer.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/customers/cust_qNkU6yob0vOMxUlb2oynUw", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Update information about a customer

Updates information about a customer.

path Parameters
customerId
required
string
Example: cs_qNkU6yob0vOMxUlb2oynUw

Unique identifier of the customer.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
name
string or null <= 100 characters

The customer's name.

(Address (object or null))

The address where to send the invoice.

(Address (object or null))

The address where to send the order.

emailAddress
string or null <= 254 characters

The customer's email address.

phoneNumber
string or null [ 5 .. 50 ] characters

The customer's phone number.

vatNumber
string or null <= 50 characters

The VAT number of the customer.

Responses

Response Schema: application/json
id
string or null

Unique identifier of the customer.

name
string or null

The customer's name.

(Address (object or null))

The address where to send the order.

(Address (object or null))

The address where to send the invoice.

emailAddress
string or null

The customer's email address.

phoneNumber
string or null

The customer's phone number.

vatNumber
string or null

The VAT number of the customer.

createdAt
string or null <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string or null <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

documentVersion
integer <int32>

The version of the customer's data, updated with every change.

Request samples

Content type
application/json
{
  • "phoneNumber": "078976534161"
}

Response samples

Content type
application/json
{
  • "id": "cs_qNkU6yob0vOMxUlb2oynUw",
  • "name": "Alex",
  • "emailAddress": "alex@dojo.com",
  • "phoneNumber": "078976534161",
  • "documentVersion": 1,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2021-07-24T14:15:22Z"
}

Retrieve a customer

Retrieves the details of a customer.

path Parameters
customerId
required
string or null

Unique identifiers for the customers you want to get information about, separated by commas.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
Array
id
string or null

Unique identifier of the customer.

name
string or null

The customer's name.

(Address (object or null))

The address where to send the order.

(Address (object or null))

The address where to send the invoice.

emailAddress
string or null

The customer's email address.

phoneNumber
string or null

The customer's phone number.

vatNumber
string or null

The VAT number of the customer.

createdAt
string or null <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string or null <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

documentVersion
integer <int32>

The version of the customer's data, updated with every change.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/customers/%7BcustomerId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
[
  • {
    }
]

Create a customer secret

Creates a unique customer secret key valid within a scope of time.

path Parameters
customerId
required
string or null <= 100 characters
Example: cust_qNkU6yob0vOMxUlb2oynUw

Unique identifier of the customer.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
secret
string or null

Unique identifier for the secret.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

expireAt
string <date-time>

The timestamp at which the customer secret expires, in ISO 8601 UTC format.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/customers/cust_qNkU6yob0vOMxUlb2oynUw/create-secret", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "secret": "cs_qNkU6yob0vOMxUlb2oynUw",
  • "createdAt": "2022-10-31T10:15:00Z",
  • "expireAt": "2022-10-31T10:30:22Z"
}

Retrieve payment method

Retrieves available payment methods for a customer.

path Parameters
customerId
required
string or null <= 100 characters
Example: cust_qNkU6yob0vOMxUlb2oynUw

Unique identifier of the customer.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

authorization
required
string or null <= 500 characters
Example: Authorization: Basic cs_generated-customer-secret

Basic HTTP authentication to grant access to customer-owned resources.

Responses

Response Schema: application/json
customerId
string or null

Unique identifier of the customer.

merchantId
string or null

Unique identifier of the merchant.

Array of objects or null

List of the customer saved payment methods.

(SupportedPaymentMethods (object or null))

Supported payment methods.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'authorization': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/customers/public/cust_qNkU6yob0vOMxUlb2oynUw/payment-methods", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "customerId": "cust_qNkU6yob0vOMxUlb2oy123",
  • "merchantId": "123456789",
  • "savedPaymentMethods": [
    ],
  • "supportedPaymentMethods": {
    }
}

Remove payment method

Delete a customer payment method.

path Parameters
customerId
required
string or null <= 100 characters
Example: cust_qNkU6yob0vOMxUlb2oynUw

Unique identifier of the customer.

paymentMethodId
required
string or null <= 100 characters
Example: pm_otRL98WURbaAKs0sdy7_5w

Unique identifier of the customer payment method.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

authorization
required
string or null <= 500 characters
Example: Authorization: Basic cs_generated-customer-secret

Basic HTTP authentication to grant access to customer-owned resources.

Responses

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'authorization': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/customers/public/cust_qNkU6yob0vOMxUlb2oynUw/payment-methods/pm_otRL98WURbaAKs0sdy7_5w", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "traceId": "string",
  • "errors": {
    }
}

Setup intents

Allows you to setup a card for future payments.

Create a setup intent

Creates a setup intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Request Body schema: application/json
required
reference
required
string [ 1 .. 60 ] characters

Details of the reference for the payment.

description
string or null <= 4096 characters

The payment description.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

(Customer (object or null))

Details about the customer.

CaptureMode (string)

The type of capture for the payment:

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

(PaymentIntentConfigRequest (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

required
object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
required
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
required
string [ 1 .. 10240 ] characters

The terms that customers are required to review before adding a card to setup intent.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Array of objects or null

Information of the setup intent.

Request samples

Content type
application/json
{
  • "reference": "string",
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string",
  • "setupEvents": [
    ]
}

Retrieve a setup intent

Get a setup intent by ID.

path Parameters
setupIntentId
required
string or null

Unique identifier for the setup intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Array of objects or null

Information of the setup intent.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/setup-intents/%7BsetupIntentId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string",
  • "setupEvents": [
    ]
}

Cancel a setup intent

Cancels a setup intent.

path Parameters
setupIntentId
required
string or null <= 50 characters

Unique identifier for the setup intent.

query Parameters
includeAuthorized
boolean

Default: false. Set to true to also delete the authorized setup intents and to update their statuses to Closed.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Array of objects or null

Information of the setup intent.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("DELETE", "/setup-intents/%7BsetupIntentId%7D?includeAuthorized=SOME_BOOLEAN_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string",
  • "setupEvents": [
    ]
}

Retrieve a setup intent (no auth)

Get a setup intent by ID

path Parameters
setupIntentId
required
string or null

The unique ID of the setup intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("GET", "/setup-intents/public/%7BsetupIntentId%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string"
}

Update a client session secret

Updates a client session secret.

path Parameters
setupIntentId
required
string or null

The unique ID of the setup intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Array of objects or null

Information of the setup intent.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/setup-intents/%7BsetupIntentId%7D/refresh-client-session-secret", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string",
  • "setupEvents": [
    ]
}

Update a client session secret (no auth)

Updates a client session secret.

path Parameters
setupIntentId
required
string or null

The unique ID of the setup intent.

header Parameters
version
required
string <date>
Example: 2022-04-07

API version with format yyyy-mm-dd. Current version is 2022-04-07. Today's date will always give you the latest version.

Responses

Response Schema: application/json
id
string or null

Unique identifier for the setup intent.

clientSessionSecret
string or null

The client secret.

clientSessionSecretExpirationDate
string <date-time>

The expiration date of clientSessionSecret.

status
string
Enum: "Created" "Authorized" "Canceled" "Completed" "Expired" "CardExpired" "Closed"

Current status of the setup intent.

paymentMethods
Array of strings or null
Enum: "Card" "Wallet"

The payment methods that customers can use to pay.

(Customer (object or null))

Details about the customer.

(Address (object or null))

The address where to send the invoice.

(ShippingDetails (object or null))

The address where to send the order.

createdAt
string <date-time>

The timestamp of the create date, in ISO 8601 UTC format.

updatedAt
string <date-time>

The timestamp of the update date, in ISO 8601 UTC format.

expireAt
string or null <date-time>

The timestamp and date of when a setup intent will be voided, in ISO 8601 UTC format. This occurs when a setup intent is created and not yet authorized.

reference
string or null

Details of the reference for the payment.

description
string or null

The payment description.

(MerchantConfig (object or null))

Details of payment intent merchant configuration.

(PaymentIntentConfigResponse (object or null))

Details about the payment intent configuration.

object or null

A set of key-value pairs that you can use for storing additional information.

object or null

The amount intended to be collected by this setup intent.

merchantInitiatedTransactionType
string
Enum: "NoShow" "Unscheduled"

Details about the merchant initiated transaction type.

terms
string or null

The terms that customers are required to review before adding a card to setup intent.

Request samples

import http.client

conn = http.client.HTTPSConnection("api.dojo.tech")

headers = {
    'version': "SOME_STRING_VALUE",
    'Authorization': "REPLACE_KEY_VALUE"
    }

conn.request("POST", "/setup-intents/public/%7BsetupIntentId%7D/refresh-client-session-secret", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response samples

Content type
application/json
{
  • "id": "string",
  • "clientSessionSecret": "string",
  • "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
  • "status": "Created",
  • "paymentMethods": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingDetails": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "expireAt": "2019-08-24T14:15:22Z",
  • "reference": "string",
  • "description": "string",
  • "merchantConfig": {
    },
  • "config": {
    },
  • "metadata": {
    },
  • "intendedAmount": {
    },
  • "merchantInitiatedTransactionType": "NoShow",
  • "terms": "string"
}