v1

latestOpenAPI 3.1.02026-07-241080412.6 KB

Create a pass [Beta]

Use this endpoint to create externally-managed passes. <br><br>The life cycle of externally-managed passes is managed outside of Cleeng so it is up to a publisher to notify Cleeng about pass status changes, e.g. the change of pass expiration date or pass termination if auto-termination is not enabled (if auto-termination is not enabled for the payment method, Cleeng platform will not terminate the pass when expiry date is reached, and the publisher will need to send the termination request to revoke access). <br><br> You can create multiple passes for the same offer and customer with this endpoint. But the endpoint prevents duplicate passes with the same external ID and source. It only allows new passes if there isn't already an active pass from the same source and with the same external ID.

post/passes

Headers

Content-Typestring

Request body

customerIdinteger required

The identifier of Cleeng customer. Minimum: 100000000, maximum: 999999999.

offerIdstring required

The identifier of Cleeng offer.

paymentMethodIdinteger required

The identifier of the payment method configured for externally-managed passes; provided by Cleeng.

externalIdstring required

The external identifier of a pass. The identifier must be unique for a given payment method (i.e. you can't have two identical identifiers for the same payment method).

expiresAtinteger

Expiration time in UNIX timestamp format. For non-expiring (permanent) passes it must be set to null. If the parameter is not provided, expiresAt will be calculated based on an offer.

paymentIdinteger

The identifier of Cleeng payment. (Payment must be created with the same paymentMethodId as specified here).

Response

201

passIdinteger
customerIdinteger
statusstring
offerIdstring
expiresAtinteger
paymentMethodIdinteger
externalIdstring
externalPropertiesobject
isExternallyManagedboolean
sourcestring

Example response

{
  "passId": 123456789,
  "customerId": 123123123,
  "status": "active",
  "offerId": "P987654321_PL",
  "expiresAt": 1713182652,
  "paymentMethodId": 111222333,
  "externalId": "CustomerExternalId",
  "isExternallyManaged": true,
  "source": "samsung"
}