What is a User-Agent and why do I need to have one?

A User-Agent header must be supplied with all payments API requests.

A User-Agent header is used by the Afterpay team to identify which Merchant website and Platform, API requests are coming from. It also helps to categorise the transactions based on channel and service for financial settlement/invoicing

For example:

Merchant/abc; Platform/Digital; MerchantId/abc771; Channel/sms; CountryCode/AU; System Information/Java/8.3; Service/Shop

DescriptionExample Data AboveOther Merchant Examples
MerchantMerchant/abcMerchant/Nab
Merchant/ANZ ; Merchant/Optus
PlatformPlatform/digitalPlatform/Upwire
MerchantIdMerchantId/abc771MerchantId/NAB12
ChannelChannel/SMSChannel/Web
Channel/msite
Channel/app
Channel/ivr
Channel/autopayment
CountryCodeCountryCode/AUCountryCode/US
CountryCode/EU
System InformationSystem Information/Java/8.3System Information/PHP/7.2.18
System Information/Ruby/2.5.3
ServiceService/Auto-rechargeService/Recharge
Service/Activation
Service/Shop
Service/Unlock

Sample Example

curl -v -X POST https://<env>/v1/reservations \
-H "Authorization: Bearer c92b326fff28aba21821349c3ef411e" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Request-Id: 8456732415666565656565656565657" \
-H "User-Agent: Merchant/Abc; Platform/Crimson; MerchantId/ABC123; Channel/sms; CountryCode/AU System Information/Java/8.3; Service/Auto-recharge"\
-d '{
  "token": "6966af4975984c30ae2e2c18985bc21c",
  "amount": 100.5,
  "currency": "AUD",
  "risk": {...},
  "requestor": "61402223333"
}'