Create recurring account

Creates a recurring account that can be used to create recurring payments. Once an account is created and activated it can be used to create periodical payments, typically to pay for a subscription.

The response will contain a token that is used to activate the account through the client API, and an account id that is used to create recurring payments.

Request

  • your-authorization should be replaced with your Authorization header, see Access
  • your-user-id in the URI, should be replaced with your identifier of the user
  • merchantId in the request body, identifies the merchant that the recurring payments should be made for
Copy
Copied
POST /v1/users/{your-user-id}/recurring-accounts

Content-Type: application/json
Accept: application/json
Authorization: $(your-authorization)
Request Body schema: application/json

Recurring account

object (RecurringAccountCreateDto)
merchantId
string
application/json
{
  • "account": {
    }
}

Response

Success

Response Schema: application/json
object (RecurringAccountDto)
id
string
merchantId
string
status
string

Account status:

Status Description
CREATED Account is created but not yet activated
ACTIVATION_FAILED Account could not be activated
ACTIVE Account is active and payments can be created
INACTIVE Account is temporarily inactivated
CLOSED Account is permanently closed and can not be used again
Enum: "CREATED" "ACTIVATION_FAILED" "ACTIVE" "INACTIVE" "CLOSED"
token
string
application/json
{
  • "account": {
    },
  • "token": "token"
}
Error responses

Please refer to our HTTP response codes and Error codes to learn what error responses you may expect from the API.

Example

Try it

Loading...