The Dojo API is a REST API, using HTTP response codes to convey status, including successful responses and errors. Additionally, it accepts and returns JSON in the HTTP body. For information on the latest development progress, visit the changelog.
Use the following base URL when making requests to the API: https://api.dojo.tech/
The Dojo API uses Basic HTTP authentication. You can generate API keys in the Developer Portal.
Secret keys for the test environment use the prefix sk_sandbox_
. Production keys use the prefix sk_prod_
.
You must include your secret API key in the header of all requests, for example:
--header 'content-type: application/json' \
--header 'Authorization: Basic sk_prod_your_key' \
API requests without authentication will fail.
The following headers are required on Terminal and Terminal Sessions API requests, requests without them will fail.
reseller-id
- Identifies the reseller who sells software on behalf of the EPOS company. This value will be unique and provided by Dojo to each reseller.software-house-id
- Identifies the EPOS company whose software is generating the request. This value shouldn't be configurable, as it will remain the same for all customers using particular EPOS software. This value will be provided by Dojo.
The API returns standard HTTP response codes RFC 7231 on each request to indicate the success or otherwise of API requests. Summaries for each HTTP code 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.
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",
}
Dojo APIs use the yyyy-mm-dd API version-naming scheme. You have to pass the version as the version
header in all API calls, for example:
--header 'content-type: application/json' \
--header 'Authorization: Basic sk_prod_your_key' \
--header 'version: 2024-02-05' \
When we make breaking changes to the API, we release new dated versions.
The current version is 2024-02-05
.
Use our PHP, .NET, and mobile client libraries to build your integration.
Get help in building your integration with our code samples.
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: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
required | object The amount intended to be collected by this payment intent excluding |
(Money (object or null)) The tip amount. | |
reference required | string [ 1 .. 60 ] characters A unique identifier for the payment. For example, |
description | string or null <= 4096 characters The payment description. |
(PaymentCustomerDetails (object or null)) Details about the customer. | |
(Address (object or null)) The recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
cardHolderNotPresent | boolean or null Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
(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" "SavedCard" 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 |
autoExpireIn | string or null <timespan> The time interval after which a |
(AutoExpireAction (string or null)) | |
object or null A set of key-value pairs that you can use to store additional information. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
generateRemoteToken | boolean Set to |
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "reference": "Order 234",
- "description": "Demo payment intent",
- "captureMode": "Auto"
}
Response samples
- 200
- 400
- 401
- 403
{- "id": "pi_sandbox_G_FeegU8WESxtY_Nct8jqw",
- "captureMode": "Auto",
- "cardHolderNotPresent": false,
- "clientSessionSecretExpirationDate": "0001-01-01T00:00:00Z",
- "status": "Created",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "createdAt": "2024-04-07T23:25:44.802258Z",
- "updatedAt": "2024-04-07T23:25:44.802258Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "branding": { },
- "tradingName": "Cam Test Ltd"
}, - "paymentSource": "api",
- "expireAt": "2024-05-07T23:25:44.8023189Z",
- "metadata": {
- "location-id": "rpl_bOppxLvOEsS"
}, - "paymentEvents": [ ],
- "terminalSessionHistory": [ ]
}
Retrieve a payment intent
Retrieves the details of a payment intent.
path Parameters
paymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
query Parameters
returnCanceled | boolean If the value is |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { 'Authorization': "REPLACE_KEY_VALUE" } conn.request("GET", "/payment-intents/pi_sandbox_RBMHTJ4fIkmSppDILZVCGw?returnCanceled=SOME_BOOLEAN_VALUE", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
Response samples
- 200
- 400
- 401
- 404
{- "id": "pi_sandbox_S_zeCMipQkSG9fFmqS-ceQ",
- "captureMode": "Auto",
- "cardHolderNotPresent": false,
- "clientSessionSecret": "bHte6dGrBuOoMwOgKGG3X3s2HFKERz3rbZ2SLD-H_BU_1wy-b3IgRCIUtgm7pZXh1QJC70slbaaNvm0XUcZ7T3UL8LRUMz5HK529D23ITvv_QaeIbrV8nI6Y-pxeDuqn444VqHAEok7Ue0Wsg5HgXz327lXV_A==",
- "clientSessionSecretExpirationDate": "2024-07-25T09:19:10Z",
- "paymentDetails": {
- "transactionId": "19e4535e-ef6e-48e2-90be-d2b313c1cefd",
- "transactionDateTime": "2024-07-25T08:49:20.973410318Z",
- "message": "DEPOSITED",
- "authCode": "123456",
- "card": {
- "cardNumber": "44565300****1096",
- "cardName": "test",
- "expiryDate": "2024-12-31",
- "cardType": "VISA",
- "cardFundingType": "Unknown",
- "entryMode": "Contactless",
- "verificationMethod": "Pin"
}
}, - "status": "Captured",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "billingAddress": {
- "address1": "",
- "address2": "",
- "address3": "",
- "address4": "",
- "city": "",
- "state": "",
- "postcode": "",
- "countryCode": ""
}, - "shippingDetails": {
- "name": "",
- "address": {
- "address1": "",
- "address2": "",
- "address3": "",
- "address4": "",
- "city": "",
- "state": "",
- "postcode": "",
- "countryCode": ""
}
}, - "createdAt": "2024-07-25T08:48:38.497Z",
- "updatedAt": "2024-07-25T08:49:24.761Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI",
- "AMEX"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "branding": { },
- "tradingName": "I DIM SUM"
}, - "paymentSource": "api",
- "expireAt": "2024-08-24T08:48:38.498Z",
- "metadata": {
- "location-id": "202059233225269"
}, - "paymentEvents": [
- {
- "transactionId": "19e4535e-ef6e-48e2-90be-d2b313c1cefd",
- "transactionDateTime": "2024-07-25T08:49:20.973410318Z",
- "eventType": "AuthChallenged",
- "authCode": "",
- "cardNumber": "44565300****1096",
- "expiryDate": "2024-12-31",
- "cardType": "VISA",
- "cardholderName": "test",
- "paymentMethodId": ""
}, - {
- "transactionId": "19e4535e-ef6e-48e2-90be-d2b313c1cefd",
- "transactionDateTime": "2024-07-25T08:49:20.973410318Z",
- "eventType": "Captured",
- "authCode": "123456",
- "cardNumber": "44565300****1096",
- "expiryDate": "2024-12-31",
- "cardType": "VISA",
- "cardholderName": "test",
- "paymentMethodId": ""
}
], - "terminalSessionHistory": [ ],
- "captures": [ ]
}
Cancel a payment intent
Cancels a payment intent. If a payment intent's status is Created
, it can be canceled. After cancellation, the payment intent status will change to Canceled
and any operations will fail with an error.
path Parameters
paymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
- 404
{- "id": "pi_sandbox_6p477TZOmECe5zUHszJCCg",
- "captureMode": "Auto",
- "clientSessionSecret": "DIi9C5SJTyI4V62Eqw00_vD47U3fmFsFSRVvuY--gTRVMb1TxCmudI0Nl4GUTEHTxzwWGqIkYEXQ7aWgwZFC4rmPE8gTLN_rxGeqpihGm1YvSiuKQTREQW50TmDKUMxklbqnenGvnjdKruNFhpBFQBXR-Ni_8g==",
- "clientSessionSecretExpirationDate": "2024-02-13T02:55:34Z",
- "status": "Canceled",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "createdAt": "2024-02-13T02:25:34.17Z",
- "updatedAt": "2024-02-13T02:25:34.17Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI",
- "AMEX"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "tradingName": "Dojo Cafe (Paymentsense)"
}, - "paymentSource": "api",
- "expireAt": "2024-03-14T02:25:34.17Z",
- "metadata": {
- "location-id": "771402011592305"
}, - "paymentEvents": [ ],
- "terminalSessionHistory": [ ]
}
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 The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
paymentIntentId | string or null The unique identifier of the payment intent. |
status | string Enum: "Created" "Successful" "Declined" "Failed" Current capture status. |
message | string or null The description of the operation. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
- 403
{- "paymentIntentId": "pi_sandbox_TRVit9jxx0KLSVW48a-K_w",
- "status": "Successful",
- "message": "DEPOSITED"
}
Update a client session secret
Updates a client session secret if the current secret key has been consumed or expired. These tokens are one-time use only. If you need to retry a payment, you must generate a new token.
path Parameters
paymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
{- "id": "pi_sandbox_H8tBljY-O0GZZpHA-kC8UQ",
- "captureMode": "Auto",
- "clientSessionSecret": "y4I5IegbtuzHR-tLn4S4ONlK0felINimLd_a2x_y3h1zwKTXFRowSZG3amVGmaRBxxCqy7ynJhh8IN9mMwEpFeUPZKJyMWEFPPAmAJ8_5pPtaK11SPvUg-WT2erSkT-e34oo4dwrsBx6igxEPBCEV-OBBu74HA==",
- "clientSessionSecretExpirationDate": "2024-02-13T14:50:28Z",
- "status": "Created",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "createdAt": "2024-02-13T14:20:14.418Z",
- "updatedAt": "2024-02-13T14:20:28.2961052Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI",
- "AMEX"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "tradingName": "Dojo Cafe (Paymentsense)"
}, - "paymentSource": "api",
- "expireAt": "2024-03-14T14:20:14.418Z",
- "metadata": {
- "location-id": "771402011592305"
}, - "paymentEvents": [ ],
- "terminalSessionHistory": [ ]
}
List all payment intents
Retrieves a list of payment intents. Results are paginated. By default, the method returns up to 50 payment intents.
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
statuses | Array of strings or null Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Statuses of requested payment intents. |
startDate | string or null <date-time> Date and time from which to search, in ISO 8601 UTC format. |
endDate | string or null <date-time> Date and time expiry of search in ISO 8601 UTC format. |
(Cursor (object or null)) A cursor for use in pagination. |
Responses
Response Schema: application/json
Array of objects or null An array of payment intents. | |
before | string or null A cursor for use in pagination for the previous page. |
after | string or null A cursor for use in pagination for the next page. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "statuses": [
- "Created"
], - "startDate": "2023-08-24T14:15:22Z",
- "endDate": "2023-08-24T14:15:22Z",
- "cursor": {
- "limit": 20
}
}
Response samples
- 200
- 400
- 401
{- "data": [
- {
- "id": "string",
- "captureMode": "Auto",
- "cardHolderNotPresent": true,
- "clientSessionSecret": "string",
- "clientSessionSecretExpirationDate": "2019-08-24T14:15:22Z",
- "paymentDetails": {
- "transactionId": "string",
- "transactionDateTime": "string",
- "message": "string",
- "paymentMethodId": "string",
- "authCode": "string",
- "card": {
- "cardNumber": "string",
- "cardName": "string",
- "expiryDate": "string",
- "cardType": "string",
- "cardFundingType": "Unknown",
- "last4PAN": "string",
- "entryMode": "Contactless",
- "verificationMethod": "Pin"
}
}, - "status": "Created",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 0,
- "currencyCode": "string"
}, - "tipsAmount": {
- "value": 0,
- "currencyCode": "string"
}, - "requestedAmount": {
- "value": 0,
- "currencyCode": "string"
}, - "totalAmount": {
- "value": 0,
- "currencyCode": "string"
}, - "refundedAmount": 0,
- "customer": {
- "emailAddress": "support@dojo.com",
- "phoneNumber": "+448000443550"
}, - "requestSecurity": {
- "userAgent": null,
- "ipAddress": null,
- "device": null
}, - "billingAddress": {
- "address1": "The Brunel Building",
- "address2": "2 Canalside Walk",
- "city": "London",
- "postcode": "W2 1DG",
- "countryCode": "GB",
- "county": "UK"
}, - "shippingDetails": {
- "name": "string",
- "deliveryNotes": "string",
- "address": {
- "address1": "The Brunel Building",
- "address2": "2 Canalside Walk",
- "city": "London",
- "postcode": "W2 1DG",
- "countryCode": "GB",
- "county": "UK"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "reference": "string",
- "description": "string",
- "subtotalLineItems": {
- "value": 0,
- "currencyCode": "string"
}, - "itemLines": [
- {
- "id": "string",
- "quantity": 0,
- "name": "string",
- "category": "string",
- "modifiers": [
- {
- "name": "string",
- "amountPerModifier": {
- "value": 0,
- "currencyCode": "string"
}, - "quantity": 0,
- "id": "string"
}
], - "amountTotal": {
- "value": 0,
- "currencyCode": "string"
}
}
], - "taxLines": [
- {
- "id": "string",
- "caption": "string",
- "subCaption": "string",
- "amountTotal": {
- "value": 0,
- "currencyCode": "string"
}
}
], - "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA"
], - "wallets": [
- "APPLE_PAY"
]
}
}, - "config": {
- "title": "string",
- "customerEmail": {
- "collectionRequired": false
}, - "details": {
- "showTotal": true,
- "showReference": true
}, - "billingAddress": {
- "collectionRequired": true
}, - "shippingDetails": {
- "collectionRequired": true
}, - "payment": {
- "customAmountAllowed": true,
- "tipsAllowed": true
}
}, - "autoExpireAction": "Release",
- "expireAt": "2019-08-24T14:15:22Z",
- "autoExpireIn": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "orderDetails": {
- "availabilityDate": "2019-08-24T14:15:22Z",
- "isUpdate": true,
- "id": "string",
- "externalId": "string"
}, - "setupIntentId": "string",
- "cashbackAmount": {
- "value": 0,
- "currencyCode": "string"
}, - "serviceChargeAmount": {
- "value": 0,
- "currencyCode": "string"
}, - "terminalSessionHistory": [
- {
- "terminalSession": {
- "terminalId": "string",
- "id": "string",
- "status": "InitiateRequested",
- "expireAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "notificationEvents": [
- {
- "notificationType": "Approved",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "statusEvents": [
- {
- "status": "InitiateRequested",
- "createdAt": "2019-08-24T14:15:22Z",
- "debugMessage": "string"
}
], - "details": {
- "unlinkedRefund": {
- "amount": {
- "value": 0,
- "currencyCode": "string"
}
}, - "matchedRefund": {
- "paymentIntentId": "string",
- "amount": {
- "value": 0,
- "currencyCode": "string"
}
}, - "sale": {
- "paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw"
}, - "sessionType": "Sale"
}
}, - "payment": {
- "transactionDateTime": "string",
- "cardNumber": "string",
- "expiryDate": "string",
- "cardType": "string",
- "authGatewayTransactionId": "string",
- "cardHolderName": "string",
- "entryMode": "Contactless",
- "verificationMode": "Pin"
}
}
], - "captures": [
- {
- "id": "string",
- "amount": 0,
- "tipsAmount": 0,
- "status": "Created",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}
], - "before": "string",
- "after": "string"
}
Change tips amount
Changes tip amount for a payment intent. Available if you enabled tipping when creating the payment intent.
ParameterspaymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
required | object The amount intended to be collected by this payment intent excluding | ||||
|
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "value": 500,
- "currencyCode": "GBP"
}
Response samples
- 200
- 400
- 401
- 405
{- "id": "pi_sandbox_G_FeegU8WESxtY_Nct8jqw",
- "captureMode": "Auto",
- "cardHolderNotPresent": false,
- "clientSessionSecretExpirationDate": "0001-01-01T00:00:00Z",
- "status": "Created",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "createdAt": "2024-04-07T23:25:44.802258Z",
- "updatedAt": "2024-04-07T23:25:44.802258Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "branding": { },
- "tradingName": "Cam Test Ltd"
}, - "paymentSource": "api",
- "expireAt": "2024-05-07T23:25:44.8023189Z",
- "metadata": {
- "location-id": "rpl_bOppxLvOEsS"
}, - "paymentEvents": [ ],
- "terminalSessionHistory": [ ]
}
Change a payment intent amount
Changes the payment intent's amount. Available if you allow amount changes when creating the intent.
path Parameters
paymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
required | object The amount intended to be collected by this payment intent excluding |
Array of objects or null The line items purchased by the customer. | |
Array of objects or null The taxes applied to the items. |
Responses
Response Schema: application/json
id | string or null The unique identifier of the payment intent. |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
cardHolderNotPresent | boolean Indicates whether this transaction should be completed as Cardholder Not Present (CNP), with manual entry of card details. If the flag is true, the card machine skips the |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string <date-time> The expiration date of |
(PaymentDetails (object or null)) These details about the payment will only populate once the status of the transaction is finalized. | |
status | string Enum: "Created" "Authorized" "Captured" "Reversed" "Refunded" "Canceled" Current status of the payment intent. |
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Money (object or null)) The amount intended to be collected by this payment intent excluding | |
(Money (object or null)) The tip 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 recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 A unique identifier for the payment. For example, |
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. | |
(MerchantConfig (object or null)) Details about payment intent merchant configuration. | |
(PaymentIntentConfigResponse (object or null)) Details about the payment intent configuration. | |
(AutoExpireAction (string or null)) | |
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 |
autoExpireIn | string or null <timespan> The time interval after which a |
object or null A set of key-value pairs that you can use to store additional information. | |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
setupIntentId | string or null The unique identifier for the setup intent. |
(Money (object or null)) The amount of cashback applied. | |
(Money (object or null)) The amount of service charge applied. | |
paymentLink | string or null <uri> The URL of the generated payment link. The customer will be redirected to this URL in order to complete the payment. |
Array of objects or null The past events of the terminal session. | |
Array of objects or null Details of captured payments. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "amount": {
- "value": 5500,
- "currencyCode": "GBP"
}
}
Response samples
- 200
- 400
- 401
- 405
{- "id": "pi_sandbox_xt4SwkRZ60moZFWJ9iOKrw",
- "captureMode": "Auto",
- "cardHolderNotPresent": false,
- "clientSessionSecret": "NoK0mY76TgasoZdQ-X9xDZ3jYGDq1lMg0frwxbOVMz2xXqbRzpseN6dXtoMOzjDZVz82Y0C2xGLj4Zys1PZqu1u7F4mj9fV9aK7C7fQn90tIyp3sM3ws0U8mpgfbPc4WPAxYo8BFHkZ2PggnaUH-vL00kDbreg==",
- "clientSessionSecretExpirationDate": "2024-04-10T23:23:13Z",
- "status": "Created",
- "paymentMethods": [
- "Card"
], - "amount": {
- "value": 5500,
- "currencyCode": "GBP"
}, - "requestedAmount": {
- "value": 1000,
- "currencyCode": "GBP"
}, - "totalAmount": {
- "value": 5500,
- "currencyCode": "GBP"
}, - "refundedAmount": 0,
- "createdAt": "2024-04-10T22:52:58.037Z",
- "updatedAt": "2024-04-10T22:53:13.6644908Z",
- "reference": "Order 234",
- "description": "Demo payment intent",
- "itemLines": [ ],
- "taxLines": [ ],
- "merchantConfig": {
- "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI",
- "AMEX"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}, - "config": {
- "payment": {
- "customAmountAllowed": true,
- "tipsAllowed": true
}, - "tradingName": "Dojo Cafe (Paymentsense)"
}, - "paymentSource": "api",
- "expireAt": "2024-05-10T22:52:58.037Z",
- "metadata": {
- "location-id": "771402011592305"
}, - "paymentEvents": [ ],
- "terminalSessionHistory": [ ]
}
Send a receipt
Sends a receipt to the email addresses you specified.
path Parameters
paymentIntentId required | string or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
The email receipt request body.
emails required | Array of strings The list of email addresses to which the receipt should be sent. |
Responses
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "emails": [
- "gabriel@dojo.com",
- "mari@dojo.com"
]
}
Response samples
- 400
- 401
- 404
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "extensions": {
- "property1": null,
- "property2": null
}
}
Allows you to create a reversal for payments.
Documentation: Refunds
Create a refund
Creates a refund. Refund allows you to return a payment that has previously been created as long as there have been no incremental payments or payment attempts, including unsuccessful payment attempts. You can refund the full amount or a partial amount.
path Parameters
paymentIntentId required | string or null The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
idempotencyKey required | string or null <= 100 characters An idempotency key is used to recognize subsequent retries of the same request. How you generate the idempotency key is up to you. The key must be unique for each new refund processed on the payment intent. |
Request Body schema: application/jsonrequired
amount required | integer <int64> The refund amount. |
previousTransactionId | string or null <= 100 characters The unique identifier for the previous transaction. |
refundReason | string or null <= 1024 characters The reason for the refund. |
notes | string or null <= 4096 characters A description for the refund, if applicable. |
Responses
Response Schema: application/json
paymentIntentId | string or null The unique identifier of the payment intent. |
refundId | string or null A unique identifier for the refund. It will be used to reference this refund in all operations. It is recommended to use a UUID. |
refundReason | string or null The reason for the refund. |
notes | string or null A description for the refund, if applicable. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "amount": 1000,
- "refundReason": "Demo refund"
}
Response samples
- 200
- 400
- 401
{- "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 or null <= 50 characters A unique identifier for the refund. It will be used to reference this refund in all operations. It is recommended to use a UUID. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
paymentIntentId | string or null The unique identifier of the payment intent. |
refundId | string or null A unique identifier for the refund. It will be used to reference this refund in all operations. It is recommended to use a UUID. |
refundReason | string or null The reason for the refund. |
notes | string or null A description for the refund, if applicable. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
{- "paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
- "refundId": "rfnd_127usj",
- "refundReason": "Demo refund",
- "notes": null
}
Allows you to create a reversal for payments.
Documentation: Reversal
Create a reversal
Reverses a payment intent.
path Parameters
paymentIntentId required | string or null The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
message | string or null The description of the operation. |
reversalId | string or null The unique identifier for the reversal. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
- 409
{- "id": "rvs_127usj"
}
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 or null Example: pi_sandbox_RBMHTJ4fIkmSppDILZVCGw The unique identifier of the payment intent. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
amount required | integer <int64> The capture amount. You can capture a full or partial amount. Multiple partial captures can be made on the same total. |
tipsAmount | integer or null <int64> The tip amount. |
Responses
Response Schema: application/json
message | string or null The description of the operation. |
captureId | string or null The unique identifier for the capture. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "amount": {
- "amount": 2000
}
}
Response samples
- 200
- 400
- 401
- 409
{- "message": "Demo capture",
- "captureId": "cp_itIiJMEAvES3ynYF_Yhs2g"
}
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: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
model | string The Webhook type. |
events | Array of strings The list of events. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { 'Authorization': "REPLACE_KEY_VALUE" } conn.request("GET", "/webhooks/events", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
Response samples
- 200
- 401
- 403
[- {
- "model": "PaymentIntent",
- "events": [
- "payment_intent.created",
- "payment_intent.updated"
]
}, - {
- "model": "Payment",
- "events": [
- "payment.successful"
]
}, - {
- "model": "Order",
- "events": [
- "order.created"
]
}
]
List all subscriptions
Retrieves a list of all subscriptions.
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string The unique identifier for the subscription. |
accountId | string or null The unique identifier for the account. |
events | Array of strings The list of events. |
url | string <uri> non-empty ^https://*.+ The URL of the Webhook endpoint. |
description | string or null The subscription description. |
Array of objects The list of secrets associated with the subscription. Used to generate signatures. | |
createdAt | string <date-time> The creation date, in ISO 8601 UTC format. |
updatedAt | string <date-time> The timestamp of the update date, in ISO 8601 UTC format. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { 'Authorization': "REPLACE_KEY_VALUE" } conn.request("GET", "/webhooks", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
Response samples
- 200
- 401
- 403
{- "id": "ws_aNkU6yob0vOMxUlghg2oynUw",
- "accountId": "acc_4z3k2xP17e1JQY",
- "events": [
- "payment_intent.created",
- "payment_intent.status_updated"
], - "description": "Demo Webhooks",
- "secrets": [
- {
- "id": "sc_qNkU6yob0vOMxUlb2oynUw",
- "value": "U3Vic2NyaXB0aW9uUmVzcG9uc2VFeGFtcGxlIDogSUV4YW1wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-16T13:44:03.3242202Z",
- "isActive": true
}
], - "createdAt": "2023-03-30T12:21:04.143Z",
- "updatedAt": "2023-03-30T12:21:04.143Z"
}
Subscribe to an event
Creates a new subscription.
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
events required | Array of strings The list of events. |
url required | string <uri> non-empty ^https://*.+ The URL of the Webhook endpoint. |
description | string or null The subscription description. |
Responses
Response Schema: application/json
id | string The unique identifier for the subscription. |
accountId | string or null The unique identifier for the account. |
events | Array of strings The list of events. |
url | string <uri> non-empty ^https://*.+ The URL of the Webhook endpoint. |
description | string or null The subscription description. |
Array of objects The list of secrets associated with the subscription. Used to generate signatures. | |
createdAt | string <date-time> The creation date, in ISO 8601 UTC format. |
updatedAt | string <date-time> The timestamp of the update date, in ISO 8601 UTC format. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "events": [
- "payment_intent.created",
- "payment.successful",
- "order.created"
],
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
{- "id": "ws_aNkU6yob0vOMxUlghg2oynUw",
- "accountId": "acc_4z3k2xP17e1JQY",
- "events": [
- "payment_intent.created",
- "payment_intent.status_updated"
], - "description": "Demo Webhooks",
- "secrets": [
- {
- "id": "sc_qNkU6yob0vOMxUlb2oynUw",
- "value": "U3Vic2NyaXB0aW9uUmVzcG9uc2VFeGFtcGxlIDogSUV4YW1wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-16T13:44:03.3242202Z",
- "isActive": true
}
], - "createdAt": "2023-03-30T12:21:04.143Z",
- "updatedAt": "2023-03-30T12:21:04.143Z"
}
List all secrets
Retrieves a list of all secrets.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string The unique identifier for the subscription. |
Array of objects The list of secrets associated with the subscription. Used to generate signatures. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 401
- 403
- 404
{- "id": "ws_lgQzejyXb0SD8oIDE2zcqA",
- "secrets": [
- {
- "id": "sc_qNkU6yob0vOMxUlb2oynUw",
- "value": "U3Vic2NyaXB0aW9uUmVzcG9uc2VFeGFtcGxlIDogSUV4YW1wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-16T13:44:03.3656144Z",
- "isActive": true
}, - {
- "id": "sc_zNkU6yob0vOMxUlb2oynUw",
- "value": "FGswesdsaXB0aW9uUmVzcG9wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2020-12-13T14:15:01",
- "lastUsedAt": "2023-12-02T13:58:03.3656159Z",
- "isActive": false
}
]
}
Generate a secret
Generates a new secret.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string The unique identifier for the subscription. |
Array of objects The list of secrets associated with the subscription. Used to generate signatures. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 401
- 403
- 404
- 409
{- "secrets": [
- {
- "id": "sc_qNkU6yob0vOMxUlb2oynUw",
- "value": "U3Vic2NyaXB0aW9uUmVzcG9uc2VFeGFtcGxlIDogSUV4YW1wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-16T13:44:03.3683851Z",
- "isActive": true
}, - {
- "id": "sc_zNkU6yob0vOMxUlb2oynUw",
- "value": "FGswesdsaXB0aW9uUmVzcG9wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-02T13:58:03.3683861Z",
- "isActive": false
}
]
}
Activate a secret
Activates a secret.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
secretId required | string The unique identifier for the secret. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 401
- 403
- 404
{- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "type": "string",
- "title": "string",
- "status": 0,
- "traceId": "string",
- "detail": "string"
}
Delete a secret
Deletes a secret.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
secretId required | string The unique identifier for the secret. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 401
- 403
- 404
{- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "type": "string",
- "title": "string",
- "status": 0,
- "traceId": "string",
- "detail": "string"
}
Update a subscription
Updates your subscription details. You can change the URL or the list of events.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
events | Array of strings or null The list of events. |
url | string or null <uri> ^https://*.+ The URL of the Webhook endpoint. |
description | string or null The subscription description. |
Responses
Response Schema: application/json
id | string The unique identifier for the subscription. |
accountId | string or null The unique identifier for the account. |
events | Array of strings The list of events. |
url | string <uri> non-empty ^https://*.+ The URL of the Webhook endpoint. |
description | string or null The subscription description. |
Array of objects The list of secrets associated with the subscription. Used to generate signatures. | |
createdAt | string <date-time> The creation date, in ISO 8601 UTC format. |
updatedAt | string <date-time> The timestamp of the update date, in ISO 8601 UTC format. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "events": [
- "payment_intent.created",
- "order.created"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
{- "id": "ws_aNkU6yob0vOMxUlghg2oynUw",
- "accountId": "acc_4z3k2xP17e1JQY",
- "events": [
- "payment_intent.created",
- "payment_intent.status_updated"
], - "description": "Demo Webhooks",
- "secrets": [
- {
- "id": "sc_qNkU6yob0vOMxUlb2oynUw",
- "value": "U3Vic2NyaXB0aW9uUmVzcG9uc2VFeGFtcGxlIDogSUV4YW1wbGVQcm92aWRlcjxTdWJ",
- "createdAt": "2023-12-13T14:15:01",
- "lastUsedAt": "2023-12-16T13:44:03.3242202Z",
- "isActive": true
}
], - "createdAt": "2023-03-30T12:21:04.143Z",
- "updatedAt": "2023-03-30T12:21:04.143Z"
}
Delete a subscription
Deletes a subscription.
path Parameters
subscriptionId required | string The unique identifier for the subscription. |
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 401
- 403
- 404
{- "errors": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "type": "string",
- "title": "string",
- "status": 0,
- "traceId": "string",
- "detail": "string"
}
Create a customer
Creates a new customer.
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
name | string or null <= 100 characters The customer's name. |
(Address (object or null)) The recipient's shipping address. | |
(Address (object or null)) The recipient's invoicing address. | |
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 customer's VAT number. |
Responses
Response Schema: application/json
id | string or null The unique identifier of the customer. |
name | string or null The customer's name. |
(Address (object or null)) The recipient's shipping address. | |
(Address (object or null)) The recipient's invoicing address. | |
emailAddress | string or null The customer's email address. |
phoneNumber | string or null The customer's phone number. |
vatNumber | string or null The customer's VAT number. |
createdAt | string or null <date-time> The creation 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
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "name": "Alex",
- "emailAddress": "alex@dojo.com"
}
Response samples
- 200
- 400
- 401
{- "id": "cust_sandbox_MJj8Flgfik25x47R4LFbxQ",
- "name": "Alex",
- "emailAddress": "alex@dojo.com",
- "createdAt": "2024-02-15T02:46:21.8232496Z",
- "updatedAt": "2024-02-15T02:46:21.8232496Z",
- "documentVersion": 0
}
Delete a customer
Deletes a customer.
path Parameters
customerId required | string or null <= 100 characters Example: cust_qNkU6yob0vOMxUlb2oynUw The unique identifier of the customer. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 400
- 401
- 404
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "extensions": {
- "property1": null,
- "property2": null
}
}
Update information about a customer
Updates information about a customer.
path Parameters
customerId required | string or null <= 100 characters Example: cs_qNkU6yob0vOMxUlb2oynUw The unique identifier of the customer. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
name | string or null The customer's name. |
(Address (object or null)) The recipient's invoicing address. | |
(Address (object or null)) The recipient's shipping address. | |
emailAddress | string or null The customer's email address. |
phoneNumber | string or null The customer's phone number. |
vatNumber | string or null The customer's VAT number. |
Responses
Response Schema: application/json
id | string or null The unique identifier of the customer. |
name | string or null The customer's name. |
(Address (object or null)) The recipient's shipping address. | |
(Address (object or null)) The recipient's invoicing address. | |
emailAddress | string or null The customer's email address. |
phoneNumber | string or null The customer's phone number. |
vatNumber | string or null The customer's VAT number. |
createdAt | string or null <date-time> The creation 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
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "phoneNumber": "078976534161"
}
Response samples
- 200
- 400
- 401
- 404
{- "id": "cs_qNkU6yob0vOMxUlb2oynUw",
- "name": "Alex",
- "emailAddress": "alex@dojo.com",
- "phoneNumber": "078976534161",
- "documentVersion": 1,
- "createdAt": "2023-08-24T14:15:22Z",
- "updatedAt": "2023-09-24T14:15:22Z"
}
Retrieve a customer
Retrieves the details of a customer.
path Parameters
customerId required | string or null <= 100 characters Unique identifiers for the customers you want to get information about, separated by commas. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Responses
Response Schema: application/json
id | string or null The unique identifier of the customer. |
name | string or null The customer's name. |
(Address (object or null)) The recipient's shipping address. | |
(Address (object or null)) The recipient's invoicing address. | |
emailAddress | string or null The customer's email address. |
phoneNumber | string or null The customer's phone number. |
vatNumber | string or null The customer's VAT number. |
createdAt | string or null <date-time> The creation 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
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
[- {
- "id": "cs_qNkU6yob0vOMxUlb2oynUw",
- "name": "Alex",
- "emailAddress": "alex@dojo.com",
- "documentVersion": 0,
- "createdAt": "2023-08-24T14:15:22Z"
}
]
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 The unique identifier of the customer. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
- 404
{- "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 The unique identifier of the customer. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
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 The unique identifier of the customer. |
merchantId | string or null A unique identifier for the merchant. A single merchant can be associated with multiple terminals, point-of-sale machines, and waiters. |
Array of objects or null List of the customer saved payment methods. | |
(SupportedPaymentMethods (object or null)) Supported payment methods. |
Request samples
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 200
- 400
- 401
- 404
{- "customerId": "cust_qNkU6yob0vOMxUlb2oy123",
- "merchantId": "123456789",
- "savedPaymentMethods": [
- {
- "id": "pm_12345",
- "cardDetails": {
- "pan": "52000000****0056",
- "expiryDate": "2024-12-31",
- "scheme": "MASTERCARD"
}
}
], - "supportedPaymentMethods": {
- "cardSchemes": [
- "VISA",
- "MASTERCARD",
- "MAESTRO",
- "DISCOVER",
- "DCI",
- "AMEX"
], - "wallets": [
- "APPLE_PAY",
- "GOOGLE_PAY"
]
}
}
Remove payment method
Delete a customer payment method.
path Parameters
customerId required | string or null <= 100 characters Example: cust_qNkU6yob0vOMxUlb2oynUw The unique identifier of the customer. |
paymentMethodId required | string or null <= 100 characters Example: pm_otRL98WURbaAKs0sdy7_5w The unique identifier of the customer payment method. |
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
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
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
import http.client conn = http.client.HTTPSConnection("api.dojo.tech") headers = { '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
- 400
- 401
- 404
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "extensions": {
- "property1": null,
- "property2": null
}
}
List all customers
Retrieves a list of customers. Results are paginated. By default, the method returns up to 50 customers.
header Parameters
version required | string or null Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
limit | integer <int32> [ 1 .. 100 ] Default: 50 The maximum number of results to be returned in a single page. |
before | string or null <= 200 characters A cursor for use in pagination for the previous page. |
after | string or null <= 200 characters A cursor for use in pagination for the next page. |
Responses
Response Schema: application/json
Array of objects or null An array of customers. | |
before | string or null A cursor for use in pagination for the previous page. |
after | string or null A cursor for use in pagination for the next page. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{ }
Response samples
- 200
- 400
- 401
{- "data": [
- {
- "id": "cs_qNkU6yob0vOMxUlb2oynUw",
- "name": "Alex",
- "emailAddress": "alex@dojo.com",
- "documentVersion": 0,
- "createdAt": "2023-08-24T14:15:22Z"
}
], - "before": "IjIwMjItMDYtMjJUMTQ6MTc6MjYuMDkyWiI=",
- "after": "IjIwMjItMDYtMjBUMTM6MzI6MjIuNDM1WiI="
}
Allows you to setup a card for future payments.
Documentation: Setup intent
Create a setup intent
Creates a setup intent.
header Parameters
version required | string <date> Example: 2024-02-05 The API version with format yyyy-mm-dd. The current version is |
Request Body schema: application/jsonrequired
reference required | string [ 1 .. 60 ] characters A unique identifier for the payment. For example, |
description | string or null <= 4096 characters The payment description. |
(Customer (object or null)) Details about the customer. | |
captureMode | string Default: "Auto" Enum: "Auto" "Manual" The type of capture for the payment, where:
|
paymentMethods | Array of strings or null Enum: "Card" "Wallet" "SavedCard" The payment methods that customers can use to pay. |
(Address (object or null)) The recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
(PaymentIntentConfigRequest (object or null)) Details about the payment intent configuration. | |
object or null A set of key-value pairs that you can use to store additional information. | |
(Money (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 the setup intent. |
(OrderDetails (object or null)) Details about the order including the type and the details. | |
expireAt | string or null <date-time> The timestamp and date of when a setup intent will be voided, in ISO 8601 format. This occurs when a setup intent is created and not yet authorized. |
Responses
Response Schema: application/json
id | string or null The unique identifier for the setup intent. |
clientSessionSecret | string or null The client secret. |
clientSessionSecretExpirationDate | string or null <date-time> The expiration date of |
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" "SavedCard" The payment methods that customers can use to pay. |
(Customer (object or null)) Details about the customer. | |
(RequestSecurity (object or null)) Customer's device information. | |
(Address (object or null)) The recipient's invoicing address. | |
(ShippingDetails (object or null)) The recipient's shipping address. | |
createdAt | string <date-time> The creation 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 format. This occurs when a setup intent is created and not yet authorized. |
reference | string or null A unique identifier for the payment. For example, |
description | string or null The payment description. |
(MerchantConfig (object or null)) Details about 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 to store additional information. | |
(PaymentDetails (object or null)) | |
(Money (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 the setup intent. |
paymentSource | string or null Information about a single payment source type. Invalid if used along with |
Array of objects or null Updates related to the setup intent's status. |
Request samples
- Payload
- Python + Python3
- Node + Request
- Shell + Curl
- Php + Curl
- Csharp + Restsharp
- Python + Requests
- Javascript + Jquery
- Javascript + Xhr
- Swift + Nsurlsession
- Ruby + Native
- Go + Native
- C + Libcurl
- Powershell + Webrequest
{- "reference": "Dojo Cafe | Booking request for Table 4",
- "merchantInitiatedTransactionType": "NoShow",
- "terms": "In case of no-show, the customer authorizes us to charge their card with table booking fee.",
- "intendedAmount": {