Create a payment link order Run in API Explorer
Body
Required
-
Store identifier as
UUID v4Maximum length is
36. Format should match the following pattern:^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$. -
Transaction amount in the smallest currency unit, e.g. grosz
-
Transaction currency in
ISO 4217formatMaximum length is
3. Values arePLNorEUR. -
Merchant order number, allowed characters: A-Za-z0-9#_-.\/ plus space (0x20) and UNICODE range 00C0 - 02C0 (incl. Polish diacritics)
Maximum length is
100. Format should match the following pattern:^[A-Za-z0-9#_\-\.\/ \u00C0-\u02C0]+$. -
Order title, allowed characters: A-Za-z0-9#&_-"',./ plus space (0x20) and UNICODE range 00C0 - 02C0 (incl. Polish diacritics).
Maximum length is
255. Format should match the following pattern:^[A-Za-z0-9#_\-\.\/ \u00C0-\u02C0]+$. -
Return URL from the external payment page if the transaction status is not resolved
Maximum length is
300. -
Return URL from the external payment page after a successful payment
Maximum length is
300. -
Return URL from the external payment page in case of a payment error
Maximum length is
300. -
Visibility of payment methods; by default, all methods available for the store are visible. Description in section 5.3 Payment methods visibility
-
Force card payment mode. Allows initializing a card payment in profile-saving mode. Available values: ecom3ds, oneclick, recurring. When using oneclick or recurring, customer.cid is required.
-
Transaction expiration date as a Unix timestamp in seconds (seconds since 1970-01-01 UTC) (value must be >= 1 and <= 4294967295). If not provided or null, the transaction is valid indefinitely. Not completing the payment by this time will cancel it.
-
Distributor name, allowed value: "shoper".
-
Flag determining whether payer charging will be used for the given order. Allowed values: 'true', 'false' (requires surcharge flag enabled during onboarding).
curl \
--request POST 'https://api.sandbox.axepta.pl/v1/merchant/3hqitucfo8jh5kqlp7s6/payment-link' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"serviceId":"a3a5b7ad-ab73-46f0-97f2-3238f8bd450d","amount":3000,"currency":"PLN","orderId":123,"returnUrl":"https://domain.com/return","successReturnUrl":"https://domain.com/success","failureReturnUrl":"https://domain.com/failure","notificationUrl":"https://domain.com/notification","customer":{"firstName":"Jan","lastName":"Kowalski","email":"jan.kowalski@example.com"}}'
{
"serviceId": "a3a5b7ad-ab73-46f0-97f2-3238f8bd450d",
"amount": 3000,
"currency": "PLN",
"orderId": 123,
"returnUrl": "https://domain.com/return",
"successReturnUrl": "https://domain.com/success",
"failureReturnUrl": "https://domain.com/failure",
"notificationUrl": "https://domain.com/notification",
"customer": {
"firstName": "Jan",
"lastName": "Kowalski",
"email": "jan.kowalski@example.com"
}
}