Skip to content
Status

Get gateway's saved payment method count

GEThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/gateways/{gateway_id}/payment_method_count

GET
/gateways/{gateway_id}/payment_method_count

Get the approximate number of saved payment methods on a gateway.

Note: The number is accurate as of the “updated” date, however a cached value will be returned if more than 100 in total. The duration of the cache scales with the number of saved payment methods, values over 10k will only be updated monthly.

gateway_id
required
string

The gateway’s ID (gw_...), or its code.

Payment method count details

Media typeapplication/json
object
gateway
string

Gateway ID

total
integer

Total number of saved payment methods

by_status
object

Breakdown by payment method status

object
ACTIVE
integer

Count of payment methods that were successful on last use

FAILING
integer

Count of payment methods that were declined on last use

updated
string · date-time

Timestamp when the count was last updated

Bad request - invalid parameters

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Unauthorized - invalid credentials

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Gateway not found

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Was this page helpful?