Automatic Payment API (v1.0)

Download OpenAPI specification:Download

Subscription creation

This method creates a new subscription.

SecurityApi-Key
Request
Request Body schema: application/json
name
required
string <= 255 characters

Name to identify the subscription.

Example: "Service XYZ Id 11.222.333-0"
email
required
string <= 255 characters

The customer e-mail.

Example: "personal.email@gmail.com"
max_amount
required
number <= 255 characters

max amount for every charge intent.

Example: 1000
currency
required
string <= 4 characters

the currency code in the ISO 4217.

Example: "CLP"
notify_url
required
string <= 1024 characters

URL that will be called when the customer complete the signing process with the bank. A JSON message will be sent via POST with the information of the subscription with the following structure (status can be "enabled" or "disabled"):

  {
    "subscription_id": string,
    "status": "enabled"
  }
Example: "https://my-domain.biz/subscription-notify-api"
return_url
required
string <= 1024 characters

URL to redirect the customer when the signing process has been completed.

Example: "https://my-domain.biz/subscription-result"
cancel_url
required
string <= 1024 characters

URL to redirect the customer if the signing process could not be completed.

Example: "https://my-domain.biz/subscription-cancel"
service_reference
string

Value to associate with the subscription. It can be useful when you don't want your client to be identified with a random unique string in the bank's mandate subscription form.

Example: "12345678K"
Responses
200

Successful operation. Returns a JSON object with the subscription id that can be used to ask the customer to sign the direct debit mandate.

400

Bad Request

401

Unauthorized - Invalid or missing credentials

404

Not found - Resource not available

500

Remote service error :(

post/v1/automatic-payment/subscription
Request samples
application/json
{}
Response samples
application/json
{}