Swedbankpay Payment
Endpoints for Swedbankpay Payment
Endpoints for Swedbankpay Payment
POST/api/v1/payments/swedbankpay/intent
Authentication: Bearer token (JWT)
user-agentstringRequiredapplication/jsonpackageIdnumberRequiredminimum: 1isSavedbooleanRequiredoptionalProductsarray of OptionalProductWithQuantityOptional2 required when the containing object is present4 fieldsoptionalProductsproductIdnumberRequired when parent is presentField path: optionalProducts[].productIdminimum: 1quantitynumberRequired when parent is presentField path: optionalProducts[].quantity{
"packageId": 1,
"isSaved": true,
"userData": {
"memberId": "string",
"email": "user@example.com",
"fullName": "<fullName>",
"phone": "<phone>",
"payerPhone": "<payerPhone>",
"countryCode": "NO",
"isCompany": true,
"companyName": "string",
"organizationNo": "string",
"reference": "string",
"onCheckoutCompletedUrl": "string",
"userAgent": "string",
"channel": "mobile",
"sourceUrl": "string",
"referrerUrl": "string"
},
"billingAddress": {
"address": "<address>",
"addressTwo": "<addressTwo>",
"companyName": "string",
"organizationNo": "string",
"postCode": "string",
"city": "string",
"country": "string",
"invoiceReference": "string",
"email": "string",
"fullName": "<fullName>",
"phone": "<phone>"
}
}hostedPaymentPageUrlstringRequiredcheckoutStateUuidstringidstringRequiredcurlcurl https://api.subrite.no/api/v1/payments/swedbankpay/intent \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'user-agent: <user-agent>' \
--data '{
"packageId": 1,
"isSaved": true,
"optionalProducts": [
{}
],
"userData": {
"memberId": "string",
"email": "user@example.com",
"fullName": "<fullName>",
"phone": "<phone>",
"payerPhone": "<payerPhone>",
"countryCode": "NO",
"isCompany": true,
"companyName": "string",
"organizationNo": "string",
"reference": "string",
"onCheckoutCompletedUrl": "string",
"userAgent": "string",
"channel": "mobile",
"sourceUrl": "string",
"referrerUrl": "string"
},
"billingAddress": {
"address": "<address>",
"addressTwo": "<addressTwo>",
"companyName": "string",
"organizationNo": "string",
"postCode": "string",
"city": "string",
"country": "string",
"invoiceReference": "string",
"email": "string",
"fullName": "<fullName>",
"phone": "<phone>"
}
}'POST/api/v1/payments/swedbankpay/order-intent
Authentication: Bearer token (JWT)
application/jsonorderIdnumberRequiredminimum: 1phonestringOptionalGET/api/v1/payments/swedbankpay/card-change-url
Authentication: Bearer token (JWT)
memberPackageIdnumberRequiredredirectUrlstringRequiredpattern: /^\//GET/api/v1/payments/swedbankpay/card-change
Authentication: Bearer token (JWT)
memberPackageIdnumberRequiredredirectUrlstringRequiredpattern: /^\//GET/api/v1/payments/swedbankpay/subscription-url
Authentication: Bearer token (JWT)
memberPackageIdnumberRequiredredirectUrlstringRequiredpattern: /^\//GET/api/v1/payments/swedbankpay/subscription-url/{memberId}
Authentication: Bearer token (JWT)
memberIdstringRequiredmemberPackageIdnumberRequiredredirectUrlstringRequiredpattern: /^\//GET/api/v1/payments/swedbankpay/callback
Authentication: Bearer token (JWT)
referencestringRequiredtenantIdnumberRequiredpackageIdnumberOptionalorderIdnumberOptionalPOST/api/v1/payments/swedbankpay/webhook/card-change/{tenantId}/{memberPackageId}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredmemberPackageIdnumberRequiredauthstringRequiredPOST/api/v1/payments/swedbankpay/webhook/change-payment-provider/{tenantId}/{memberPackageId}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredmemberPackageIdnumberRequiredauthstringRequiredapplication/jsonPOST/api/v1/payments/swedbankpay/webhook/{tenantId}/{reference}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredreferencestringRequiredauthstringRequiredapplication/jsonSame fields as .
POST/api/v1/payments/swedbankpay/recurrent-payments
Authentication: Bearer token (JWT)
This response has no body.
minimum: 1shippingCountrystringOptionalField path: optionalProducts[].shippingCountrymaxLength: 64manualPricenumberOptionalField path: optionalProducts[].manualPriceuserDataCheckoutUserRequired15 fieldsuserDatamemberIdstringOptionalField path: userData.memberIdemailstring (email)OptionalField path: userData.emailfullNamestringRequiredField path: userData.fullNamephonestringOptionalField path: userData.phonemaxLength: 20payerPhonestringOptionalField path: userData.payerPhonemaxLength: 20countryCodestringOptionalField path: userData.countryCode"NO", "SE", "DK", "FI", "FO", "GB"isCompanybooleanOptionalField path: userData.isCompanycompanyNamestringOptionalField path: userData.companyNameorganizationNostringOptionalField path: userData.organizationNoreferencestringOptionalField path: userData.referenceonCheckoutCompletedUrlstringOptionalField path: userData.onCheckoutCompletedUrluserAgentstringOptionalField path: userData.userAgentchannelstringOptionalField path: userData.channel"mobile", "desktop"sourceUrlstringOptionalField path: userData.sourceUrlreferrerUrlstringOptionalField path: userData.referrerUrlbillingAddressBillingAddressOptional3 required when the containing object is present11 fieldsbillingAddressaddressstringRequired when parent is presentField path: billingAddress.addressaddressTwostringOptionalField path: billingAddress.addressTwocompanyNamestringOptionalField path: billingAddress.companyNameorganizationNostringOptionalField path: billingAddress.organizationNopostCodestringRequired when parent is presentField path: billingAddress.postCodecitystringOptionalField path: billingAddress.citycountrystringRequired when parent is presentField path: billingAddress.countryinvoiceReferencestringOptionalField path: billingAddress.invoiceReferenceemailstringOptionalField path: billingAddress.emailfullNamestringOptionalField path: billingAddress.fullNamephonestringOptionalField path: billingAddress.phone{
"hostedPaymentPageUrl": "string",
"checkoutStateUuid": "string",
"id": "string"
}unauthorized
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is present{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}forbidden
messageCodestringRequired"forbidden"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is present{
"messageCode": "forbidden",
"message": "string",
"errors": [
{}
]
}checkoutPhoneHasAccount
messageCodestringRequired"checkoutPhoneHasAccount"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is present{
"messageCode": "checkoutPhoneHasAccount",
"message": "string",
"errors": [
{}
]
}paymentTokenstring (uuid){
"orderId": 1,
"phone": "<phone>",
"paymentToken": "<paymentToken>"
}Same fields as SwedbankpayController_createIntent_v1 (201).
{
"hostedPaymentPageUrl": "string",
"checkoutStateUuid": "string",
"id": "string"
}unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/swedbankpay/order-intent \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"orderId": 1,
"phone": "<phone>",
"paymentToken": "<paymentToken>"
}'application/jsonpaymentOrderobjectRequired1 fieldpaymentOrderidstringRequiredField path: paymentOrder.idoperationsarray of SwedbankpayOperationDtoRequired4 fieldsoperationsrelstringRequired when parent is presentField path: operations[].relhrefstringRequired when parent is presentField path: operations[].hrefmethodstringRequired when parent is presentField path: operations[].methodcontentTypestringField path: operations[].contentType{
"paymentOrder": {
"id": "string"
},
"operations": [
{}
]
}unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}paymentInfoNotFound
messageCodestringRequired"paymentInfoNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCode{
"messageCode": "paymentInfoNotFound",
"message": "string",
"errors": [
{}
]
}paymentProviderRequestInvalid
messageCodestringRequired"paymentProviderRequestInvalid"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCode{
"messageCode": "paymentProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}paymentProviderUnavailable
messageCodestringRequired"paymentProviderUnavailable"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCode{
"messageCode": "paymentProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/card-change-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/card-change?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'application/jsonSame fields as SwedbankpayController_getCardChangeUrl_v1 (200).
{
"paymentOrder": {
"id": "string"
},
"operations": [
{}
]
}subscriptionAlreadyExists
messageCodestringRequired"subscriptionAlreadyExists"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCode{
"messageCode": "subscriptionAlreadyExists",
"message": "string",
"errors": [
{}
]
}unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}subscriptionNotFound
messageCodestringRequired"subscriptionNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCode{
"messageCode": "subscriptionNotFound",
"message": "string",
"errors": [
{}
]
}paymentProviderRequestInvalid
Same fields as SwedbankpayController_getCardChangeUrl_v1 (422).
{
"messageCode": "paymentProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}paymentProviderUnavailable
Same fields as SwedbankpayController_getCardChangeUrl_v1 (502).
{
"messageCode": "paymentProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/subscription-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'application/jsonSame fields as SwedbankpayController_getCardChangeUrl_v1 (200).
{
"paymentOrder": {
"id": "string"
},
"operations": [
{}
]
}subscriptionAlreadyExists
Same fields as Get checkout url to subscribe Swedbankpay as a provider without initial charge (400).
{
"messageCode": "subscriptionAlreadyExists",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}subscriptionNotFound
Same fields as Get checkout url to subscribe Swedbankpay as a provider without initial charge (404).
{
"messageCode": "subscriptionNotFound",
"message": "string",
"errors": [
{}
]
}paymentProviderRequestInvalid
Same fields as SwedbankpayController_getCardChangeUrl_v1 (422).
{
"messageCode": "paymentProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}paymentProviderUnavailable
Same fields as SwedbankpayController_getCardChangeUrl_v1 (502).
{
"messageCode": "paymentProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/subscription-url/{memberId}?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/callback?reference=%3Creference%3E&tenantId=%3CtenantId%3E' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/card-change/{tenantId}/{memberPackageId}?auth=%3Cauth%3E' \
--request POST \
--header 'Authorization: Bearer <token>'SwedbankpayWebhookDtopaymentOrderSwedbankpayPaymentOrderDtoRequired1 fieldpaymentOrderidstringRequiredField path: paymentOrder.idorderReferencestringOptionalreferencestringOptional{
"paymentOrder": {
"id": "string"
},
"orderReference": "string",
"reference": "string"
}This response has no body.
unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/change-payment-provider/{tenantId}/{memberPackageId}?auth=%3Cauth%3E' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"paymentOrder": {
"id": "string"
},
"orderReference": "string",
"reference": "string"
}'{
"paymentOrder": {
"id": "string"
},
"orderReference": "string",
"reference": "string"
}This response has no body.
unauthorized
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/{tenantId}/{reference}?auth=%3Cauth%3E' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"paymentOrder": {
"id": "string"
},
"orderReference": "string",
"reference": "string"
}'unauthorized
This response has no body.
forbiddenResource
Same fields as SwedbankpayController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/swedbankpay/recurrent-payments \
--request POST \
--header 'Authorization: Bearer <token>'messagestringerrorTypestringRequired when parent is presentField path: errors[].errorTypemessagestringerrorTypestringRequired when parent is presentField path: errors[].errorTypemessagestringerrorTypestringRequired when parent is presentField path: errors[].errorTypemessagestringerrorTypestringRequired when parent is presentField path: errors[].errorTypemessagestringerrorTypestringRequired when parent is presentField path: errors[].errorType