Skip to main content

Optional configurations

Learn how to activate additional features for your checkout screen.

You can activate additional features like address collection. The following table shows which fields are configurable in mobile SDK integration and web integration.

ConfigurationsMobileWeb
customerEmailyesyes
billingAddressyes yesyes
shippingAddressnoyes
Walletyesyes
itemLinesyesyes
taxLinesnoyes
companyNamenoyes

*   Currently limited to Postcode and Country only.


Configurations

​ The mobile SDK UI can do the following:

Add payment methods

Add payment methods

By default, the checkout screen supports only card payments. To also enable the Apple Pay wallet, you must first configure Apple Pay. Then pass "Card", "Wallet" in paymentMethods when you create a payment intent, for example:

# 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"
]
}'

Collect billing address and user email

​ You can add a form to collect the billing address and user email to the checkout screen. Pass collectionRequired: true in config.billingAddress, and config.customerEmail, for example: ​

# 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
}
}
}'

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. ​

# 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"
}
}
]
}'