# Creating a transaction
**POST /{merchantId}/transaction**
The request allows you to create a transaction for a selected channel within a given payment method with direct redirection or, in the case of some methods (payment cards, BLIK with a transferred code) - with immediate execution after payment authorisation by the payer.
You can find a table of methods and their assigned payment channels here [here](https://bump.sh/pgw/doc/development/imoje-api#topic-transaction-methods-and-channels).
> info
> Each unpaid transaction will expire automatically 15 months after the date of its creation. If you want it to expire sooner, use the `validTo` parameter.
> info
> In accordance with PCI DSS requirements (established by payment organisations), it is prohibited to process, transfer or store payment card numbers and other data if you do not have the appropriate certificate.
By default, card transactions via API are blocked. If you have the appropriate **PCI DSS** certificate and want to enable card payments on your shop's website and unblock the possibility of creating card transactions via API, please send your certificate along with the PCI AoC and PCI SAQ documents to kontakt.tech@imoje.pl.
If you do not have a certificate but want to enable card payments, use the [/payment] endpoint (https://bump.sh/pgw/doc/imoje-api-en/operation/operation-post-parameter-payment) or our [widget](https://bump.sh/pgw/doc/imoje-paywall-en#topic-widget-for-card-payments).
## Servers
- Production environment: https://api.imoje.pl/v1/merchant (Production environment)
- Test environment: https://sandbox.api.imoje.pl/v1/merchant (Test environment)
## Authentication methods
- Authorization token
## Parameters
### Path parameters
- **merchantId** (string)
Merchant identifier
### Body: application/json (object)
- **type** (string)
Transaction type
- **serviceId** (string(uuid))
Shop identifier as `UUID v4`
- **amount** (integer)
The transaction amount in the smallest currency unit, e.g. **pennies**.
- **currency** (string)
Transaction currency in the ISO 4217 standard
- **orderId** (string)
Order ID
- **paymentMethod** (string)
Payment method description
- **paymentMethodCode** (string)
Payment method code
- **successReturnUrl** (string(uri))
Return address from the external payment processing site in case of successful payment. The address must comply with the `RFC 3986`` URL standard.
- **failureReturnUrl** (string(uri))
Return address from the external payment processing site in the event of a payment error. The address must comply with the `RFC 3986`` URL standard.
- **notificationUrl** (string(uri))
Dynamic notification address, possibility to set a specific address for a single transaction.
Addresses containing `localhost` and ports will be rejected.
- **title** (string)
Transaction title
- **additionalDescription** (string)
Details of the products or services ordered
- **validTo** (integer | null)
Transaction expiry date as a **timestamp in seconds**. Failure to complete the payment by this time will result in its cancellation. If not specified, the transaction is valid until the time set in the *Payment activity* parameter in the imoje Administration Panel (shop settings) or after 15 months. Passing the parameter `validTo`= `NULL` causes the transaction not to expire, ignoring the settings in the *Payment activity* parameter in the imoje Administration Panel (shop settings). The **minimum** link validity time is **60 seconds.**
- **blikCode** (string)
BLIK code obtained from the payer
- **clientIp** (string(ipv4, ipv6))
The actual IP address of the payer specified in the `IPv4` or `IPv6` protocol. Required when specifying [`blikCode`](#operation-post-parameter-transaction-body-application-json-blikCode).
- **customer** (object)
Payer data
- **billing** (object)
Payer's billing address
- **shipping** (object)
Shipping address
- **card** (object)
Data for card payment
- **additionalData** (object)
Information about the payer's browser.
Required when making card payments with 3DS authorisation and Google Pay and Apple Pay 0 level.
- **visibleMethod** (array[string])
Payment methods visible on the payment gateway after the payer has changed the method/channel. If this field is missing or empty, all payment methods enabled in the shop are displayed. There are many configurations for displaying payment methods. They should always be separated by commas.
- **data** (object)
- **invoice** (object)
Invoice details required for the active service [ING Księgowość](https://bump.sh/pgw/doc/imoje-api-en#topic-ing-ksiegowosc) and for `Split payment`.
- **profileType** (string)
OneClick and recurring card transaction type. Required for payments [OneClick and recurring without a card profile](https://bump.sh/pgw/doc/imoje-api-en/topic/topic-oneclick-and-recurring-card-payments#topic-oneclick-and-recurring-payment-without-a-profile).
`FIRST` for a registration transaction, `STANDARD` for a card debiting.
- **installment** (object)
Additional data for imoje installemets
- **wallet** (object)
Payment details for your e-wallet.
Required for Google Pay and Apple Pay 0 level payments.
## Responses
### 200
Request executed correctly
#### Body: application/json (object)
- **transaction** (object)
### 422
The payload is correct but does not contain the required parameters.
#### Body: application/json (object)
- **apiErrorResponse** (object)
Error details
### 406
The payload is valid but contains values that cannot be accepted at this time. This error will be returned when a payment method or channel that is inactive in the store is used, or when its availability is temporarily restricted globally.
#### Body: application/json (object)
- **apiErrorResponse** (object)
Error details
### 500
The payload is correct, but the transaction cannot be processed due to an error in the configuration or at the payment method provider.
#### Body: application/json (object)
- **apiErrorResponse** (object)
Error details
[Powered by Bump.sh](https://bump.sh)