Skip to main content
POST
payments.saved-method.create

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
customerKey
string
required

Your private customer key, scoped to your connected account; use no name or email.

Required string length: 1 - 200
method
object
required

Encrypted card details; no raw card numbers or bank credentials.

recurringUse
enum<string>
required

Customer's consented future payment use; this does not schedule charges.

Available options:
on-file,
subscription,
unscheduled
email
string

Consented customer email; forwarded once, not returned.

Required string length: 1 - 320
Pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$

Response

The result

savedMethodId
string
required

Saved method ID in your own connected account; pass it to saved-method calls.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
type
enum<string>
required

Kind of saved payment method; unknown when unrecognized.

Available options:
card,
unknown
brand
enum<string>

Card brand, when known.

Available options:
visa,
mastercard,
amex,
discover,
jcb,
diners,
unionpay,
maestro
last4
string

Last four card digits only.

Pattern: ^\d{4}$
expiryMonth
integer

Expiry month, 1 to 12.

Required range: 1 <= x <= 12
expiryYear
integer

Four-digit expiry year.

Required range: 2000 <= x <= 9999
createdAt
string

When saved, ISO 8601 UTC, when known.