Create a payment

To create a payment, you use a payment resource. They are a reference to the actual payment that happens at the payment gateway.

Payments handle customers' actual payments of previously defined orders.

post/payments

Request

  • Base URL
    https://api.sandbox.cleeng.com/3.1
  • URL
    https://api.sandbox.cleeng.com/3.1/payments
  • Auth
    API key in header X-Publisher-Token

Headers

Content-Typestring

Request body

orderIdstring required

The identifier of Cleeng order

statusstring required

The status of payment, available statuses are rejected, authorized, cancelled, captured.

paymentOperationstring required

Payment operation type: initial-payment, recurring-payment.

paymentDetailsIdstring

The identifier of Cleeng payment details connected to Cleeng customer. Required when paymentDetails are not created in the call

externalPaymentIdstring

The payment identifier from external payment gateway system

rejectedReasonstring

A reason of rejected payment, available when status equals rejected

refundedReasonstring

A reason of refunded payment, available when status equals refunded

subscriptionIdstring

Subscription identifier at Cleeng, it is used in order to define for which subscription recurring payment should be made. <br /> Required conditionally - when paymentOperation is set to recurring-payment.

Response

200

successboolean
messagestring

Example response

{
  "success": true,
  "payment": {
    "id": 386,
    "orderId": 429180537,
    "status": "captured",
    "totalAmount": 10,
    "currency": "EUR",
    "customerId": 965143976,
    "paymentGateway": "adyen",
    "paymentMethod": "card",
    "externalPaymentId": "<external-payment-id>",
    "amount": 8.13,
    "country": "PL",
    "offerType": "subscription",
    "taxValue": 1.87,
    "paymentOperation": "initial-payment"
  },
  "message": "Payment created successfully"
}

Changes

No recorded changes to this operation across all 1 revision of this API.