Start a trial
Starts a subscription on a free trial, with no card and no charge. It starts trialing, its current period runs from the start to trialEnd, and nextBillingAt is null. subscription.trial-will-end goes out 3 days before trialEnd, or at the start of a trial of 3 days or less. A trial that ends without a card pauses or cancels per trialEndBehavior. The organization needs a webhook endpoint.
apiKeyAuthorizationBearer <token>An API key of the organization the request acts for, created in the dashboard and sent as "Authorization: Bearer ".
The customer, the items and the trial
application/json- body
customer*Who subscribes. Creates the customer on first use and updates its details on later requests.
items*array<>What each period bills, 1 to 20 items with one product each. Each product is created on first use and renamed on later requests.
1 <= items <= 20currency?stringISO 4217 currency of the item prices. The card is always charged in Dominican pesos, so a USD subscription is converted at the exchange rate current when each invoice is created.
"DOP""DOP""DOP""USD"recurringInterval*stringHow often the subscription bills after its trial
"month""week""month""year"trialDays*integerHow many days the trial runs, 1 to 365. trialEnd is the start plus this many days.
1 <= value <= 36514trialEndBehavior?stringWhat happens to the subscription when its trial ends without a card
"pause""pause""pause""cancel"onDunningExhausted?stringWhat happens to the subscription when the collection of an invoice ends without payment
"cancel""cancel""cancel""pause"metadata?stringOptional metadata that the subscription carries
"crm-account-88231"externalId?stringThe subscription's ID in the merchant's system. One subscription of the organization holds it, whatever its status, and an unfinished sign-up checkout reserves it.
1 <= length <= 256"company_4f1b"The trialing subscription
application/json- response
id*stringuuid"9b2e7c41-5d8a-4f3e-b6c1-0a4d2e8f7b19"customerId*stringuuid"7d4f1c2e-3b5a-4e8f-9a1d-2c6b8e0f4a13"externalId*|The subscription's ID in the merchant's system
status*stringcanceled is final. A subscription exists only once its first payment is approved or its trial starts.
"trialing""active""past-due""paused""canceled"statusReason*stringWhy the subscription has its status. sign-up-abandoned marks a sign-up that was never paid.
"payment-approved""trial-started""payment-declined""payment-method-invalid""payment-method-missing""processor-setup""dunning-exhausted""hard-decline""trial-ended-without-payment-method""cancel-requested""pause-requested""sign-up-abandoned"currency*string"DOP""DOP""USD"recurringInterval*string"month""week""month""year"billingAnchor*|The time each period starts from
date-timecurrentPeriodStart*|date-time"2026-10-10T16:45:18.000Z"currentPeriodEnd*|date-time"2026-11-10T16:45:18.000Z"nextBillingAt*|When the next period is billed
date-timepaymentMethodId*|The card that pays the subscription
uuidscheduledChange*|||A change that waits for its effectiveAt
onDunningExhausted*stringWhat happens when collection ends without payment
"cancel""pause"trialStart*|date-timetrialEnd*|date-timetrialEndBehavior*|What happens when the trial ends without a card
"pause""cancel"nullresumeAt*|When a paused subscription resumes
date-timemetadata*string|nullcanceledAt*|When the cancel was requested
date-timeendedAt*|When the subscription stopped
date-timeendReason*|The reason of the change that canceled or paused it
"payment-approved""trial-started""payment-declined""payment-method-invalid""payment-method-missing""processor-setup""dunning-exhausted""hard-decline""trial-ended-without-payment-method""cancel-requested""pause-requested""sign-up-abandoned"nullendInitiator*|Who canceled or paused it
"customer""merchant""system"nullcancellationReason*|"too-expensive""missing-features""switched-service""unused""customer-service""low-quality""too-complex""other"nullcancellationComment*string|nulllastDeclineCode*|The ISO code of the last decline once collection ends
startedFromCheckoutId*|The checkout whose payment started the subscription
uuid"550e8400-e29b-41d4-a716-446655440000"version*integerGoes up on every change of a field or an item that this object shows
1items*array<>What each period bills. Amounts are in cents of the subscription currency, ITBIS included.
paymentMethod*|nullcreditBalance*integerThe customer's credit in the subscription currency, in cents
0createdAt*stringdate-time"2026-10-10T16:44:02.000Z"updatedAt*stringdate-time"2026-10-10T16:45:18.000Z"curl -X POST 'https://api.rapidopagos.com/subscription' \ -H 'Content-Type: application/json' \ -d '{ "customer": { "externalId": "user_8f2c1a", "email": "ana.perez@example.com", "name": "Ana Pérez" }, "items": [ { "product": { "externalId": "ticket-type-vip", "name": "Concierto X, VIP" }, "quantity": 2, "unitPrice": { "amount": 5000, "currency": "DOP" }, "unitItbis": 763 } ], "currency": "DOP", "recurringInterval": "month", "trialDays": 14, "trialEndBehavior": "pause", "onDunningExhausted": "cancel", "metadata": "crm-account-88231", "externalId": "company_4f1b"}'{ "id": "9b2e7c41-5d8a-4f3e-b6c1-0a4d2e8f7b19", "customerId": "7d4f1c2e-3b5a-4e8f-9a1d-2c6b8e0f4a13", "externalId": "string", "status": "trialing", "statusReason": "payment-approved", "currency": "DOP", "recurringInterval": "month", "billingAnchor": "2019-08-24T14:15:22Z", "currentPeriodStart": "2026-10-10T16:45:18.000Z", "currentPeriodEnd": "2026-11-10T16:45:18.000Z", "nextBillingAt": "2019-08-24T14:15:22Z", "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011", "scheduledChange": { "action": "cancel", "effectiveAt": "2019-08-24T14:15:22Z", "initiator": "customer", "cancellationReason": "too-expensive", "cancellationComment": "string" }, "onDunningExhausted": "cancel", "trialStart": "2019-08-24T14:15:22Z", "trialEnd": "2019-08-24T14:15:22Z", "trialEndBehavior": "pause", "resumeAt": "2019-08-24T14:15:22Z", "metadata": "string", "canceledAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "endReason": "payment-approved", "endInitiator": "customer", "cancellationReason": "too-expensive", "cancellationComment": "string", "lastDeclineCode": "string", "startedFromCheckoutId": "550e8400-e29b-41d4-a716-446655440000", "version": 1, "items": [ { "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "quantity": 0, "unitAmount": 0, "unitItbis": 0 } ], "paymentMethod": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "brand": "string", "maskedPan": "string", "expiration": "string", "status": "active" }, "creditBalance": 0, "createdAt": "2026-10-10T16:44:02.000Z", "updatedAt": "2026-10-10T16:45:18.000Z"}