Payments
  • Welcome
  • One time payment
    • OneBip
    • PayPal Legacy
    • PayPal
    • Stripe
    • Paymentwall
    • Mollie
  • Subscription payment
    • PayPal
  • Webhook
    • Payment Payload
    • Subscription Status Paypload
    • Validating webhook
  • Payment Entities
    • Base
    • User
    • Package
    • Subscription
    • InvoiceNinja
    • FactuurSturen
Powered by GitBook
On this page

Was this helpful?

  1. Subscription payment

PayPal

// POST (application/json) - https://payments.cloudprotected.net/v1/payments/create

{
	"gateway": "paypal",
	"successUrl": "https://example.com/success",
	"failedUrl": "https://example.com/failed",
	"webhookUrl": "https://example.com/webhook",
	"identifier": "tim",
	"package": {
		"name": "Amazing package",
		"price": 5.84,
		"currency": "EUR"
	},
	"subscription": {
		"enabled": true,
    "interval": 1,
    "intervalTimeUnit": "MONTH",
    "productCategory": "DIGITAL",
    "description": "Subscription for shop"
	},
	"user": {
		"identifier": "basket-1234",
		"email": "abuse@cloudprotected.net"
	},
	"credential": {
		"clientId": "AR-bCHl2O__Py_5zJsdfsldkfjskdlfjslkfjsljd_dsflz",
    "secret": "EM-DklkdjfksdlkjlkdjslkfjsdlfjsldfjslkdjfsdkfsdfS",
    "brandName": "Test Store",
    "sandbox": true
	}
}
{
    "success": true,
    "data": {
        "url": "https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token=BA-7UDHD03BV905322UF"
    },
    "errors": null
}
// Subscription -> intervalTimeUnit
DAY = A daily billing cycle.
WEEK = A weekly billing cycle.
MONTH = A monthly billing cycle.
YEAR = A yearly billing cycle.
PreviousMollieNextPayment Payload

Last updated 4 years ago

Was this helpful?