Skip to content

    COF Integration Types

    COF Contract

    Within the Payengine all credential-on-file related information will be assigned to an existing payment instrument of the corresponding card in the cofContract object.

    The cofContract object consists of the following parameters.

    ParameterDescription
    idUnique identifier for the cofContract generated by the Payengine. The type of credential-on-file
    typeSupported values are: ONECLICK, UNSCHEDULED, SCHEDULED
    channelThe channel (entry mode) the payment instrument and corresponding transactions should be used for. Supported values are: ECOM, MOTO. Default value: ECOM.

    The object can be passed either as part of a card check after payment credentials have been tokenized or as part of an order request, e.g. in the preauth or debit request.

    A card payment instrument in the Payengine could have multiple assigned cofContracts.

    The most typical use case would be that only one cofContract is assigned to a payment instrument. In this case the Payengine will automatically trace initial and subsequent transactions. For recurring payments the Payengine will also automatically extract the card scheme transaction identifier for the initial recurring payment and forward it as part of the subsequent transactions.

    In case a merchant would like to use the same payment instrument for multiple cofContracts the id would always be a required input parameter for each payment transaction!

    Once a cofContract is assigned to a payment instrument it will always be returned together with other attributes of the payment instrument once queried (see sample below).

    Payment Instrument Response

    {
        "paymentInstrumentId": "111",
        "type": "creditcard",
        ...

    API - Card Check

    POST /payment-instruments/{paymentInstrumentId}/card-check

    This service can be used to initiate a card check which will results in a 0,00€ authorization.

    • If cofContract object is passed - the card check authorization will trigger an initial credential-on-file transaction, which can also be linked to a 3DS authentication. This option can be used in case the merchant only wants to store the payment credentials and at this point no real payment should be initiated.
    • If cofContractobject is not passed (POST with empty request body) - a simple card check will be triggered with 0 amount via MOTO channel and will return the status of the card.

    Once a 3DS autentication has been initiated the returned threeDsAuthenticationId should be provided as an input in order to link the authentication to the initial card check authorization.

    Supported brands:

    • Visa
    • Mastercard
    • AMEX
    • JCB
    • Diners/Discover

    Sample Cardcheck Request

    {
                    "threeDsAuthenticationId": "threedsauthentication_123",
                    "cofContract": {
                      "type": "UNSCHEDULED",

    Sample Card Check Response

    {
                    "id": "cardcheck_123",
                    "createdAt": 1561555495930,
                    "modifiedAt": 1561555495977,

    API - Order (CoF)

    The cofContract information can be passed as part of the order request (preauth or debit).

    For initial transactions the type has to be provided.

    Preauth/Debit Request (Initial COF)

    {
        ...
        "payment": {
          ...

    The Payengine will assign the cofContract to the payment instrument and log the usage including the required scheme identifiers returned for the initial transaction.

    Each cofContract will generate a unique Payengine identifier which is returned in the order response in the meta object.

    In case multiple cofContract are assigned to a payment instrument a corresponding list will be returned as part of the paymentInstrument attributes.

    Preauth/Debit Response

    {
        ...
        "paymentInstrument": {
          "paymentInstrumentId": "111",

    Once a subsequent transaction will be initiated the id of the cofContract should be provided in the request.

    Preauth/Debit Request (Subsequent COF)

    {
        ...
        "payment": {
          ...

    If there is only one cofContract assigned to a payment instrument the Payengine can automatically extract the relevant data and no cofContract.id would be required as an input for subsequent transactions.

    API - Widget Solutions

    Affected widget solutions:

    • Modal Widget
    • Inline Widget
    • Widget as a Bridge

    In order to flag the credential-on-file usage in the Payengine widget solutions a new cofContract.type has to be provided as part of the optionalFields.

    Supported values:

    • ONECLICK
    • SCHEDULED
    • UNSCHEDULED

    Preauth/Debit Request (Subsequent COF)

    var optionalParameters = {
        ...,
        "optionalFields": {
          ...,

    Whenever a cofContract.type will be provided the widget will show a new additional checkbox to "Store payment data for future payments".

    This checkbox should be used by the cardholder to give his consent for storing the payment credentials for future payments.

    A sample from the Modal Widget can be found below.

    The cofContract.type input is only used for the display of the corresponding checkbox in the widget. It is not stored with the payment instrument at this time. The cofContract still has to be assigned to the payment instrument either as part of the order request or as part of a card check.

    Modal & Inline Widget Validations

    For the Modal and Inline Widget the following validations will be done based on the checkbox.

    TypeCheckbox Validation
    ONECLICKIf checkbox is checked - ONECLICK cofContract will be created and associated with the newly created payment instrument. If checkbox is NOT checked - no consent is given by the cardholder, the payment will be process as a ONETIME payment and credentials cannot be used again.
    SCHEDULED / UNSCHEDULEDIf checkbox is checked - UNSCHEDULED/SCHEDULED cofContract will be created and associated with the newly created payment instrument. If checkbox is NOT checked - the PAY button will be inactive.

    Widget as a Bridge Validations

    For the Widget as a bridget the following validations will be done based on the checkbox.

    Type: ONECLICK, SCHEDULED, UNSCHEDULED

    Checkbox Validation: If checkbox is checked the checkout can proceed and the cofContract should be assigned to the payment instrument by the integrator either via card check or order. If checkbox is NOT checked - the PAY button will be inactive. In case the integrator implemented an own button an error would be returned instead.

    JavaScript SDK (JS Bridge)

    In order to assign the cofContract to a payment instrument and initiate a card check a new function cardCheck(paymentInstrumentId, cofType, channel, authenticationId, callback) is available in the JavaScript SDK (JS Bridge).

    ParameterDescription
    paymentInstrumentIdThe identifier of the stored payment instrument.
    cofTypeThe type of the cofContract. Supported values: SCHEDULED, UNSCHEDULED
    channelThe channel (entry mode) the payment instrument and corresponding transactions should be used for. Supported values: ECOM, MOTO
    authenticationIdThe 3DS authentication identifier obtained as result from threeDsAuthentication method call. (in case a 3DS authentication.

    Sample

    function callback(error, result) {...};
      var cofType = 'SCHEDULED';
      var channel = 'ECOM';
      window.PayEngine.cardCheck(paymentInstrumentId, cofType, channel, authenticationId, callback);

    Was this helpful?

    What was your feeling about it?