# Card Token API

Card token is a secure representation of a payment card and it allows you to safely handle cards when e.g. creating an order or a customer payment method.

If you have decided to integrate this API (and not use any of the UI components that reduce your PCI scope) keep in mind that tokenizing the card should be the first action you take.

# Create token

Make a POST with a Card Creatable to receive a Token back.

# Request

 










POST /v1/card

Host: merchant.intergiro.com
Content-Type: application/json
Authentication: Bearer <customer.api.key> | Bearer <public.api.key>
{
	"pan": "<card number>",
	"csc": "<card security code>",
	"expires": [<card expires month>, <card expires year>]
}

# Response

<signed.card.token>

# Get token

To fetch information about a card, make a GET call to the card endpoint with the card token included in the url. The endpoint will return a Card.

# Request

 






GET /v1/card/:card_token

Host: merchant.intergiro.com
Content-Type: application/json
Authentication: Bearer <customer.api.key> | Bearer <public.api.key>

# Response

{
    "scheme": "<card scheme>",
    "iin": "<card iin>",
    "last4": "<last 4>",
    "expires": [<card expires month>, <card expires year>]
}

# Update token

To update information on a card, send a PUT or PATCH request to the card endpoint with the card token in the url. The body of the request should be a Card Creatable. The response will be the updated card token.

If verification is needed then the verification field can be populated in the body and a PUT or PATCH request can be sent to the card endpoint.

# Request

 





















PUT /v1/card/:card_token

Host: merchant.intergiro.com
Content-Type: application/json
Authentication: Bearer <customer.api.key> | Bearer <public.api.key>
{
	"pan": "<card number>",
	"csc": "<card security code>",
	"expires": [<card expires month>, <card expires year>],
	"verification": {
		"type": "challenge",
		"data": {
			"acsTransID": "66592456-d89d-44aa-bbb3-f746c7f25ef4",
			"challengeCompletionInd": "Y",
			"messageType": "CRes",
			"messageVersion": "2.2.0",
			"threeDSServerTransID": "a02a909d-f1ae-4710-ac8b-8e701cd22730",
			"transStatus": "Y"
		}
	}
}

# Response

<signed.card.token>