v1

latestOpenAPI 3.1.02026-07-24441967.0 KB

Create a Subscription

This endpoint allows you to create a new subscription for a customer. Creating a subscription involves associating a customer with a specific subscription plan and recording their payment information.

post/api/payin/subscriptions

Headers

Authorizationstring required

Bearer access token for authentication. This token is obtained from the Get Access Token or Refresh Access Token endpoints.

Request body

externalIdstring required

A unique identifier generated by your system to track the transaction (alphanumeric and hyphens). We recommend using UUID4 to ensure uniqueness.

country'ARG' | 'BOL' | 'BRA' | 'CHL' | 'COL' | 'CRI' | 'DOM' | 'ECU' | 'SLV' | 'GTM' | 'HND' | 'MEX' | 'PAN' | 'PRY' | 'PER' | 'URY' required

Document country. ISO 3166-1 alpha-3.

amountnumber required

Transaction amount.

currency'ARS' | 'BOB' | 'BRL' | 'CLP' | 'COP' | 'CRC' | 'DOP' | 'USD' | 'GTQ' | 'MXN' | 'PYG' | 'PEN' | 'UYU' required

Currency codes.

accountNumberstring required

Localpayment account number.

conceptCode'0001' | '0002' | '0003' | '0004' | '0005' | '0006' | '0007' | '0008' | '0009' | '0010' | '0011' | '0012' | '0013' | '0014' | '0015' | '0016' | '0017' | '0018' | '0019' | '0020' | '0021' | '0022' | '0023' | '0024' | '0025' | '0026' | '0027' | '0028' | '0029' | '0030' | '0031' | '0032' | '0033' | '0034' | '0035' | '0036' | '0037' | '0038' | '0039' | '0040' required

Reason for the payment code.

commentstring

Additional information

exchangeRateTokenstring

Token provided by the Foreign Exchange service in order to use an upfront agreed exchange rate.

metaDatastring

Unstructured object to record any metadata meaningful to you.

invoicestring

Invoice reference.

type'SOFTWARE' | 'STREAMING' | 'CONTENT' | 'PRODUCTS' | 'MEMBERSHIP' required

Specifies the subscription category.

Example request

{
  "payer": {
    "document": {
      "type": "RUC",
      "id": "1791234561009"
    },
    "address": {
      "street": "Independencia",
      "number": "123",
      "city": "Cordoba",
      "state": "Cordoba",
      "country": "ARG",
      "zipCode": "X5000IUO",
      "comment": "Sucursal 123"
    }
  },
  "merchant": {
    "document": {
      "type": "RUC",
      "id": "1791234561009"
    },
    "address": {
      "street": "Independencia",
      "number": "123",
      "city": "Cordoba",
      "state": "Cordoba",
      "country": "ARG",
      "zipCode": "X5000IUO",
      "comment": "Sucursal 123"
    }
  },
  "card": {
    "expirationMonth": "01",
    "expirationYear": "2025"
  }
}

Response

OK

subscriptionIdstring

Unique identifier for the subscription.

creationDatestring

Date and time when the subscription was created. The timestamp follows the ISO 8601 format.

nextPaymentDatestring

Date and time when the next payment for the subscription is due. The timestamp follows the ISO 8601 format.