Payment · Payments for Programmers

Payments for Programmers

Payment

300 words 2 minutes

When creating or replacing payment for an order, a Creatable Payment datatype is used. These will be returned as part of the order with a (completed) Payment type.

Creatable Payment - Card

Property Type Description
type "card" defining that it is a card payment
account string (optional) account token used to create this payment
card string (optional) temporarily available token authorizing a card payment
reference string (optional) authorization token containing completed payment information
amount string (optional) amount to pay or payed amount

Examples:

{
		"type": "card",
		"account": "eyJ.exam.ple",
}

{
		"type": "card",
		"card": "eyJ.exam.ple",
}

{
		"type": "card",
		"reference": "eyJ.exam.ple",
}

Completed Payment - Card

Property Type Description
type "card" defining that it is a card payment
account string (optional) account token used to create this payment
scheme string card scheme (“Visa”, “Mastercard” etc.)
iin string first 6 digits of card number
last4 string last 4 digits of card number
expires [number, number] card expires date [ year / month ]
reference string (optional) authorization token containing completed payment information
service string card payment service, currently “cardfunc” | “defer”.
created string date payment was created
amount string payed amount
currency string currency (as three letter)
descriptor string (optional) description, often not provided
status string status of payment (currently only “created”)

Examples:

{
    "reference": "<payment reference>",
    "type": "card",
    "status": "created",
    "iin": "411111",
    "last4": "1111",
    "expires": [
				2,
				22
    ],
    "amount": 7.42,
    "currency": "SEK",
    "scheme": "visa",
    "service": "cardfunc",
    "created": "2020-07-14T10:24:37+00:00"
}