Create payment details

Creates payment details (e.g. if a user adds a card).

If the status active of the new payment details is true, they are used for making payments (for example in a recurring process). If the status active is false, these new payment details, though created, are not used for making payments.

post/payment_details

Request

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

Headers

X-Publisher-Tokenstring

Request body

customerIdinteger required

Customer identifier at Cleeng, e.g. 316720888

tokenstring required

A token from a remote payment gateway that is used for charging a remote payment gateway in a recurring process

paymentMethodIdinteger required

An identifier of payment method, provided by Cleeng. </br> Must be a positive integer (greater that 0).

activeboolean

If true, then specified payment details will be used for a recurring process.

Response

200

successboolean
messagestring

Example response

{
  "success": true,
  "data": {
    "id": 674491474,
    "customerId": 316720888,
    "token": "B-3N4438926S6377949",
    "paymentGateway": "paypal",
    "paymentMethod": "paypal",
    "paymentMethodSpecificParams": {
      "payerId": "VL6MAXSRSR7CL",
      "holderName": "John Doe"
    },
    "paymentMethodId": 277774591,
    "active": true
  },
  "message": "Created new payment details"
}

Changes

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