POST /CheckOut2Api/GetPaymentStatus
Returns information about a single purchase identified by a Purchase ID.
Input Parameters
Name | Data Type | Default value | Description |
---|---|---|---|
PurchaseId | String | None. Must be specified | The ID obtained during the negotiation phase that identified the purchase. |
Example request
{
"PurchaseId": "19ac0d1ee909c302d212b4324d9194b5"
}
Output parameters
The method returns an object that differs if the purchase was loan, invoice, direct payment or card payment.
Name | Data Type | Description | Invoice | Loan | Card payment | Direct payment |
---|---|---|---|---|---|---|
AccountNumber | String | The bank account number associated with the payment. | ||||
InvoicingFirstName | String | The first name of the customer on the invoicing address. | ||||
InvoicingLastName | String | The last name of the customer on the invoicing address. | ||||
InvoicingAddressLine1 | String | The first line of the invoicing address. | ||||
InvoicingAddressLine2 | String | The second line of the invoicing address. | ||||
InvoicingZip | String | The ZIP code on the invoicing address. | ||||
InvoicingCity | String | The city on the invoicing address. | ||||
InvoicingCountry | String | The Country of the invoicing address (e.g. Sweden, Finland, Norway, Denmark) | ||||
AccountClassCode | String | Code of account class for this purchase. | ||||
PurchaseId | String | The same Purchase ID that was passed as an input parameter. | ||||
State | Enumeration CheckOutPurchaseState | The current state of the purchase. | ||||
Description | String | The description provided by partner’s site. | ||||
Price | Decimal | The total amount to pay. | ||||
Created | DateTime | The local date and time at which the purchase has been negotiated. | ||||
BeingProcessed | Nullable DateTime | The local date and time at which the form was first rendered. Null if the form hasn’t been shown yet. | ||||
Completed | Nullable DateTime | The local date and time at which the purchase has been completed. Null if the purchase hasn’t been completed yet. | ||||
Cancelled | Nullable DateTime | The local date and time at which the purchase has been canceled. Null it the purchase hasn’t been cancelled (yet). | ||||
SiteCode | String | The code of the partner’s site at which the purchase has been made. | ||||
CountryCode | String | A three-letter ISO country code (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 (opens in a new tab)) associated with the partner’s site at which the purchase has been made. | ||||
CurrencyCode | String | The three-letter code of the currency in which the purchase has been made. For Example “SEK” or EUR | ||||
Phone | String | The phone number that the customer typed-in into the form. | ||||
String | The e-mail address that the customer typed-in into the form. | |||||
DeliveryFirstName | String | The first name of the customer on the delivery address. | ||||
DeliveryLastName | String | The last name of the customer on the delivery address. | ||||
DeliveryAddressLine1 | String | The first line of the delivery address. | ||||
DeliveryAddressLine2 | String | The second line of the delivery address. | ||||
DeliveryCity | String | The city of the delivery address. | ||||
DeliveryCountry | String | The country of the delivery address. | ||||
OrderReference | String | Merchant custom ID reference. | ||||
AuthenticationType | Enumeration CheckOutAuthenticationType | Type of authentication for this purchase. | ||||
PaymentMethod | Enumeration PaymentMethod | Type of payment. | ||||
IsRecurringPayment | Boolean | Differs if payment is recurring. | ||||
RecPmtToken | String | Recurring payment token. | ||||
CardExpirationDate | String | Card expiration date stored in this format “YYMM”. | ||||
MaskedCardNumber | String | Masked card number for security purpose. | ||||
CardBrand | String | Brand cards. | ||||
CustomerToken | String | Remember me token. Can be used to auto load customer for next purchase if logged in. | ||||
IsOrganization | Boolean | Differantiate B2B and B2C. | ||||
ReferenceName | String | Reference name for better handling. | ||||
CompanyName | String | Name of the company. | ||||
NewsLetterValue | Boolean | If the value is true, newsletter is checked. | ||||
OfferedNewsLetterSettings | Boolean | Serves for displaying the newsletter. | ||||
NewsLetterSMSValue | Boolean | If the value is true, newsletterSMS is checked. | ||||
OfferedNewsLetterSMSSettings | Boolean | Serves for displaying the newsletter. | ||||
OrganizationNumber | String | Returns organization number if there is any value. | ||||
B2BAdditionalInfo | String | Additional information for B2B purchases. | ||||
CustomerType | Enum | If CustomerType = null or 0 load both options for Private/Company. If CustomerType = 1 load only Private alternative. If CustomerType = 2 load only Company alternative. | ||||
Attachment | String | The last attached custom data if any; otherwise, null. | ||||
CustomerBalance | Decimal | Current balance for order delivery. Amount up to this value is accepted for new purchase orders. Amount includes eventual tolerance and previous part deliveries. |
Return Value
{
"AccountNumber": "191234567890",
"InvoicingFirstName": "FirstName",
"InvoicingLastName": "LastName",
"InvoicingAddressLine1": "Invoicing address line",
"InvoicingAddressLine2": null,
"InvoicingZip": "60359",
"InvoicingCity": "City",
"AccountClassCode": "7",
"PurchaseId": "19ac0d1ee909c302d212b4324d9194b5",
"State": 2,
"Description": "Blue ball",
"Price": 111.11,
"Created": "2017-04-12T14:19:31.19",
"BeingProcessed": "2017-04-12T14:19:34.007",
"Completed": "2017-04-12T14:19:58.117",
"Cancelled": null,
"SiteCode": "TestSweden1",
"CountryCode": "SWE",
"CurrencyCode": "SEK",
"Phone": "074594175",
"Mail": "email@email.em",
"DeliveryFirstName": null,
"DeliveryLastName": null,
"DeliveryAddressLine1": null,
"DeliveryAddressLine2": null,
"DeliveryZip": null,
"DeliveryCity": null,
"DeliveryCountry": null,
"OrderReference": "45612",
"AuthenticationType": 0,
"PaymentMethod": 2,
"IsRecurringPayment": false,
"RecPmtToken": "49872728d3bef6fe3203c7678b4ecc56",
"CardExpirationDate": null,
"MaskedCardNumber": null,
"CardBrand": null,
"IsOrganization": true,
"ReferenceName": "string",
"CompanyName": "string",
"B2BAdditionalInfo": "Second contact person is Stefan",
"NewsLetterValue": true,
"OfferedNewsLetterSettings": true,
"NewsLetterSMSValue": true,
"CustomerBalance": 150.11,
"OfferedNewsLetterSMSSettings": true
}
Enumeration States
The enumeration describes the state of a single Purchase. Please refer to the diagram in Purchase States chapter to see possible transitions between states.
Name | Value | Description |
---|---|---|
New | 0 | The partner site just negotiated a session but the Check-Out form hasn’t been shown in a browser yet. |
BeingProcessed | 1 | The customer is going through the Check-Out wizard. |
Completed | 2 | The Check-Out has been successfully completed. |
Error | 3 | The Check-Out session has been canceled either by the user or due to an error. |
WaitingForSignicat | 4 | A redirect to Signicat website has been made and the customer hasn’t get redirected back to the original page yet. It purchases gets stuck it this state, a possible cause is that the page of the partner site that hosts the Check-Out form doesn’t handle redirects correctly. |
SessionTimedOut | 5 | The session timed out or wasn’t even created for a long time after the purchase has been initialized. |
WaitingForCardPayments | 6 | A redirect to card payment provider has been made and the customer hasn’t been redirected back to the original page yet. Same as with WaitingForSignicat state, if purchases gets stuck in this state, the host page might not be able to render itself repeatedly. |
WaitingForBankId | 7 | Waiting for response from BankId application. |
Cancelled | 8 | When merchant calls CancelPayment method and order is canceled. |
WaitingForFinnishDirectPayment | 9 | The customer has been redirected to a Finnish bank for a direct payment. |
WaitingCreditApproval | 10 | Waiting for Credit approval from merchant. |
CreditNotApproved | 11 | If credit isn´t approved by merchant, purchase is in this state. |
WaitingForSwishPayment | 12 | Waiting for response from Swish application. |
PaymentHandledByMerchant | 13 | The customer has started External payment method. |