Payment
400 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 - Account
Property | Type | Description |
---|---|---|
type |
"account" |
defining that it is an account payment |
account |
string |
(optional) id of account used to create this payment |
Examples:
{
"type": "account",
"account": "1234567890abcdef",
}
Completed Payment - Account
Converted into a Completed Payment - Card
(with account property set to account id).
Examples:
{
"reference": "1234abcd-12ab-34cd-56ef-1234567890ab",
"account": "1234567890abcdef",
"type": "card",
"status": "created",
"iin": "411111",
"last4": "1111",
"expires": [
2,
22
],
"amount": 7.42,
"currency": "SEK",
"scheme": "visa",
"service": "cardfunc",
"card": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjYXJkZnVuYyIsImlhdCI6MTYwMjc2MjA4MzY0MywiYXVkIjoicHJvZHVjdGlvbiIsInNjaGVtZSI6InZpc2EiLCJpaW4iOiI0MTExMTEiLCJsYXN0NCI6IjExMTEiLCJleHBpcmVzIjpbMiwyMl0sInR5cGUiOiJyZWN1cnJpbmciLCJjYXJkIjoieXBMaEJWdEMifQ.nz8JN_sig1Dowe_8-amJ4OdespKndOZbzqaLuwssMNNFjLuv1Vs-BidBYkCsiJDw0_hv8_3U1mvkaEN8O38ArarI6yIERGMMQhf-fOTdRp9RkNPtlrT89SLyPDkt0D0PiDM-UDXp1LFBHPEw-cgZad6t9XL3B-M3uy14SDRnPvVrUFe1zFFkg0t6XhEjNUt3imbesx5gU_3MDYJW0sk7OozC3r9VhM6HON-V5AeybOVpO4T3h9RdijqCeeWigTxXd3iW5TqDi2VIu-7VZJCACFWme1E43J3mTDt5nNjw7M6R1Nem94zqKQFTDBc2_Ft7J4pIQYeN36_lV5quoQQc5Q",
"created": "2020-07-14T10:24:37+00:00"
}
Creatable Payment - Card
Property | Type | Description |
---|---|---|
type |
"card" |
defining that it is a card 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 |
currency |
string |
(optional) currency (as three letter) |
Examples:
{
"type": "card",
"card": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjYXJkZnVuYyIsImlhdCI6MTYwMjc2MTM3MTc3NiwiYXVkIjoicHJvZHVjdGlvbiIsInNjaGVtZSI6InZpc2EiLCJpaW4iOiI0MTExMTEiLCJsYXN0NCI6IjExMTEiLCJleHBpcmVzIjpbMiwyMl0sInR5cGUiOiJzaW5nbGUgdXNlIiwiY2FyZCI6InlwTGhCVnRDIn0.Fn6wyfqF_ivVSszJybkztuaWjqX8QB_WwKWC7zRSISRsB0xO-0ysljHgTaZmx_L63GOdCBXTfCvZaTT00XN9WFCvwwFK72c0KYAhxIYnRUYBQ1jq_K3YUzE88i5gEdlc8iS54RyTdGnbCw__nJxs3EhJfUYNzfD8nGeE1erWcVPdkT5cjQ7TIstavdCPtTaZAiZcXkgeXny1KXHUzPR5P1PamL1DGtOrgktMtjwtu8MkbXZ_G6iU_IEg7md6KkCrOAwhSLosc8J-bKuUSOwzvHTVI8gydi7RgJx_FChIRtRfm2np3i_EMSZBfweS-KiGL5j4NyGyZzDWiXNM9AOYKQ",
}
Completed Payment - Card
Property | Type | Description |
---|---|---|
type |
"card" |
defining that it is a card payment |
account |
string |
(optional) id of account 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) reference to external acquirer transaction |
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": "1234abcd-12ab-34cd-56ef-1234567890ab",
"type": "card",
"status": "created",
"iin": "411111",
"last4": "1111",
"expires": [
2,
22
],
"amount": 7.42,
"currency": "SEK",
"scheme": "visa",
"service": "cardfunc",
"card": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjYXJkZnVuYyIsImlhdCI6MTYwMjc2MTM3MTc3NiwiYXVkIjoicHJvZHVjdGlvbiIsInNjaGVtZSI6InZpc2EiLCJpaW4iOiI0MTExMTEiLCJsYXN0NCI6IjExMTEiLCJleHBpcmVzIjpbMiwyMl0sInR5cGUiOiJzaW5nbGUgdXNlIiwiY2FyZCI6InlwTGhCVnRDIn0.Fn6wyfqF_ivVSszJybkztuaWjqX8QB_WwKWC7zRSISRsB0xO-0ysljHgTaZmx_L63GOdCBXTfCvZaTT00XN9WFCvwwFK72c0KYAhxIYnRUYBQ1jq_K3YUzE88i5gEdlc8iS54RyTdGnbCw__nJxs3EhJfUYNzfD8nGeE1erWcVPdkT5cjQ7TIstavdCPtTaZAiZcXkgeXny1KXHUzPR5P1PamL1DGtOrgktMtjwtu8MkbXZ_G6iU_IEg7md6KkCrOAwhSLosc8J-bKuUSOwzvHTVI8gydi7RgJx_FChIRtRfm2np3i_EMSZBfweS-KiGL5j4NyGyZzDWiXNM9AOYKQ",
"created": "2020-07-14T10:24:37+00:00"
}