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
required
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"
image_url
string <= 1024 characters

URL of the image associated with the subscription.

Example: "https://my-domain.biz/subscription-image.png"
description
string

Detailed description of the PAC (Automatic Payment) subscription carried out at banks for products.

Example: "PAC subscription for automatic payment of products at your bank."
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.

Response Schema: application/json
subscription_id
required
string <= 255 characters

Unique subscription identifier, to be associated with the service acquired by the customer. Subsequently, this value can be used to check the status of the subscription.

Example: "13a0f1aa-5e47-4894-aa8b-282dd19593ec"
redirect_url
required
string <= 1024 characters

The url where the merchant must redirect the user so that he/she can sign the subscription with his/her personal bank. It uses the subscription id as a url parameter.

Example: "https://khipu.com/pac-manager/13a0f1aa-5e47-4894-aa8b-282dd19593ec"
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
{}