Payment Profile

post

Attach a payment method

This endpoint adds the payment method
This action is not enabled by default. You must request additional permissions to perform this action.

paymentMethodIdstring

required

Responses

Request examples

{
  "paymentMethodId": "string"
}

Response examples

add a Payment Method

{
  "data": {
    "id": "string",
    "paymentProfileId": "string",
    "network": "string",
    "type": "card",
    "cardDetails": {
      "type": "unknown",
      "last4": "string",
      "expMonth": 123.0,
      "expYear": 123.0
    },
    "createdAt": "2023-06-07T17:32:28Z",
    "lastUpdatedAt": "2023-06-07T17:32:28Z"
  }
}
get

List all payment profiles

This endpoint retrieves a list of payment profiles

limitstring

The maximum number of payment profiles to return (default 20, maximum 100)

Pattern
^[0-9][0-9]?$|^100$
startingAfterstring

The ID of the last payment profile in the previous page of results. Results will start after this payment profile

driverIdstring

The ID of the driver to filter payment profiles by

Responses

Response examples

A list of payment profiles

{
  "data": {
    "hasMore": true,
    "items": [
      {
        "id": "string",
        "network": "string",
        "driver": "string"
      }
    ]
  }
}
post

Create a new payment profile

This endpoint creates a new payment profile
This action is not enabled by default. You must request additional permissions to perform this action.

driverstring

required

The ID or reference of the driver associated with the payment profile.

networkstring

The network associated with the payment profile.

Responses

Request examples

{
  "driver": "string",
  "network": "string"
}

Response examples

OK

{
  "data": {
    "id": "string",
    "network": "string",
    "driver": "string"
  }
}
post

Subscribe a payment profile to a product offering

This endpoint allows a user to subscribe a payment profile to a product offering by creating a new subscription with the payment provider
This action is not enabled by default. You must request additional permissions to perform this action.

priceIdstring

required

The ID of the price associated with the subscription.

Responses

Request examples

{
  "priceId": "string"
}

Response examples

The subscription was successfully created

{
  "data": {
    "id": "string",
    "paymentProfileId": "string",
    "network": "string",
    "billingThreshold": {
      "amount": 123.0,
      "currency": "string"
    },
    "billingStatus": "CANCELED",
    "currentPeriodEnd": "2023-06-07T17:32:28Z",
    "currentPeriodStart": "2023-06-07T17:32:28Z",
    "priceId": "string",
    "createdAt": "2023-06-07T17:32:28Z",
    "lastUpdatedAt": "2023-06-07T17:32:28Z"
  }
}

Was this page helpful?