- Get Started
- Guides
- Integrations
- References
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Merchant
- Corporate
- Sender
- Recipient
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Webhook notifications
- Job
- Risk
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Payment Methods
- Transaction Flows
- Regression Testing
- Data Retention Policy
- API Reference
- Support
Subscriptions Integration Guide
Last updated:April 29, 2024
This Subscription Integration guide describes how you can schedule subscription payments. Like recurring payments, the money gets auto-debited from consumer's bank account to the merchant account in fixed time periods (e.g. weekly, monthly, quarterly, yearly). Similarly, money can be auto-credited using payouts. Subscription businesses benefit from the flexibility of creating different plans and pricing structures to meet market demands.
A subscription payment can be scheduled as a pre-authorization (PA), debit (DB) or credit (CD) transaction.
To collect card data, you must be PCI-DSS compliant. To minimize your compliance requirements, please use
Primeiro Pay Registration Tokens.
Use cases
Start subscription
The merchant collects card data from the shopper and schedules a subscription payment. You can set the value of the transaction, the schedule for when the charges should occur, and the number of times the payment transaction should happen based on your subscription plan.
How it works
1. Store the payment data
Collect the customer payment information via Primeiro Pay or Server-to-Server. With any of the options, please consider having a card-on-file agreement with the shopper. It is best to tokenize the card during the cardholder (CIT) initiated payment so that a merchant (MIT) agreement is in place for the future subscription payments.
Sample request:
Language:
curl https://eu-test.oppwa.com/v1/payments \ -d "entityId=8a8294184e736012014e78a1b1da15d3" \ -d "amount=0.00" \ -d "paymentType=PA" \ -d "createRegistration=true" \ -d "currency=EUR" \ -d "testMode=EXTERNAL" \ -d "paymentBrand=VISA" \ -d "card.number=4348750887560376" \ -d "card.holder=John Smith" \ -d "card.expiryMonth=12" \ -d "card.expiryYear=2026" \ -d "card.cvv=123" \ -d "customer.email=john.smith@gmail.com" \ -d "customer.givenName=Smith" \ -d "customer.ip=192.168.0.0" \ -d "customer.surname=John" \ -d "customer.language=DE" \ -d "billing.city=MyCity" \ -d "billing.country=DE" \ -d "billing.postcode=712121" \ -d "billing.state=DE" \ -d "billing.street1=MyStreet" \ -d "standingInstruction.type=RECURRING" \ -d "standingInstruction.mode=INITIAL" \ -d "standingInstruction.source=CIT" \ -d "standingInstruction.recurringType=SUBSCRIPTION" \ -d "threeDSecure.eci=05" \ -d "threeDSecure.authenticationStatus=Y" \ -d "threeDSecure.version=2.2.0" \ -d "threeDSecure.dsTransactionId=c75f23af-9454-43f6-ba17-130ed529507e" \ -d "threeDSecure.acsTransactionId=2c42c553-176f-4f08-af6c-f9364ecbd0e8" \ -d "threeDSecure.verificationId=MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=" \ -d "threeDSecure.amount=19.99" \ -d "threeDSecure.currency=EUR" \ -d "threeDSecure.flow=challenge" \ -H "Authorization: Bearer OGE4Mjk0MTg0ZTczNjAxMjAxNGU3OGExN2E2YTE1YjB8ZjJGRUtacXRCUA=="
2. Schedule a payment
Perform a server-to-server POST request with the registration id
, payment type and the job schedule parameters
which describes when and how often the transaction should be executed. For a complete reference of the scheduling job parameters,
please check API Reference.
You can use the numerical allowed values to declare specific dates, months and days of the week for the subscription payment
to be executed. The special characters allow for more advanced functionality. Please click the button below to see
the table where we've outlined their general function and what their value means in each field.
[job.second] [job.minute] [job.hour] [job.dayOfMonth] [job.month] [job.dayOfWeek]
Select trial period:
Select schedule:
Sample request:
Language:
curl https://eu-test.oppwa.com/scheduling/v1/schedules \ -d "entityId=8a8294184e736012014e78a1b1da15d3" \ -d "amount=10.00" \ -d "paymentType=DB" \ -d "registrationId={registrationId}" \ -d "currency=EUR" \ -d "testMode=EXTERNAL" \ -d "standingInstruction.type=RECURRING" \ -d "standingInstruction.mode=REPEATED" \ -d "standingInstruction.source=MIT" \ -d "standingInstruction.recurringType=SUBSCRIPTION" \ -d "job.second=10" \ -d "job.minute=7" \ -d "job.hour=7" \ -d "job.dayOfMonth=*" \ -d "job.month=*" \ -d "job.dayOfWeek=?" \ -d "job.year=*" \ -H "Authorization: Bearer OGE4Mjk0MTg0ZTczNjAxMjAxNGU3OGExN2E2YTE1YjB8ZjJGRUtacXRCUA=="
3. We execute the transaction for you
An automated subscription payment is executed at the scheduled time using the stored payment information and the specified payment type.
4. Cancel the schedule
Send a de-scheduling request specifying the schedule id
you want to cancel.
Sample request:
Language:
https://eu-test.oppwa.com/scheduling/v1/schedules/
curl -X DELETE "https://eu-test.oppwa.com/scheduling/v1/schedules/{id}\ ?entityId=8a8294184e736012014e78a1b1da15d3\ &testMode=EXTERNAL" \ -H "Authorization: Bearer OGE4Mjk0MTg0ZTczNjAxMjAxNGU3OGExN2E2YTE1YjB8ZjJGRUtacXRCUA=="