Vipps Payment
Endpoints for Vipps Payment
Endpoints for Vipps Payment
POST/api/v1/payments/vipps/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>"
}
}vippsConfirmationUrlstringRequiredidstringRequiredcheckoutStateUuidstringcurlcurl https://api.subrite.no/api/v1/payments/vipps/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/vipps/order-intent
Authentication: Bearer token (JWT)
application/jsonorderIdnumberRequiredminimum: 1phonestringOptionalpaymentTokenstring (uuid)GET/api/v1/payments/vipps/callback
Authentication: Bearer token (JWT)
externalIdstringRequiredtenantIdnumberRequiredminimum: 1packageIdnumberOptionalminimum: 1orderIdnumberOptionalminimum: 1POST/api/v1/payments/vipps/webhook/{tenantId}
Authentication: Bearer token (JWT)
tenantIdnumberRequiredapplication/jsonagreementIdstringRequiredPOST/api/v1/payments/vipps/recurrent-payments
Authentication: Bearer token (JWT)
This response has no body.
GET/api/v1/payments/vipps/agreement/{agreementId}
Get agreement details from Vipps
Authentication: Bearer token (JWT)
agreementIdstringRequiredGET/api/v1/payments/vipps/agreement/{agreementId}/cancel/{chargeId}
Authentication: Bearer token (JWT)
agreementIdstringRequiredchargeIdstringRequiredGET/api/v1/payments/vipps/pause-due-subscriptions
Authentication: Bearer token (JWT)
This response has no body.
GET/api/v1/payments/vipps/queue-update-due-charges
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{
"vippsConfirmationUrl": "string",
"id": "string",
"checkoutStateUuid": "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 VippsController_createIntent_v1 (201).
{
"vippsConfirmationUrl": "string",
"id": "string",
"checkoutStateUuid": "string"
}unauthorized
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/vipps/order-intent \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"orderId": 1,
"phone": "<phone>",
"paymentToken": "<paymentToken>"
}'This response has no body.
unauthorized
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/vipps/callback?externalId=%3CexternalId%3E&tenantId=%3CtenantId%3E' \
--header 'Authorization: Bearer <token>'amountnumberamountCancelednumberRequiredamountCapturednumberRequiredamountRefundednumberRequiredchargeExternalIdstringRequiredchargeIdstringRequiredchargeTypestringRequiredcurrencystringRequiredeventTypestringRequired"recurring.charge-captured.v1", "recurring.charge-failed.v1", "recurring.agreement-stopped.v1"occurredstring (date-time)RequiredactorstringOptional"MERCHANT", "USER"{
"agreementId": "string",
"amount": 0,
"amountCanceled": 0,
"amountCaptured": 0,
"amountRefunded": 0,
"chargeExternalId": "string",
"chargeId": "string",
"chargeType": "string",
"currency": "string",
"eventType": "recurring.charge-captured.v1",
"occurred": "2019-08-24T14:15:22Z",
"actor": "MERCHANT"
}This response has no body.
unauthorized
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/vipps/webhook/{tenantId}' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agreementId": "string",
"amount": 0,
"amountCanceled": 0,
"amountCaptured": 0,
"amountRefunded": 0,
"chargeExternalId": "string",
"chargeId": "string",
"chargeType": "string",
"currency": "string",
"eventType": "recurring.charge-captured.v1",
"occurred": "2019-08-24T14:15:22Z",
"actor": "MERCHANT"
}'unauthorized
This response has no body.
forbiddenResource
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/vipps/recurrent-payments \
--request POST \
--header 'Authorization: Bearer <token>'objectNo named fields are defined for this schema.
{}unauthorized
This response has no body.
forbiddenResource
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}paymentProviderConfigNotFound
messageCodestringRequired"paymentProviderConfigNotFound"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": "paymentProviderConfigNotFound",
"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/vipps/agreement/{agreementId}' \
--header 'Authorization: Bearer <token>'application/jsonNo named fields are defined for this schema.
{}chargeCannotBeCancelled
messageCodestringRequired"chargeCannotBeCancelled"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": "chargeCannotBeCancelled",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}chargeNotFound
messageCodestringRequired"chargeNotFound"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": "chargeNotFound",
"message": "string",
"errors": [
{}
]
}paymentProviderRequestInvalid
Same fields as Get agreement details (422).
{
"messageCode": "paymentProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}paymentProviderUnavailable
Same fields as Get agreement details (502).
{
"messageCode": "paymentProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payments/vipps/agreement/{agreementId}/cancel/{chargeId}' \
--header 'Authorization: Bearer <token>'unauthorized
This response has no body.
forbiddenResource
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/vipps/pause-due-subscriptions \
--header 'Authorization: Bearer <token>'unauthorized
This response has no body.
forbiddenResource
Same fields as VippsController_createIntent_v1 (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payments/vipps/queue-update-due-charges \
--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