Skip to content

Create checkout session

Request

This endpoint generates a URL for a hosted payment page where customers can securely select their preferred payment method and complete their transaction.

Security
bearer and basic and apiKey
Headers
Idempotency-Keystring

A unique key provided by you to ensure that a particular operation is not processed multiple times in case of retries.

Bodyapplication/jsonrequired
transIdstring, <= 64 charactersrequired

Transaction ID created in your system. It should be unique for each payment.

externalIntegrationIdstring

External integration identifier

refNrstring

Your unique reference number for the specific operation. You can pass this value to reconcile different operations in a payment (authorization, capture, refund, etc) individually. It is recommended to limit the length to 18 characters so that it works for all payment methods. Allowed characters: (A-Z, a-z) and digits (0-9)

amountobject(amount)required
languagestring

Language code to determine the language of the payment form and customer communication where applicable. Use 2 letter ISO language codes for common languages such as en for English, de for German, etc. For variations of languages use 5 letter code such as fr-be for French language in Belgium.

captureMethodobject(captureMethod)
credentialOnFileobject(credentialOnFile)
orderobject(order)
urlsobject(urls)required
billingAddressobject(billingAddress)
shippingobject(shipping)
statementDescriptorstring

Short, clear description of the transaction that appears on the customer's statement. It is recommend sending a maximum of 22 characters. Allowed characters: a-z, A-Z, 0-9, spaces, and special characters / - ? : ( ) . , +

customerInfoobject(customerInfo)

Information about the customer.

expirationTimeany, (date-time)

Transaction expiry timestamp (UTC).

fraudDataobject(fraudData)
paymentFacilitatorobject(paymentFacilitator)

Object specifying SubMerchant (Payment Facilitator) details.

browserInfoobject(browserInfo)
deviceobject(device)
channelstring

Specifies the sales or interaction channel through which the transaction is initiated.

Enum:"ECOM""MOTO""APP""PAYBYLINK""POS"
metadataobject

A collection of additional custom data provided by you to store extra information about the transaction. This is a set of JSON key value pairs passed by you. Paygate will return the data as it is in the response.

templateobject(sessionTemplate)
allowedPaymentMethodsArray of strings

Indicates list of allowed payment methods that should be shown on the hosted payment page. If not passed default merchant level configuration is used to display the allowed payment methods.

Items Enum:"ALIPAY""AMAZONPAY""APPLEPAY""BOLETO""BANCONTACT""BANCOMATPAY""BIZUM""BLIK""DIRECTDEBIT""EASYCOLLECT"
partialPaymentboolean

Defines if the payment is a partial payment. Possible values: true or false.

paymentMethodsobject(paymentMethodsSession)
curl -i -X POST \
  -u '<username>:<password>' \
  https://test.computop-paygate.com/api/v2/payments/sessions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "transId": "234542353f3452345",
    "amount": {
      "value": 1000,
      "currency": "EUR"
    },
    "urls": {
      "return": "https://my.callback.url.com/return",
      "cancel": "https://my.callback.url.com/cancel",
      "webhook": "https://my.callback.url.com/webhook"
    },
    "template": {
      "name": "ct"
    },
    "allowedPaymentMethods": [
      "DIRECTDEBIT",
      "CARD",
      "APPLEPAY",
      "EASYCOLLECT",
      "GOOGLEPAY",
      "IDEAL",
      "PAYPAL",
      "WERO"
    ]
  }'

Responses

Accepted

Bodyapplication/json
Response
{ "_links": { "redirect": { … } } }