Payment-Provider
Endpoints for Payment-Provider
Endpoints for Payment-Provider
PATCH/api/v1/payment-provider/config
Authentication: Bearer token (JWT)
application/jsonconfigobjectRequiredpaymentProviderstringRequired"stripe", "vipps", "external", "nets", "efaktura-avtalegiro-ehf", "swedbankpay"{
"config": {},
"paymentProvider": "stripe"
}idnumberRequirednamePAYMENT_PROVIDERRequired"stripe", "vipps", "external", "nets", "efaktura-avtalegiro-ehf", "swedbankpay"curlcurl https://api.subrite.no/api/v1/payment-provider/config \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"config": {},
"paymentProvider": "stripe"
}'POST/api/v1/payment-provider/change-external
Authentication: Bearer token (JWT)
application/jsonmemberPackageIdnumberRequiredminimum: 1invoiceInfoPOST/api/v1/payment-provider/change-external/{memberId}
Authentication: Bearer token (JWT)
memberIdstringRequiredapplication/jsonGET/api/v1/payment-provider
Authentication: Bearer token (JWT)
namestringRequired when parent is presentGET/api/v1/payment-provider/settings/{id}
Authentication: Bearer token (JWT)
idnumberRequiredPATCH/api/v1/payment-provider/settings/{id}
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonidnumberOptionalGET/api/v1/payment-provider/settings
Authentication: Bearer token (JWT)
idnumberPOST/api/v1/payment-provider/settings
Authentication: Bearer token (JWT)
application/jsonSame fields as Update payment provider settings for admin page (Request body).
GET/api/v1/payment-provider/subscription-plan/{id}
Authentication: Bearer token (JWT)
idnumberRequiredDELETE/api/v1/payment-provider/clear-webhook-secret/{providerName}
Authentication: Bearer token (JWT)
providerNamestringRequiredThis response has no body.
configStripeConfig | VippsConfig | NetsConfig | OrbytConfig | ExternalConfig | SwedbankpayConfigRequiredwebhookEventsarray of stringRequiredallowedDaysAfterExpirynumberrenewWithoutPaymentbooleaneInvoicePaymentPreferenceEInvoicePaymentPreference8 fieldseInvoicePaymentPreferenceinitialActivationINITIAL_ACTIVATIONRequired when parent is presentField path: eInvoicePaymentPreference.initialActivation"ON_PAYMENT", "ON_ORDER"dueDaysAfterOrderForInitialnumberRequired when parent is presentField path: eInvoicePaymentPreference.dueDaysAfterOrderForInitialinitialDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: eInvoicePaymentPreference.initialDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"initialOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: eInvoicePaymentPreference.initialOnDueDeactivationBufferDaysorderDaysBeforeRenewalnumberRequired when parent is presentField path: eInvoicePaymentPreference.orderDaysBeforeRenewaldueDaysAfterOrderForRecurringnumberRequired when parent is presentField path: eInvoicePaymentPreference.dueDaysAfterOrderForRecurringrecurringDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: eInvoicePaymentPreference.recurringDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"recurringOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: eInvoicePaymentPreference.recurringOnDueDeactivationBufferDays{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}unauthorized
This response has no body.
forbiddenResource
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 presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}InvoiceInfoinvoiceInfofullNamestringRequiredField path: invoiceInfo.fullNameaddressstringRequiredField path: invoiceInfo.addresscitystringRequiredField path: invoiceInfo.citypostCodestringRequiredField path: invoiceInfo.postCodeorganizationNostringRequiredField path: invoiceInfo.organizationNocompanyNamestringRequiredField path: invoiceInfo.companyNamecountrystringRequiredField path: invoiceInfo.country{
"memberPackageId": 1,
"invoiceInfo": {
"fullName": "<fullName>",
"address": "<address>",
"city": "string",
"postCode": "string",
"organizationNo": "string",
"companyName": "string",
"country": "string"
}
}This response has no body.
invalidMemberPackageId
messageCodestringRequired"invalidMemberPackageId"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstring{
"messageCode": "invalidMemberPackageId",
"message": "string",
"errors": [
{}
]
}unauthorized
Same fields as Update payment provider configuration (403).
curlcurl https://api.subrite.no/api/v1/payment-provider/change-external \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"memberPackageId": 1,
"invoiceInfo": {
"fullName": "<fullName>",
"address": "<address>",
"city": "string",
"postCode": "string",
"organizationNo": "string",
"companyName": "string",
"country": "string"
}
}'ChangePaymentProviderAsExternalReqDto{
"memberPackageId": 1,
"invoiceInfo": {
"fullName": "<fullName>",
"address": "<address>",
"city": "string",
"postCode": "string",
"organizationNo": "string",
"companyName": "string",
"country": "string"
}
}This response has no body.
invalidMemberPackageId
{
"messageCode": "invalidMemberPackageId",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
curlcurl 'https://api.subrite.no/api/v1/payment-provider/change-external/{memberId}?memberId=%3CmemberId%3E' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"memberPackageId": 1,
"invoiceInfo": {
"fullName": "<fullName>",
"address": "<address>",
"city": "string",
"postCode": "string",
"organizationNo": "string",
"companyName": "string",
"country": "string"
}
}'[
{
"name": "string"
}
]unauthorized
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payment-provider \
--header 'Authorization: Bearer <token>'PaymentProviderSettingsResponseSame fields as Update payment provider configuration (200).
{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}paymentProviderSettingsNotFound
messageCodestringRequired"paymentProviderSettingsNotFound"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": "paymentProviderSettingsNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payment-provider/settings/{id}' \
--header 'Authorization: Bearer <token>'namePAYMENT_PROVIDEROptional"stripe", "vipps", "external", "nets", "efaktura-avtalegiro-ehf", "swedbankpay"configStripeConfig | VippsConfig | NetsConfig | OrbytConfig | ExternalConfig | SwedbankpayConfigOptionalwebhookEventsarray of stringOptionalallowedDaysAfterExpirynumberOptionalrenewWithoutPaymentbooleanOptionaleInvoicePaymentPreferenceEInvoicePaymentPreferenceOptional8 required when the containing object is present8 fieldseInvoicePaymentPreferenceinitialActivationINITIAL_ACTIVATIONRequired when parent is presentField path: eInvoicePaymentPreference.initialActivation"ON_PAYMENT", "ON_ORDER"dueDaysAfterOrderForInitialnumberRequired when parent is presentField path: eInvoicePaymentPreference.dueDaysAfterOrderForInitialinitialDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: eInvoicePaymentPreference.initialDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"initialOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: eInvoicePaymentPreference.initialOnDueDeactivationBufferDaysorderDaysBeforeRenewalnumberRequired when parent is presentField path: eInvoicePaymentPreference.orderDaysBeforeRenewaldueDaysAfterOrderForRecurringnumberRequired when parent is presentField path: eInvoicePaymentPreference.dueDaysAfterOrderForRecurringrecurringDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: eInvoicePaymentPreference.recurringDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"recurringOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: eInvoicePaymentPreference.recurringOnDueDeactivationBufferDays{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}Same fields as Update payment provider configuration (200).
{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payment-provider/settings/{id}' \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}'namePAYMENT_PROVIDERRequired when parent is present"stripe", "vipps", "external", "nets", "efaktura-avtalegiro-ehf", "swedbankpay"configStripeConfig | VippsConfig | NetsConfig | OrbytConfig | ExternalConfig | SwedbankpayConfigRequired when parent is presentwebhookEventsarray of stringRequired when parent is presentallowedDaysAfterExpirynumberrenewWithoutPaymentbooleaneInvoicePaymentPreferenceEInvoicePaymentPreference8 fields[].eInvoicePaymentPreferenceinitialActivationINITIAL_ACTIVATIONRequired when parent is presentField path: [].eInvoicePaymentPreference.initialActivation"ON_PAYMENT", "ON_ORDER"dueDaysAfterOrderForInitialnumberRequired when parent is presentField path: [].eInvoicePaymentPreference.dueDaysAfterOrderForInitialinitialDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: [].eInvoicePaymentPreference.initialDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"initialOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: [].eInvoicePaymentPreference.initialOnDueDeactivationBufferDaysorderDaysBeforeRenewalnumberRequired when parent is presentField path: [].eInvoicePaymentPreference.orderDaysBeforeRenewaldueDaysAfterOrderForRecurringnumberRequired when parent is presentField path: [].eInvoicePaymentPreference.dueDaysAfterOrderForRecurringrecurringDeactivationDEACTIVATION_POLICYRequired when parent is presentField path: [].eInvoicePaymentPreference.recurringDeactivation"ON_DUE", "ON_RENEWAL", "NEVER"recurringOnDueDeactivationBufferDaysnumberRequired when parent is presentField path: [].eInvoicePaymentPreference.recurringOnDueDeactivationBufferDays[
{
"id": 0,
"name": "stripe",
"config": {},
"webhookEvents": [],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {}
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payment-provider/settings \
--header 'Authorization: Bearer <token>'{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}Same fields as Update payment provider configuration (200).
{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/payment-provider/settings \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"id": 0,
"name": "stripe",
"config": {
"secretKey": "<secretKey>",
"publishableKey": "<publishableKey>",
"webhookSecret": "<webhookSecret>"
},
"webhookEvents": [
"string"
],
"allowedDaysAfterExpiry": 0,
"renewWithoutPayment": true,
"eInvoicePaymentPreference": {
"initialActivation": "ON_PAYMENT",
"dueDaysAfterOrderForInitial": 0,
"initialDeactivation": "ON_DUE",
"initialOnDueDeactivationBufferDays": 0,
"orderDaysBeforeRenewal": 0,
"dueDaysAfterOrderForRecurring": 0,
"recurringDeactivation": "ON_DUE",
"recurringOnDueDeactivationBufferDays": 0
}
}'array of stringNo named fields are defined for this schema.
[
"string"
]unauthorized
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payment-provider/subscription-plan/{id}' \
--header 'Authorization: Bearer <token>'unauthorized
This response has no body.
forbiddenResource
Same fields as Update payment provider configuration (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/payment-provider/clear-webhook-secret/{providerName}' \
--request DELETE \
--header 'Authorization: Bearer <token>'identifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}