Skip to main content

CreatePhysicalSaleRequest

terminal objectnullable

Optional terminal selection. If omitted, ePay uses the fallback terminal for the given point of sale.

iduuidnullable

The ID of the terminal to target. The terminal must belong to the provided point of sale.

Default value: null
Example: 0197c07b-3f6d-7be2-b848-702b08958128
suppressAppNotificationsbooleannullable

If true no notification is sent to the SoftPay terminal, this might be relevant on "same-device" POS systems, where a App Switch initiates the payment. If the SoftPay app is always in the foreground, then it is recommended to use false, as this makes the SoftPay terminal more responsive.

Default value: false
Example: false
switchBackTimeoutintegernullable

The number of milliseconds the SoftPay terminal waits, before switching back to the origin app / activity. A null indicates no switch back. A 0 indicates "as fast as allowed". SoftPay enforces a minimum of 1 second for successful payments and 2 seconds for failed payments, due to scheme regulations. This can also be controlled in the intent redirect from a POS app to the SoftPay app.

Default value: null
Example: 0
activityToResumestringnullable

ComponentName, e.g. package name / activity class to switch back to, once the payment is completed. This can also be controlled in the intent redirect from a POS app to the SoftPay app.

Default value: null
surchargebooleannullable

Specify if surcharge should be applied to the transaction, if applicable.

Default value: null
Example: false
dccbooleannullable

Specify if dynamic currency conversion (DCC) should be applied to the transaction, if applicable.

Default value: null
Example: false
transaction objectrequired

Physical sale data used to create the terminal transaction.

pointOfSaleIduuidrequired

The ID of the Softpay point of sale to associate the physical sale with.

Example: 01924737-9c18-71c0-ab1a-88698eaceabf
typestringnullable

The transaction type to process. Use PAYMENT for purchases and PAYOUT for refunds. Defaults to PAYMENT if not given.

Note that PAYOUT requires the feature to be enabled by SoftPay.

Possible values: [PAYMENT, PAYOUT]

Default value: PAYMENT
Example: PAYMENT
amountintegerrequired

The amount must be defined in minor units. E.g. 2,50 DKK must be set as 250.

Example: 1000
currencystringrequired

The currency code of the payment. For Danish Kroner defined as DKK. ISO 4217 alpha-3 (e.g., DKK)

Possible values: Value must match regular expression ^[A-Z]{3}$

Example: DKK
notificationUrlurirequired

The URL to receive the webhook with the final transaction result.

Possible values: <= 1024 characters

Example: https://example.com/notification
referencestringnullable

This is the transaction reference, similar to an order ID.
The reference SHOULD be unique for each payment, as some acquirers enforce per-payment uniqueness.
Using a duplicate reference may result in failed payments or make reconciliation difficult.
Only ASCII alphanumeric characters and dashes are allowed.

Possible values: non-empty and <= 36 characters, Value must match regular expression ^[A-Za-z0-9-]{1,36}$

Example: store-sale-1
attributes objectnullable

A list of pass through attributes that is sent back to the merchant on webhooks. Max size is 1kb.

property name*anynullable

A list of pass through attributes that is sent back to the merchant on webhooks. Max size is 1kb.

Example: {"orderId":"order-123","cashRegisterId":"register-7"}
customerIdstringnullable

An optional merchant defined customer id used to uniquely identify a user in the merchant system.

Example: User159
customer objectnullable

Customer info associated with the sale. It is recommended to send all the info that is available.

firstNamestringnullable

The first name of the paying customer.

Possible values: non-empty

Example: Peter
lastNamestringnullable

The last name of the paying customer.

Possible values: non-empty

Example: Nielsen
birthdatedatenullable

The date of birth of the cardholder in YYYY-MM-DD format.

Example: 2000-07-25
emailstringnullable

The email of the paying customer.

Possible values: non-empty

Example: email@example.com
phoneNumberstringnullable

E.164 phone number format with a single space between country code and local number. No additional spaces allowed.

Format: "+[countryCode] [number]".

Possible values: Value must match regular expression ^\+\d{1,3} \d+$

Example: +45 12345678
shippingAddress objectnullable

The shipping address of the purchase. If no wares are shipped, leave this empty. If billing and shipping address is the same, then fill both properties with identical information.

countryCodestringnullable

ISO 3166-1 alpha-2 country code

Possible values: >= 2 characters and <= 2 characters

Example: DK
postalCodestringnullable

The local postal code of the address

Possible values: non-empty and <= 16 characters

Example: 1400
citystringnullable

The city

Possible values: non-empty and <= 50 characters

Example: København
line1stringnullable

The first address line. Most address only has a singular line.

Possible values: non-empty and <= 50 characters

Example: Torvegade 45
line2stringnullable

Second address line. Only use if address contains multiple lines. Always start with line1.

Possible values: non-empty and <= 50 characters

Example: 2. th.
line3stringnullable

Third address line. Only use if address contains multiple lines. Always start with line1 and line2.

Possible values: non-empty and <= 50 characters

Example: Christianshavn
billingAddress objectnullable

The billing address of the customer. Often the personal address of the customer or the business address of paying company. If billing and shipping address is the same, then fill both properties with identical information.

countryCodestringnullable

ISO 3166-1 alpha-2 country code

Possible values: >= 2 characters and <= 2 characters

Example: DK
postalCodestringnullable

The local postal code of the address

Possible values: non-empty and <= 16 characters

Example: 1400
citystringnullable

The city

Possible values: non-empty and <= 50 characters

Example: København
line1stringnullable

The first address line. Most address only has a singular line.

Possible values: non-empty and <= 50 characters

Example: Torvegade 45
line2stringnullable

Second address line. Only use if address contains multiple lines. Always start with line1.

Possible values: non-empty and <= 50 characters

Example: 2. th.
line3stringnullable

Third address line. Only use if address contains multiple lines. Always start with line1 and line2.

Possible values: non-empty and <= 50 characters

Example: Christianshavn
CreatePhysicalSaleRequest
{
"terminal": {
"id": "0197c07b-3f6d-7be2-b848-702b08958128",
"suppressAppNotifications": false,
"switchBackTimeout": 0,
"activityToResume": "string",
"surcharge": false,
"dcc": false
},
"transaction": {
"pointOfSaleId": "01924737-9c18-71c0-ab1a-88698eaceabf",
"type": "PAYMENT",
"amount": 1000,
"currency": "DKK",
"notificationUrl": "https://example.com/notification",
"reference": "store-sale-1",
"attributes": {
"orderId": "order-123",
"cashRegisterId": "register-7"
},
"customerId": "User159",
"customer": {
"firstName": "Peter",
"lastName": "Nielsen",
"birthdate": "2000-07-25",
"email": "email@example.com",
"phoneNumber": "+45 12345678",
"shippingAddress": {
"countryCode": "DK",
"postalCode": "1400",
"city": "København",
"line1": "Torvegade 45"
},
"billingAddress": {
"countryCode": "DK",
"postalCode": "1400",
"city": "København",
"line1": "Torvegade 45"
}
}
}
}