Subscription
Unique identifier for the subscription.
575bcd84-09fc-4a6e-8c4c-f88b8eb90bfaAmount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD).
110Three-letter ISO currency code, in uppercase. Must be a supported currency.
EURAn arbitrary string attached to the subscription. Often useful for displaying to users.
MoonMail Monthly LiteMONEI Account identifier.
aa9333ba-82de-400c-9ae7-087b9f8d2242Has the value true if the resource exists in live mode or the value false if the resource exists in test mode.
falseThe status of the subscription.
| Enum Value | Description | 
|---|---|
| PENDING | The subscription has been created but is waiting for initial payment or activation | 
| EXPIRED | The subscription has reached its end date or maximum number of attempts without successful payment | 
| TRIALING | The subscription is in trial period before the first payment is required | 
| ACTIVE | The subscription is currently active and payments are being processed normally | 
| PAST_DUE | The most recent payment attempt failed but the subscription will retry according to schedule | 
| PAUSED | The subscription is temporarily suspended and will resume based on pause settings | 
| CANCELED | The subscription has been permanently terminated and will not process further payments | 
Possible values: [PENDING, EXPIRED, TRIALING, ACTIVE, PAST_DUE, PAUSED, CANCELED]
PENDINGcustomer object
The customer's email address.
john.doe@example.comThe customer's full name or business name.
John DoeThe customer's phone number in E.164 format.
nullbillingDetails object
Billing information associated with the payment method at the time of the transaction.
The customer's billing full name.
John DoeThe customer's billing email address.
john.doe@example.comThe customer's billing phone number in E.164 format.
nullBilling company name.
nullCompany tax ID.
nulladdress object
City, district, suburb, town, or village.
MálagaAddress line 1 (e.g., street, PO Box, or company name).
Fake Street 123Address line 2 (e.g., apartment, suite, unit, or building).
nullZIP or postal code.
1234State, county, province, or region.
MálagashippingDetails object
Shipping information associated with the payment.
The shipping customer's full name.
John DoeThe shipping customer's email address.
john.doe@example.comThe shipping customer's phone number in E.164 format.
nullName of the company where the shipment is going.
nullCompany tax ID.
nulladdress object
City, district, suburb, town, or village.
MálagaAddress line 1 (e.g., street, PO Box, or company name).
Fake Street 123Address line 2 (e.g., apartment, suite, unit, or building).
nullZIP or postal code.
1234State, county, province, or region.
MálagaSubscription interval. The minute and hour intervals are only available in test mode.
| Enum Value | Description | 
|---|---|
| minute | Minutely | 
| hour | Hourly | 
| day | Daily | 
| week | Weekly | 
| month | Monthly | 
| year | Yearly | 
Possible values: [minute, hour, day, week, month, year]
monthNumber of intervals between subscription payments.
1Number of intervals when subscription will be paused before it activates again.
1The number of intervals during which the subscription billing cycle will be skipped without altering the subscription status. This is useful when payment for a specific period is received through different methods.
1An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system.
14379133960355lastPayment object
Unique identifier for the payment.
af6029f80f5fc73a8ad2753eea0b1be0The status of the payment.
| Enum Value | Description | 
|---|---|
| SUCCEEDED | The payment has been successfully processed and funds have been captured | 
| PENDING | The payment is being processed and awaiting completion | 
| FAILED | The payment attempt was unsuccessful | 
| CANCELED | The payment was canceled before completion | 
| REFUNDED | The full payment amount has been refunded | 
| PARTIALLY_REFUNDED | Only a portion of the payment amount has been refunded | 
| AUTHORIZED | The payment has been authorized but funds have not been captured yet | 
| EXPIRED | The payment has expired without being completed | 
Possible values: [SUCCEEDED, PENDING, FAILED, CANCELED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, EXPIRED]
PENDINGPayment status code.
E000Human readable status message, can be displayed to a user.
Transaction approvedpaymentMethod object
Details about the payment method at the time of the transaction.
Subscription method type.
| Enum Value | Description | 
|---|---|
| card | Card | 
Possible values: [card]
cardcard object
Details about the card used as payment method at the time of the transaction.
Card brand.
| Enum Value | Description | 
|---|---|
| visa | Visa credit or debit card | 
| mastercard | Mastercard credit or debit card | 
| diners | Diners Club credit card | 
| amex | American Express credit card | 
| jcb | Japan Credit Bureau card | 
| unionpay | UnionPay card from China | 
| unknown | Card brand could not be determined | 
Possible values: [visa, mastercard, diners, amex, jcb, unionpay, unknown]
visaCard type debit or credit.
Possible values: [debit, credit]
creditWhether this transaction used 3D Secure authentication.
falseThe protocol version of the 3DS challenge.
2.1.0The flow used for 3DS authentication.
| Enum Value | Description | 
|---|---|
| CHALLENGE | Authentication requiring additional shopper interaction through biometrics, 2FA, or other SCA methods | 
| FRICTIONLESS | Background authentication using device fingerprint without additional shopper interaction | 
| FRICTIONLESS_CHALLENGE | Complete 3DS flow with additional authentication if initial data collection is insufficient | 
| DIRECT | Transaction exempt from SCA due to low risk assessment | 
Possible values: [CHALLENGE, FRICTIONLESS, FRICTIONLESS_CHALLENGE, DIRECT]
CHALLENGETime at which the card will expire. Measured in seconds since the Unix epoch.
2048544000The last four digits of the card.
0004The digital wallet used to tokenize the card.
Possible values: [applePay, googlePay, clickToPay]
applePayThe name of the cardholder.
John DoeThe email of the cardholder.
email@example.comThe start date of the current subscription period. Measured in seconds since the Unix epoch.
1636366897The end date of the current subscription period. Measured in seconds since the Unix epoch.
1636366897The end date of the trial period. Measured in seconds since the Unix epoch.
1636366897The date when the next payment will be made.
1636366897Number of retries left for the subscription.
1retrySchedule object[]
Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used.
The unit of time to wait before the retry attempt.
| Enum Value | Description | 
|---|---|
| day | Daily | 
| week | Weekly | 
| month | Monthly | 
| year | Yearly | 
Possible values: [day, week, month, year]
dayThe number of intervals to wait before the retry attempt.
Possible values: >= 1 and <= 31
3If true, the subscription will be canceled at the end of the current period.
falseIf true, the subscription will be paused at the end of the current period.
falsetraceDetails Payment-TraceDetails
Information related to the browsing session of the user who initiated the payment.
The IP address where the operation originated.
100.100.200.100Device type, could be desktop, mobile, smartTV, tablet.
desktopInformation about the device used for the browser session (e.g., iPhone).
nullThe browser used in this browser session (e.g., Mobile Safari).
ChromeThe version for the browser session (e.g., 13.1.1).
83.0.4103.116Operation system (e.g., iOS).
Mac OSOperation system version (e.g., 13.5.1).
10.15.4The source component from where the operation was generated (mostly for our SDK's).
MONEI/PHPThe source component version from where the operation was generated (mostly for our SDK's).
0.1.2Full user agent string of the browser session.
Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...Browser accept header.
text/html,application/xhtml+xml,application/jsonThe color depth of the browser session (e.g., 24).
24The screen height of the browser session (e.g., 1152).
1152The screen width of the browser session (e.g., 2048).
2048The timezone offset of the browser session (e.g., -120).
-120The ID of the user that started the operation.
nullThe email of the user that started the operation.
user@example.comA permanent identifier that refers to the initial payment of
a sequence of payments. This value needs to be sent in the path
for RECURRING payments.
62b23b9f3627cc38b08ff471ccd313adThe URL will be called each time subscription status changes. You will receive a subscription object in the body of the request.
https://example.com/subscriptions/callbackThe URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request.
https://example.com/payments/callbackA set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.
{"systemId":"12345"}Time at which the resource was created. Measured in seconds since the Unix epoch.
1636366897Time at which the resource updated last time. Measured in seconds since the Unix epoch.
1636366897{
  "id": "575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa",
  "amount": 110,
  "currency": "EUR",
  "description": "MoonMail Monthly Lite",
  "accountId": "aa9333ba-82de-400c-9ae7-087b9f8d2242",
  "livemode": false,
  "status": "PENDING",
  "customer": {
    "email": "john.doe@example.com",
    "name": "John Doe",
    "phone": null
  },
  "billingDetails": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone": null,
    "company": null,
    "taxId": null,
    "address": {
      "country": "ES",
      "city": "Málaga",
      "line1": "Fake Street 123",
      "line2": null,
      "zip": "1234",
      "state": "Málaga"
    }
  },
  "shippingDetails": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone": null,
    "company": null,
    "taxId": null,
    "address": {
      "country": "ES",
      "city": "Málaga",
      "line1": "Fake Street 123",
      "line2": null,
      "zip": "1234",
      "state": "Málaga"
    }
  },
  "interval": "month",
  "intervalCount": 1,
  "pauseIntervalCount": 1,
  "skipIntervalCount": 1,
  "lastOrderId": "14379133960355",
  "lastPayment": {
    "id": "af6029f80f5fc73a8ad2753eea0b1be0",
    "status": "PENDING",
    "statusCode": "E000",
    "statusMessage": "Transaction approved"
  },
  "paymentMethod": {
    "method": "card",
    "card": {
      "country": "ES",
      "brand": "visa",
      "type": "credit",
      "threeDSecure": false,
      "threeDSecureVersion": "2.1.0",
      "threeDSecureFlow": "CHALLENGE",
      "expiration": 2048544000,
      "last4": "0004",
      "tokenizationMethod": "applePay",
      "cardholderName": "John Doe",
      "cardholderEmail": "email@example.com"
    }
  },
  "currentPeriodStart": 1636366897,
  "currentPeriodEnd": 1636366897,
  "trialPeriodEnd": 1636366897,
  "nextPaymentAt": 1636366897,
  "retryCount": 1,
  "retrySchedule": [
    {
      "interval": "day",
      "intervalCount": 1
    },
    {
      "interval": "day",
      "intervalCount": 3
    },
    {
      "interval": "week",
      "intervalCount": 1
    }
  ],
  "cancelAtPeriodEnd": false,
  "pauseAtPeriodEnd": false,
  "traceDetails": {
    "ip": "100.100.200.100",
    "countryCode": "ES",
    "lang": "es",
    "deviceType": "desktop",
    "deviceModel": null,
    "browser": "Chrome",
    "browserVersion": "83.0.4103.116",
    "os": "Mac OS",
    "osVersion": "10.15.4",
    "source": "MONEI/PHP",
    "sourceVersion": "0.1.2",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...",
    "browserAccept": "text/html,application/xhtml+xml,application/json",
    "browserColorDepth": "24",
    "browserScreenHeight": "1152",
    "browserScreenWidth": "2048",
    "browserTimezoneOffset": "-120",
    "userId": null,
    "userEmail": "user@example.com"
  },
  "sequenceId": "62b23b9f3627cc38b08ff471ccd313ad",
  "callbackUrl": "https://example.com/subscriptions/callback",
  "paymentCallbackUrl": "https://example.com/payments/callback",
  "metadata": {
    "systemId": "12345"
  },
  "createdAt": 1636366897,
  "updatedAt": 1636366897
}