One can create a loyalty cards together with a payment (Smart Transaction), what is especially useful to already collect bonus with that very purchase. Or one can create the card alone.

The API endpoint to create a card alone is POST /api/v2/Loyalty/MerchantCards/{merchant-id}/CreateMerchantcards/{card-group-id}:

Request
POST /api/v2/Loyalty/MerchantCards/MRC_GQBZSHFLXSOLI4A4OVP7Z22RELXSJY/CreateMerchantcards/CRG_IT1FQXHQ88O0YWZCZYPVE2N4FWP32C
Host: connect-testing.secuconnect.com
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"cards_amount": 1,
"customer": {
"merchant_contact": {
"salutation": null,
"title": "Herr",
"forename": "Max",
"surname": "Mustermann",
"companyname": "Musterfirma GmbH",
"address": {
"street": "Musterstr.",
"street_number": "1a",
"postal_code": "09999",
"city": "Musterstadt"
},
"email": "max@example.com",
"phone": "0555/5555555-1",
"mobile": "0155/5555555",
"fax": "0555/5555555-55"
},
"customernumber": "123",
"note": "",
"consent_for_communication": "accepted",
"additional_data": {
// ...
}
}
}

This are the URL path parameters:

Parameter

Meaning

{merchant-id}

Merchant ID (MRC_xxx)

{card-group-id}

Card Group ID (CRG_xxx)

You receive both these IDs from our help desk.

The request parameters are:

Parameter

Type

Meaning

cards_amount

int

Number of cards to create

customer

object

Customer details (s. details below)

The customer details are:

Parameter

Type

Meaning

merchant_contact

object

Contact details of the your card holder (s. details below)

customernumber

string

Your customer ID

note

string

Optional note

consent_for_communication

string

Whether the customer has given consent for communication:

  • accepted – The customer has given consent.
  • declined – The customer has declined consent.
  • not_set – The customer has not been asked for consent.

Consent is needed for secuaction in order to send SMS or email.

additional_data

object

Project specific data.

The merchant_contact details are:

Parameter

Type

Meaning

salutation

string

Salution

title

string

Academic degree or name title

forename

string

First name

surname

string

Last name

companyname

string

Company name

address

object

Postal address (s. details below)

email

string

Email address

phone

string

Landline phone number

mobile

string

Mobile phone number

fax

string

Fax number

The address details inside merchant_contact are:

Parameter

Type

Meaning

street

string

Street, or street and house number.

street_number

string

Optional; separate house number.

postal_code

string

ZIP code

city

string

City

country

string

Optional; ISO 3166 two letter country code

If everything is fine, the API responds with 200 OK, and the created Merchant Card object:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...      
 
{
"object": "loyalty.merchantcards",
"id": "MCD_3W4U7T804H2Q2648UVKZRMS9704ZO5",
"merchant": {
"object": "general.merchants",
"id": "MRC_WZV7ETCK8VDT2R0MJQX2VZHGNB0ZP9"
},
"created_for_merchant": {
"object": "general.merchants",
"id": "MRC_WZV7ETCK8VDT2R0MJQX2VZHGNB0ZP9"
},
"card": {
"object": "loyalty.cards",
"id": "CRD_7TQ6YBBRGGFPPK7Z54TZMU88H2T2OW",
"cardnumber": "9276004423077556",
"created": "2022-04-27T09:47:31+02:00"
},
"cardgroup": {
"object": "loyalty.cardgroups",
"id": "CRG_W88XMU3DAH7XW463JY7ACQ85RJKASM",
"display_name": "vorläufige Karte Werdenfelser Radlstub´n",
"display_name_raw": "vorläufige Karte Werdenfelser Radlstub´n",
"stock_warn_limit": 0,
"picture": "https://connect.secucard.com/ds_g/8e79737df1e2513db48908b342c3cc436edf501a"
},
"created_for_store": {
"object": "general.stores",
"id": "STO_RSNTSEYKWMU78EFE3Q6MGGSNNB0ZPG"
},
"is_base_card": true,
"points": 0,
"cash_balance": 0,
"bonus_balance": 0,
"balance": 0,
"last_usage": null,
"last_charge": null,
"stock_status": "stored",
"lock_status": "unlocked",
"passcode": 1,
"expiry_date": null
}

...