Nets Payment
Endpoints for Nets Payment
Endpoints for Nets Payment
POST/api/v1/payments/nets/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/nets/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/nets/order-intent
Authentication: Bearer token (JWT)
application/jsonorderIdnumberRequiredminimum: 1phonestringOptionalpaymentTokenstring (uuid)GET/api/v1/payments/nets/card-change-url
Authentication: Bearer token (JWT)
memberPackageIdnumberRequiredredirectUrlstringRequiredGET/api/v1/payments/nets/card-change
Authentication: Bearer token (JWT)
redirectUrlstringRequiredThis response has no body.
GET/api/v1/payments/nets/subscription-url
Authentication: Bearer token (JWT)
memberPackageIdnumberRequiredredirectUrlstringRequiredGET/api/v1/payments/nets/subscription-url/{memberId}
Authentication: Bearer token (JWT)
memberIdstringRequiredmemberPackageIdnumberRequiredredirectUrlstringRequiredGET/api/v1/payments/nets/callback
Authentication: Bearer token (JWT)
referencestringRequiredtenantIdnumberRequiredpackageIdnumberOptionalorderIdnumberOptionalPOST/api/v1/payments/nets/webhook/card-change/{tenantId}/{subscriptionId}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredsubscriptionIdstringRequiredAuthorizationstringRequiredPOST/api/v1/payments/nets/webhook/{tenantId}/{reference}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredreferencestringRequiredAuthorizationstringRequiredPOST/api/v1/payments/nets/webhook/change-payment-provider/{tenantId}/{memberPackageId}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredmemberPackageIdnumberRequiredAuthorizationstringRequiredPOST/api/v1/payments/nets/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": [
{}
]
}{
"orderId": 1,
"phone": "<phone>",
"paymentToken": "<paymentToken>"
}Same fields as NetsController_createIntent_v1 (201).
{
"hostedPaymentPageUrl": "string",
"checkoutStateUuid": "string",
"id": "string"
}unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/nets/order-intent \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"orderId": 1,
"phone": "<phone>",
"paymentToken": "<paymentToken>"
}'NetsUpdateCardResponsehostedPaymentPageUrlstringRequired{
"hostedPaymentPageUrl": "string"
}unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/card-change-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'application/jsonunauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/card-change?redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'application/jsonhostedPaymentPageUrlstringRequired{
"hostedPaymentPageUrl": "string"
}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 NetsController_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
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/nets/subscription-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'application/json{
"hostedPaymentPageUrl": "string"
}subscriptionAlreadyExists
{
"messageCode": "subscriptionAlreadyExists",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}subscriptionNotFound
{
"messageCode": "subscriptionNotFound",
"message": "string",
"errors": [
{}
]
}paymentProviderRequestInvalid
{
"messageCode": "paymentProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}paymentProviderUnavailable
{
"messageCode": "paymentProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/subscription-url/{memberId}?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/callback?reference=%3Creference%3E&tenantId=%3CtenantId%3E' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/webhook/card-change/{tenantId}/{subscriptionId}' \
--request POST \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/webhook/{tenantId}/{reference}' \
--request POST \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/nets/webhook/change-payment-provider/{tenantId}/{memberPackageId}' \
--request POST \
--header 'Authorization: Bearer <token>'unauthorized
This response has no body.
forbiddenResource
Same fields as NetsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/nets/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[].errorType