# Generating a transaction Endpoint: POST /payment/{serviceId}/transactions Version: 1.0.0 Security: bearerAuth ## Path parameters: - `serviceId` (string, required) Service ID ## Request fields (application/json): - `amount` (number, required) Transaction amount - `currency` (string) Transaction currency - `description` (string) Transaction description given by the partner, presented on the payment gateway - `control` (string) Field for use by the partner - `customer` (object,null) Basic information about the payer - `customer.name` (string) - `customer.email` (string) - `customer.ip` (string) Buyer's IP address. Required when using directChannel. - `customer.countryCode` (string) Buyer's ISO code. Required when using directChannel. Example: "PL" - `antifraud` (object,null) Information object for antifraud - `antifraud.useragent` (string) Buyer's UserAgent. Required when using directChannel. - `antifraud.steamid` (integer) Buyer's STEAMID64 - `antifraud.mcusername` (string) Minecraft player nickname - `antifraud.mcid` (string) Minecraft player UUID - `billing` (object,null) - `billing.surname` (string,null, required) - `billing.street` (string,null, required) - `billing.building` (string,null) - `billing.flat` (string,null) - `billing.city` (string,null, required) - `billing.region` (string,null) - `billing.postalCode` (string,null, required) Postal code, format depends on the field - `billing.country` (string,null, required) Country - `billing.company` (string,null) Company name - `shipping` (object,null) - `cart` (array,null) - `cart.name` (string, required) Product name - `cart.quantity` (number, required) Quantity of the product - `cart.price` (number, required) Price of one product - `cart.producer` (string,null, required) Product brand - `cart.category` (string,null, required) Product category - `cart.code` (string,null, required) Product code - `returns` (object,null) - `returns.success` (string) - `returns.failure` (string) - `directChannel` (string) In this field you can send the channel ID, then the payer will be redirected directly to the page of the given channel For example, if you enter , you will be redirected directly to the BLIK payment gateway. In this case, it is necessary to send and . - `channels` (array,null) Array with payment channel IDs that will be displayed to the payer on the gateway after redirection to the transaction url A list of available channels along with their IDs can be obtained here [Retrieving a list of channels for the service](#tag/Payment/operation/paymentGetChannels) - `channelTypes` (object,null) Object in which we can define which channel types should be available on the payment gateway - `channelTypes.blik` (boolean) BLIK payment - `channelTypes.transfer` (boolean) Online transfers payment - `channelTypes.cards` (boolean) Card payments - `channelTypes.ewallets` (boolean) Virtual wallets payments (Google Pay, Apple Pay) - `channelTypes.paypal` (boolean) PayPal payment - `channelTypes.paysafe` (boolean) Payments from the Paysafe group (Skrill, PaysafeCard) - `channelTypes.latam` (boolean) South American payments (PIX, Boleto, BoletoFlash) - `referer` (string) ## Response 200 fields (application/json): - `success` (boolean, required) Request status Example: true - `data` (object, required) Example: {"transactionId":"1d87a1b3-18f8-4146-bcb1-c0c9f293b04f","redirectUrl":"https://pay.simpay.pl/1d87a1b3-18f8-4146-bcb1-c0c9f293b04f"} - `data.transactionId` (string, required) Transaction ID - `data.redirectUrl` (string, required) Example: "https://pay.simpay.pl/1d87a1b3-18f8-4146-bcb1-c0c9f293b04f" ## Response 401 fields (application/json): - `success` (boolean, required) Request status - `errorCode` (string, required) Error status code Enum: "UNAUTHORIZED" ## Response 403 fields (application/json): - `success` (boolean, required) Request status - `errorCode` (string, required) Error status code Enum: "INVALID_ABILITY_PROVIDED", "IP_ADDRESS_NOT_WHITELISTED" ## Response 404 fields (application/json): - `success` (boolean, required) Request status - `errorCode` (string, required) Error status code Enum: "SERVICE_NOT_FOUND", "TRANSACTION_NOT_FOUND", "ROUTE_NOT_FOUND" ## Response 422 fields (application/json): - `success` (boolean, required) Request status - `errorCode` (string, required) Error status code Enum: "VALIDATION_ERROR" - `errors` (object, required) Example: {"amount":["The amount field is required."],"currency":["The selected currency is invalid."]} - `errors.amount` (array) Example: ["The amount field is required."]