Payments

Retrieve payment sessions between timestamps

Changed on

This is used to fetch payment sessions within a timestamp range, paginated

get/payment-sessions

Request

  • Base URL
    https://sandbox-api.ryftpay.com/v1
  • URL
    https://sandbox-api.ryftpay.com/v1/payment-sessions
  • Auth
    API key in header Authorization

Query parameters

startTimestampinteger
Example:1641859200

The timestamp when to return payment sessions from (inclusive), it must be before the endTimestamp. If not provided it will default to midnight on the current date (UTC).

endTimestampinteger
Example:1641945599

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).

ascendingboolean

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.

limitinteger
Example:10

Control how many items are return in a given page The max limit we allow is 50. The default is 10.

startsAfterstring
Example:ps_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473

A token to identify the payment session to start querying after. This is most commonly used to get the next page of results after a previous response did not return all payment sessions, due to the imposed limit. The value of the paginationToken field from that response should be supplied here as startsAfter, to retrieve the next page of results for that timestamp range.

Headers

Accountstring
Example:ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327

The linked accountId (use this when operating on payments related to a linked account)

Response

Successfully retrieved the payment sessions

paginationTokenstring nullable

A token to use for getting the next page of results - send the same request with this value in the 'startsAfter' query parameter. This field is null when there are no further items to return

Example response

{
  "items": [
    {
      "id": "ps_01FCTS1XMKH9FF43CAFA4CXT3P",
      "amount": 500,
      "currency": "GBP",
      "paymentType": "Standard",
      "entryMode": "Online",
      "customerEmail": "example@mail.com",
      "customerDetails": {
        "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ",
        "firstName": "Fred",
        "lastName": "Jones",
        "homePhoneNumber": "+447900000000",
        "mobilePhoneNumber": "+447900000000",
        "metadata": {
          "customerId": "123"
        }
      },
      "credentialOnFileUsage": {
        "initiator": "Customer",
        "sequence": "Initial"
      },
      "previousPayment": {
        "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ"
      },
      "rebillingDetail": {
        "amountVariance": "Fixed",
        "numberOfDaysBetweenPayments": 30,
        "totalNumberOfPayments": 12,
        "currentPaymentNumber": 1,
        "expiry": 1776988800
      },
      "paymentMethod": {
        "type": "Card",
        "tokenizedDetails": {
          "id": "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ",
          "stored": true
        },
        "card": {
          "scheme": "Mastercard",
          "last4": "4242",
          "binDetails": {
            "issuer": "Ryft Bank Ltd",
            "issuerCountry": "GB",
            "fundingType": "Debit",
            "productType": "Consumer"
          }
        },
        "wallet": {
          "type": "ApplePay"
        },
        "billingAddress": {
          "firstName": "Nathan",
          "lastName": "Jones",
          "lineOne": "123 Test Street",
          "lineTwo": "456 Lane",
          "city": "Manchester",
          "country": "GB",
          "postalCode": "SP4 7DE",
          "region": "NY"
        },
        "checks": {
          "avsResponseCode": "Y",
          "cvvResponseCode": "M"
        }
      },
      "platformFee": 50,
      "splitPaymentDetail": {
        "items": [
          {
            "id": "sp_01FCTS1XMKH9FF43CAFA4CXT3P",
            "accountId": "ac_b83f2653-06d7-44a9-a548-5825e8186004",
            "amount": 50,
            "fee": {
              "amount": 50
            },
            "description": "2 x The Selfish Gene",
            "metadata": {
              "productId": "123",
              "productDescription": "The Selfish Gene"
            }
          }
        ]
      },
      "status": "PendingPayment",
      "metadata": {
        "orderNumber": "123"
      },
      "clientSecret": "ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004",
      "lastError": "insufficient_funds",
      "refundedAmount": 120,
      "statementDescriptor": {
        "descriptor": "Ryft Ltd",
        "city": "London"
      },
      "requiredAction": {
        "type": "Redirect",
        "url": "https://ryftpay.com/3ds-auth"
      },
      "returnUrl": "https://ryftpay.com/checkout?orderId=123&ps=ps_01FCTS1XMKH9FF43CAFA4CXT3P",
      "authorizationType": "FinalAuth",
      "captureFlow": "Automatic",
      "shippingDetails": {
        "address": {
          "firstName": "Fox",
          "lastName": "Mulder",
          "lineOne": "Stonehenge",
          "postalCode": "SP4 7DE",
          "city": "Salisbury",
          "country": "GB"
        }
      },
      "orderDetails": {
        "reference": "fffd1682-f82b-43e3-a89b-48d9ad7d55d9",
        "items": [
          {
            "reference": "product123",
            "name": "The Big Gundown (Blu-ray)",
            "quantity": 2,
            "unitPrice": 250,
            "taxAmount": 50,
            "totalAmount": 540,
            "discountAmount": 10
          }
        ]
      },
      "paymentSettings": {
        "platform": {
          "paymentFees": {
            "interchange": {
              "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
            },
            "network": {
              "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
            },
            "miscPassThrough": {
              "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
            }
          }
        },
        "threeDs": {
          "challengeIndicator": "NoPreference",
          "policy": "Required"
        }
      },
      "createdTimestamp": 1470989538,
      "lastUpdatedTimestamp": 1470989538
    }
  ],
  "paginationToken": "ps_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473"
}

Changes

    • warning

      added the new 3ds_authentication_not_supported enum value to the // response property for the response status

    • warning

      added the new authorisation_denied enum value to the // response property for the response status

    • warning

      added the new in_person_terminal_action_cancelled enum value to the // response property for the response status

    • warning

      added the new in_person_terminal_action_timeout enum value to the // response property for the response status

    • warning

      added the new in_person_terminal_busy enum value to the // response property for the response status

    • warning

      added the new in_person_terminal_not_available enum value to the // response property for the response status

    • warning

      added the new payment_cancelled enum value to the // response property for the response status

    • warning

      added the new recurring_series_terminated enum value to the // response property for the response status

    • info

      added the optional property //// to the response with the status