# Retrieve a list of the payments specific to a subscription Used to fetch a paginated list of the payment sessions making up the subscription Endpoint: GET /subscriptions/{subscriptionId}/payment-sessions Version: 1.1.0 Security: secretApiKeyAuth ## Path parameters: - `subscriptionId` (string, required) Subscription to retrieve Example: "sub_01FCTS1XMKH9FF43CAFA4CXT3P" ## Query parameters: - `startTimestamp` (integer) The timestamp when to return payment sessions from (inclusive), it must be before the endTimestamp. If not provided it will default to 0 Example: 1641859200 - `endTimestamp` (integer) The timestamp when to return payment sessions up to (inclusive), it must be after the startTimestamp. If not provided it will default to the current time (UTC). Example: 1641945599 - `ascending` (boolean) Control the order (newest or oldest) in which the payment sessions are returned. false will arrange the results with newest first, whereas true shows oldest first. The default is false. - `limit` (integer) Control how many items are return in a given page The max limit we allow is 25. The default is 10. Example: 10 - `startsAfter` (string) A token to identify where to resume a subsequent paginated query. The value of the paginationToken field from that response should be supplied here, to retrieve the next page of results. Example: "ps_01FCTS1XMKH9FF43CAFA4CXT3P" ## Response 200 fields (application/json): - `items` (array) - `items.id` (string) The unique identifier for the payment Example: "ps_01FCTS1XMKH9FF43CAFA4CXT3P" - `items.amount` (integer) The amount of the sale/purchase in minor digits Example: 500 - `items.currency` (string) The ISO currency code Example: "GBP" - `items.paymentType` (string,null) The type of the payment. Use this to control whether the payment is classified as a Customer-Initiated Transaction (CIT) or Merchant-Initiated Transaction (MIT). (MIT) - customer is not actively participating in the transaction and has instead given consent for you to charge their stored card off session. (CIT) - customer is actively in your checkout flow and is on hand to react to and complete any supplementary steps to complete the payment (e.g. 3DS). CIT values: - Standard - A regular one-off e-commerce payment, made by a customer on your website/app MIT values: - Unscheduled - Uses an already stored card on file for a fixed or variable amount that does not occur on a scheduled or regular basis such as recurring payments/subcriptions. Recurring is classified as CIT if it is the initial payment in the series and MIT if it is a subsequent (follow up) payment in the series. MOTO has now been deprecated in favour of the entryMode (MOTO) field. Enum: "Standard", "Unscheduled", "MOTO", "Recurring" - `items.entryMode` (string,null) Indicates how the payment method details were (or will be) obtained by the merchant for this payment. - Online - when the payment method is collected with the customer present (e.g. an e-commerce payment within a browser) - MOTO - when the payment method is collected via mail order (not e-email) or over the phone - InPerson - when the payment is collected in-person over a physical medium (such as card terminal) MOTO is subject to additional approval, contact us if you require this functionality. Enum: "Online", "MOTO", "InPerson" - `items.customerEmail` (string,null) The email address of the customer Example: "example@mail.com" - `items.customerDetails` (object,null) The details of the customer that this payment belongs to - `items.customerDetails.id` (string,null) The Id of the customer this payment belongs to. Set this upfront when creating the payment-session if you wish to make use of paying with a customer's saved payment methods Example: "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ" - `items.customerDetails.firstName` (string,null) The first name of the customer this payment belongs to. Example: "Fred" - `items.customerDetails.lastName` (string,null) The last name of the customer this payment belongs to. Example: "Jones" - `items.customerDetails.homePhoneNumber` (string,null) The home phone number of the customer. In E.164 format Example: "+447900000000" - `items.customerDetails.mobilePhoneNumber` (string,null) The mobile phone number of the customer. In E.164 format Example: "+447900000000" - `items.customerDetails.metadata` (object,null) The metadata of the customer this payment belongs to. Example: {"customerId":"123"} - `items.credentialOnFileUsage` (any) - `items.previousPayment` (object,null) For recurring/unscheduled payments - details of the initial payment in the series. Required for: - partners who want to externally schedule recurring payments. - partners who process Unscheduled payments - `items.previousPayment.id` (string) The Id of the initial Payment Session in the series Example: "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ" - `items.rebillingDetail` (any) - `items.enabledPaymentMethods` (array) List of payment method types that can be used to complete payment for this PaymentSession. Card is the default and will allow all card schemes configured on your account (Visa, Mastercard etc.). Apple Pay & Google Pay are classified as Card types and will be displayed provided you have confogured them properly. Enum: "Card" - `items.paymentMethod` (object,null) - `items.paymentMethod.type` (string) Enum: "Card" - `items.paymentMethod.tokenizedDetails` (object,null) The details of any tokenized payment method used - `items.paymentMethod.tokenizedDetails.id` (string) The Id of the tokenized payment method Example: "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ" - `items.paymentMethod.tokenizedDetails.stored` (boolean) Flag to indicate whether or not the tokenized payment method was stored (against the customer) Example: true - `items.paymentMethod.card` (object,null) Details of the card used - `items.paymentMethod.card.scheme` (string) Enum: "Visa", "Mastercard", "Amex" - `items.paymentMethod.card.last4` (string) The last 4 digits of the card used Example: "4242" - `items.paymentMethod.wallet` (object,null) Details of the wallet used (Google Pay / Apple Pay) - `items.paymentMethod.billingAddress` (object,null) - `items.paymentMethod.billingAddress.firstName` (string) The first name of the customer Example: "Nathan" - `items.paymentMethod.billingAddress.lastName` (string) The last name of the customer Example: "Jones" - `items.paymentMethod.billingAddress.lineOne` (string) First line of the address Example: "123 Test Street" - `items.paymentMethod.billingAddress.lineTwo` (string) Second line of the address Example: "456 Lane" - `items.paymentMethod.billingAddress.city` (string) The address city/town Example: "Manchester" - `items.paymentMethod.billingAddress.country` (string, required) The two-character ISO country code Example: "GB" - `items.paymentMethod.billingAddress.postalCode` (string, required) The postal code/zip of the address Example: "SP4 7DE" - `items.paymentMethod.billingAddress.region` (string,null) The state/county/province/region Required if the address is in the US/Canada and must be a 2-character ISO state/province code Example: "NY" - `items.paymentMethod.checks` (object,null) - `items.paymentMethod.checks.avsResponseCode` (string,null) The response from Address Verification Service (AVS) that determines the match or partial match of the customer's billing address. Possible values: - A - Partial Match (street address matches, postal/zip code does not match) - B - Partial Match (street address matches, postal/zip code not verified) - C - No Match (street address and postal/zip code not verified) - D - Full Match (street address and postal/zip code match) - F - Full Match (street address and postal/zip code match) - G - Not Supported (address information not verified) - I - No Match (address information not verified) - M - Full Match (street address and postal/zip code match) - N - No Match (neither street address not postal/zip code match) - P - Partial Match (postal/zip code matches, street address not verified) - R - System Unavailable (unable to perform verification) - S - Not Supported (AVS currently not supported by issuer) - U - System Unavailable (address information not verified due to no data from issuer) - W - Partial Match (postal/zip code matches, street address does not match) - X - Full Match (street address and postal/zip code match) - Y - Full Match (street address and postal/zip code match) - Z - Partial Match (postal/zip code matches, street address does not match) Example: "Y" - `items.paymentMethod.checks.cvvResponseCode` (string,null) The response from the check on the Card Verification Value (CVV/CVV2/CVC) Possible values: - M - Match (Visa and MC) - Y - Match (Amex) - N - No Match - P - Not Processed - S - Should be on card - U - Issuer does not participate Example: "M" - `items.platformFee` (integer,null) The amount (if any) that will be taken and applied to the platform account. This cannot be greater than the "amount" property Example: 50 - `items.splitPaymentDetail` (object,null) - `items.status` (string) Enum: "PendingPayment", "PendingAction", "Processing", "Approved", "Captured", "Voided" - `items.metadata` (object,null) use this parameter to attach key-value data to the payment. These will be sent with any associated payment events on your webhook. Example: {"orderNumber":"123"} - `items.clientSecret` (string,null) The client secret is used to complete a payment from your frontend. Do NOT store/log/embed anywhere and ensure it is only surfaced on pages served over TSL Example: "ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004" - `items.lastError` (string,null) The most recent error when attempting to Pay. Note that we may add further values without notice. Enum: "insufficient_funds", "declined_do_not_honour", "invalid_card_number", "cvv2_failure", "restricted_card", "blacklisted_card", "blacklisted_bin", "blacklisted_country", "blacklisted_ip", "risk_declined", "security_violation", "expired_card", "gateway_reject", "suspected_fraud", "contact_issuer", "not_permitted", "invalid_account", "pickup_card", "stolen_card", "issuer_decline", "closed_account", "account_not_activated", "limit_exceeded", "withdrawal_limit_exceeded", "blocked_by_cardholder", "3ds_authentication_failure", "3ds_cardholder_not_participating", "3ds_authentication_required", "payment_method_option_amex_disabled", "cvc_required", "payment_method_not_available", "payment_method_option_amex_not_available", "credit_card_not_permitted", "issuer_error", "system_error", "unknown_error" - `items.refundedAmount` (integer) The total amount refunded thus far against the payment-session. Refunds can only be actioned once the payment-session is Captured. You can only have one refund in-flight at a time. Example: 120 - `items.statementDescriptor` (object) - `items.statementDescriptor.descriptor` (string) The statement descriptor that will be shown on the customer's bank statement for this payment. If you don't specify this then the descriptor set on your account will be used instead. It must satisfy the following regex pattern: ^[A-Za-z0-9 ][A-Za-z][A-Za-z0-9 ]$ Example: "Ryft Ltd" - `items.statementDescriptor.city` (string) This is the city that will be shown on the statements of the account's customers. If you don't specify this then the descriptor set on your account will be used instead. It must satisfy the following regex pattern: ^[A-Za-z0-9 ][A-Za-z][A-Za-z0-9 ]$ Example: "London" - `items.requiredAction` (object,null) The action to take (if any) in order to authorise the payment. This will be non-null if the customer's bank challenge the payment (i.e. 3DS) Example: {"type":"Redirect","url":"https://ryftpay.com/3ds-auth"} - `items.requiredAction.type` (string) The type of action Enum: "Redirect", "Identify", "Challenge" - `items.requiredAction.url` (string,null) The url to redirect to (if the requiredAction has type Redirect) Example: "https://ryftpay.com/3ds-auth" - `items.requiredAction.identify` (object,null) - `items.requiredAction.challenge` (object,null) - `items.returnUrl` (string) URL to send the customer back to after a redirection (e.g. 3DS). We will always append the paymentSessionId under query param ps. Example: "https://ryftpay.com/checkout?orderId=123&ps=ps_01FCTS1XMKH9FF43CAFA4CXT3P" - `items.authorizationType` (string,null) Specifies the type of authorization. PreAuth - Used to authorize a non-final amount, where you may want to later capture a different amount or adjust the initial authorized amount. FinalAuth - When the amount authorized is final and identical to the amount later captured. By default we will always use FinalAuth. Note that PreAuth is restricted to particular MCC values for Visa, contact us to verify and enable PreAuth if you believe your business is eligible. Enum: "PreAuth", "FinalAuth" - `items.captureFlow` (string,null) Whether the payment is automatically/manually captured. Defaults to Automatic. Enum: "Automatic", "Manual" - `items.verifyAccount` (boolean,null) Whether the PaymentSession was used to facilitate an account verification check. - `items.shippingDetails` (any) The shipping details for the purchase/payment. This is optional but recommended to reduce fraudulent payments. - `items.orderDetails` (object,null) The details of the order - `items.orderDetails.reference` (string,null) Your unique identifier for the order Example: "fffd1682-f82b-43e3-a89b-48d9ad7d55d9" - `items.paymentSettings` (object,null) Allows for customisation of various payment settings. - `items.paymentSettings.paymentMethodOptions` (object,null) - `items.paymentSettings.paymentMethodOptions.disabled` (array) Specific payment method options that have been disabled during payment. These options cannot be used to complete payment on this payment session. Enum: "Amex" - `items.paymentSettings.platform` (object,null) Only applicable to payments under the platform model. - `items.paymentSettings.platform.paymentFees` (object,null) Denotes which Ryft account's are charged particular fees for the payment. Example: {"interchange":{"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"},"network":{"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"},"miscPassThrough":{"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"}} - `items.paymentSettings.platform.paymentFees.interchange` (object,null) The ID of the Ryft account that any interchange fees are deducted from. Only applicable for accounts on the ICC++ pricing model. Example: {"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"} - `items.paymentSettings.platform.paymentFees.network` (object,null) The ID of the Ryft account that any network (scheme) fees are deducted from. Only applicable for accounts on the ICC++ pricing model. Example: {"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"} - `items.paymentSettings.platform.paymentFees.miscPassThrough` (object,null) The ID of the Ryft account that any miscellanous pass-through fees are deducted from. Only applicable for accounts on the ICC++ pricing model. Example: {"bookTo":"ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"} - `items.paymentSettings.platform.paymentFees.processor` (object,null) The ID of the Ryft account that the Ryft processing fee is deducted from. Note that: - when on Blended pricing, this refers to the full blended fee - when on ICC++ pricing, this refers to the final +, i.e. Ryft's markup - `items.paymentSettings.platform.paymentFees.gateway` (object,null) The ID of the Ryft account that any gateway fees are deducted from. - `items.paymentSettings.platform.paymentFees.combined` (object,null) The ID of the Ryft account that all the above are deducted from. This field takes precedence over any of the more granular fields. Note that: - when on Blended pricing, this will book all of: processor & gateway fees - when on ICC++ pricing, this will book all of: interchange, network, miscPassThrough, processor & gateway fees - `items.createdTimestamp` (integer) The epoch timestamp (seconds) when the payment was created Example: 1470989538 - `items.lastUpdatedTimestamp` (integer) The epoch timestamp (seconds) when the payment was last updated Example: 1470989538 - `paginationToken` (string,null) A token to use for getting the next page of results. This will be null when there are no further pages to fetch Example: "ps_01FCTS1XMKH9FF43CAFA4CXT3P" ## Response 400 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 500 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON"