POST /cardsΒΆ

Verify a card against a verification code. This endpoint is only active if card verification is available for an account.

Body parameters:

Name

Type

Description

card_number

string, required

a card number

registration_code

string, required

a registration code

Example request:

POST /cards HTTP/1.1
Host: api.ereceipts.co.uk
Accept: application/json
Content-Length: 77
Content-Type: application/json

{
  "card_number": "1234 5678 9012 3456",
  "registration_code": "ABCD1234"
}

Example response:

Success:

HTTP/1.1 204 No Content

Failure (invalid card number):

Returned if a card number verification algorithm is active and it fails to verify the supplied card number.

HTTP/1.1 400 Bad Request
Content-Length: 69
Content-Type: application/json

{
  "description": "invalid card number",
  "status": "bad request"
}

Failure (invalid registration code):

Returned the supplied registration code does not belong to the supplied card number.

HTTP/1.1 400 Bad Request
Content-Length: 75
Content-Type: application/json

{
  "description": "invalid registration code",
  "status": "bad request"
}

Failure (no cards):

Returned if a retailer does not have card verification enabled.

HTTP/1.1 400 Bad Request
Content-Length: 71
Content-Type: application/json

{
  "description": "retailer has no cards",
  "status": "bad request"
}