# Setting up Poynt collect as a Merchant

This will cover the general flow in setting up and using Poynt Collect as a merchant

  1. Go to merchant portal on poynt.net then go to tab Account & Settings.

  2. Click on Business Profile

  3. Click on “+Create Key” to generate your Poynt Collect API Key. This is the key that will be used to mount poynt collect to your website.

  4. Add in any whitelisted domain sites that you wish for your site. Follow the format in the example.

  5. Afterwards, refer to the documentation from the developer docs, which will provide guidelines for the necessary code.

  6. Use the Poynt Collect API Key to mount Poynt Collect.

  7. Using event listeners, handle your success & error cases and test.


# Creating a token

Using the PoyntCollect instance, you can exchange card details for a token by calling poyntCollect.createToken method. Refer to createToken documentation for more details.

The token data can be retrieved by listening to the "token" event as outlined here.

Sample token data:

{
    "card": {
        "type": "VISA",
        "status": "ACTIVE",
        "expirationMonth": 11,
        "expirationYear": 22,
        "id": 35925414,
        "numberFirst6": "411111",
        "numberLast4": "1111",
        "numberMasked": "411111******1111",
        "cardHolderFirstName": "a",
        "cardHolderLastName": "s",
        "cardId": "ef58f587-edb9-4d35-9912-8403ce8e1767"
    },
    "applicationId": "urn:aid:1be37fcf-c229-4627-a812-f9c656e34130",
    "token": "e0846c32-b9f0-40b6-92c1-ee84405e4b76"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Charging a token

Given a token, one can charge it. This request should originate from your servers and uses the same OAuth2 flow as described here

Request URL: https://services.poynt.net/businesses/{businessId}/cards/tokenize/charge
Request method: POST
Request headers: Authorization: bearer ACCESS_TOKEN
Request body:

  {
    "action": "SALE",
    "context": {
      "businessId": "a7c2a900-68bd-4bfd-a36b-980663767e24",
      "storeId": "6f3e184c-79a6-4c12-b816-93102f6e5185",
      "storeDeviceId": "urn:tid:858b5707-58f9-306e-b4a9-83949658b5e6",
    },
    "amounts": {
      "transactionAmount": 300,
      "orderAmount": 300,
      "currency": "USD"
    },
    "fundingSource": {
      "cardToken": "baf0cfa4-61f1-470e-8ff3-2672941f6b57"
    }
  }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Sample response:

{
    "action": "SALE",
    "context": {
        "transmissionAtLocal": "2020-02-19T16:55:29Z",
        "businessId": "8a1619db-aef1-472c-91cb-e35b98d8cb5f",
        "storeId": "00b3fb08-b494-4450-97e0-bbe7a78ab620",
        "storeDeviceId": "urn:tid:897c8b3e-5637-346b-9e36-6512a54f8cd0",
        "mid": "888000000058",
        "mcc": "0064",
        "tid": "0064-0064"
    },
    "amounts": {
        "transactionAmount": 300,
        "orderAmount": 300,
        "tipAmount": 0,
        "cashbackAmount": 0,
        "currency": "USD"
    },
    "fundingSource": {
        "type": "CREDIT_DEBIT",
        "accountType": "EBT",
        "ebtDetails": {
            "type": "FOOD_STAMP"
        },
        "card": {
            "type": "VISA",
            "expirationMonth": 12,
            "expirationYear": 2020,
            "number": "4111180000001114"
        },
        "entryDetails": {
            "customerPresenceStatus": "PRESENT",
            "entryMode": "KEYED"
        },
        "cardToken": "ce266d06-f9f7-4280-8081-e64f62f3b58e"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Last Update: 8/25/2020, 6:04:43 PM