Optional configurations
Learn how to activate additional features for your checkout screen.
You can activate additional, optional features in your integration. The following table shows which fields are configurable in mobile SDK and web integration.
| Configurations | Mobile | Web |
|---|---|---|
customerEmail | ||
billingAddress | ||
shippingAddress | ||
Wallet | ||
itemLines | ||
taxLines | ||
companyName |
* Currently limited to Postcode and Country only.
Configurations
The mobile SDK UI can do the following:
-
Integrate Google Pay wallets in addition to card payments.
-
Collect billing address and user email
Use your checkout screen to capture useful information about your mobile app user.
-
Show detailed information about the order
Set up the information that you want to show to your mobile app users.
Add payment methods

By default, the checkout page only supports card payments. To enable Google Pay wallet, you must first configure Google Pay. Then, pass "Card","Wallet" in paymentMethods. For example:
- cURL
- PowerShell
- Python
- C#
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl -v --request POST \
--url https://api.dojo.tech/payment-intents \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ' \
--header 'Version: 2024-02-05' \
--data '{
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"paymentMethods": [
"Card",
"Wallet"
]
}'
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/payment-intents' `
-Method POST `
-Headers @{
"Version" = "2024-02-05"
"Authorization" = "Basic $publicSandboxKey"
} `
-ContentType 'application/json' `
-Body '{
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"paymentMethods": [
"Card",
"Wallet"
]
}'
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = json.dumps({
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order 245",
"paymentMethods": ["Card","Wallet"]
})
headers = {
'Content-Type': "application/json",
'Version': "2024-02-05",
'Authorization': "Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ" # <-- Change to your secret key
}
conn.request("POST", "/payment-intents", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
conn.close()
// The sandbox API key passed in 'ApiKeyClientAuthorization' is public.
// Don't submit any personally identifiable information in any requests made with this key.
// Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
// for secure testing.
var paymentIntentsClient = new PaymentIntentsClient(new HttpClient(), new ApiKeyClientAuthorization("sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"));
var result = await paymentIntentsClient.CreatePaymentIntentAsync(new CreatePaymentIntentRequest
{
Amount = new()
{
Value = 1000,
CurrencyCode = "GBP"
},
PaymentMethods = new List<PaymentMethod>() { PaymentMethod.Card , PaymentMethod.Wallet},
Reference = "Order-0001"
});
Collect billing address and user email
You can add a form to collect the billing address and user email to the checkout screen by
passing collectionRequired: true in config.billingAddress, and config.customerEmail. For example:
- cURL
- PowerShell
- Python
- C#
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl -v --request POST \
--url https://api.dojo.tech/payment-intents \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic sk_sandbox_kqCwRaWEsl9OM0xNSxh00eayT9k8hAqURGeNQseeV62rMxO5ZiZHub0-XRqkzPLfES2fVUl0seMOyujCIiYaMTaDyiBPf25b7W3Gr3oE0qbpTeM4MRuUMgtDt_scAEfJdqYBlBB_gt_31Bw7FihTISp2WIXXGeTD5WbwhdIhraIJVWR7jo2Hy-xKlBpK-lE8' \
--header 'Version: 2024-02-05' \
--data '{
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"config": {
"customerEmail": {
"collectionRequired": true
},
"billingAddress": {
"collectionRequired": true
}
}
}'
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/payment-intents' `
-Method POST `
-Headers @{
"Version" = "2024-02-05"
"Authorization" = "Basic $publicSandboxKey"
} `
-ContentType 'application/json' `
-Body '{
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"config": {
"customerEmail": {
"collectionRequired": true
},
"billingAddress": {
"collectionRequired": true
}
}
}'
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = json.dumps({
"amount": {
"value": 1000,
"currencyCode": "GBP"
},
"reference": "Order 245",
"config": {
"billingAddress": {
"collectionRequired": True
},
"customerEmail": {
"collectionRequired": True
}
}
})
headers = {
'Content-Type': "application/json",
'Version': "2024-02-05",
'Authorization': "Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ" # <-- Change to your secret key
}
conn.request("POST", "/payment-intents", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
conn.close()
// The sandbox API key passed in 'ApiKeyClientAuthorization' is public.
// Don't submit any personally identifiable information in any requests made with this key.
// Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
// for secure testing.
var paymentIntentsClient = new PaymentIntentsClient(new HttpClient(), new ApiKeyClientAuthorization("sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"));
var result = await paymentIntentsClient.CreatePaymentIntentAsync(new CreatePaymentIntentRequest
{
Amount = new()
{
Value = 1000,
CurrencyCode = "GBP"
},
Config = new()
{
BillingAddress = new() {CollectionRequired = true},
CustomerEmail = new() {CollectionRequired = true}
},
PaymentMethods = new List<PaymentMethod>() { PaymentMethod.Card , PaymentMethod.Wallet},
Reference = "Order-0001"
});
Show detailed information about the order
You can add information about each position in the order to the checkout page. Pass this data to itemLines. The itemLines amounts are independent of the payment intent amount.
- cURL
- PowerShell
- Python
- C#
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
curl -v --request POST \
--url https://api.dojo.tech/payment-intents \
--header 'content-type: application/json' \
--header 'authorization: Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ' \
--header 'version: 2024-02-05' \
--data '{
"amount": {
"value": 4000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"itemLines": [
{
"id": "item 1",
"caption": "Baseball hat",
"amountTotal": {
"value": 1200,
"currencyCode": "GBP"
}
},
{
"id": "item 2",
"caption": "Baseball ball",
"amountTotal": {
"value": 350,
"currencyCode": "GBP"
}
},
{
"id": "item 3",
"caption": "Baseball bat",
"amountTotal": {
"value": 2500,
"currencyCode": "GBP"
}
}
]
}'
# The sandbox API key passed in '$publicSandboxKey' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
$publicSandboxKey = "sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"
Invoke-WebRequest `
-Uri 'https://api.dojo.tech/payment-intents' `
-Method POST `
-Headers @{
"version" = "2024-02-05"
"authorization" = "Basic $publicSandboxKey"
} `
-ContentType 'application/json' `
-Body '{
"amount": {
"value": 4000,
"currencyCode": "GBP"
},
"reference": "Order-0001",
"itemLines": [
{
"id": "item 1",
"caption": "Baseball hat",
"amountTotal": {
"value": 1200,
"currencyCode": "GBP"
}
},
{
"id": "item 2",
"caption": "Baseball ball",
"amountTotal": {
"value": 350,
"currencyCode": "GBP"
}
},
{
"id": "item 3",
"caption": "Baseball bat",
"amountTotal": {
"value": 2500,
"currencyCode": "GBP"
}
}
]
}'
# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.
import http.client
import json
conn = http.client.HTTPSConnection("api.dojo.tech")
payload = json.dumps({
"amount": {
"value": 4000,
"currencyCode": "GBP"
},
"reference": "Order 245",
"itemLines": [
{
"id": "item 1",
"caption": "Baseball hat",
"amountTotal": {
"value": 1200,
"currencyCode": "GBP"
}
},
{
"id": "item 2",
"caption": "Baseball ball",
"amountTotal": {
"value": 350,
"currencyCode": "GBP"
}
},
{
"id": "item 3",
"caption": "Baseball bat",
"amountTotal": {
"value": 2500,
"currencyCode": "GBP"
}
}
],
})
headers = {
'Content-Type': "application/json",
'Version': "2024-02-05",
'Authorization': "Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ" # <-- Change to your secret key
}
conn.request("POST", "/payment-intents", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
conn.close()
// The sandbox API key passed in 'ApiKeyClientAuthorization' is public.
// Don't submit any personally identifiable information in any requests made with this key.
// Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
// for secure testing.
var paymentIntentsClient = new PaymentIntentsClient(new HttpClient(), new ApiKeyClientAuthorization("sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ"));
var result = await paymentIntentsClient.CreatePaymentIntentAsync(new CreatePaymentIntentRequest
{
Amount = new()
{
Value = 4000,
CurrencyCode = "GBP"
},
ItemLines = new List<ItemLine>()
{
new() {AmountTotal = new() { Value=1200, CurrencyCode="GBP" }, Caption = "Baseball hat", Id="item 1"},
new() {AmountTotal = new() { Value=350, CurrencyCode="GBP" }, Caption = "Baseball ball", Id="item 2"},
new() {AmountTotal = new() { Value=2500, CurrencyCode="GBP" }, Caption = "Baseball bat", Id="item 3"},
},
Config = new()
{
Details = new()
{
ShowTotal = true
}
},
PaymentMethods = new List<PaymentMethod>() { PaymentMethod.Card , PaymentMethod.Wallet},
Reference = "Order-0001"
});