Skip to main content
POST
Create a payment
Payments and refunds are in beta. Contact Vori Support to enable them for your account. Until they are enabled, these endpoints answer 403 Forbidden.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Charges a card that your site or app tokenized in the browser, using the payment processor configured for the store.

amount
string<positive-monetary>
required

Amount charged to the card, in dollars. Payments above 99999.99 are not accepted.

Pattern: ^[0-9]+(\.[0-9]+)?$
Example:

"199.99"

idempotency_key
string
required

Your own key for the charge, unique within the banner for each mode. Sending the same key again returns the payment already taken rather than charging the card twice. Up to 255 characters.

Maximum string length: 255
store_id
string
required

ID of the store to charge the card for. The charge settles to the processor account configured for that store.

Pattern: ^[0-9]+$
token
string
required

One-time token returned by the hosted tokenizer for the card being charged. A token is good for a single charge, so a new payment needs a new one. Retrying a payment that timed out may send the token it already has, which is only used if the charge never reached the processor.

Maximum string length: 256
amount_details
object

Tax and line items the payment covers, each optional. Sending the tax with payment_details.order_reference qualifies commercial cards for the lower Level 2 interchange rate.

metadata
object | null

Your own key/value pairs, stored as sent and returned unchanged. Vori never interprets them. Up to 50 keys; key names up to 40 characters of letters, numbers, underscores, and hyphens; values up to 500 characters. Keys beginning with "vori" are reserved. Do not put personal or sensitive information here — these values flow into reporting and data exports.

Example:
payment_details
object

Your reference for the purchase.

Response

A card payment taken through the Vori API on behalf of a store. One payment is one charge attempt, and a payment is never edited once the processor has answered.

id
string
required

Unique identifier for the record.

amount
string<positive-monetary>
required

Amount charged to the card, in dollars.

Pattern: ^[0-9]+(\.[0-9]+)?$
Example:

"199.99"

amount_details
object | null
required

Tax and line items supplied when the payment was taken.

amount_refunded
string<monetary>
required

Total of the refunds of the payment that went through, in dollars. Refunds that failed or are still with the processor are not counted. 0.00 when nothing was refunded.

Pattern: ^-?[0-9]+(\.[0-9]+)?$
Example:

"199.99"

created_at
string<date-time>
required

When the record was created.

idempotency_key
string
required

Your own key for the charge, unique within the banner for each mode. Sending the same key again returns the payment already taken rather than charging the card twice. Up to 255 characters.

metadata
object | null
required

Your own key/value pairs, exactly as supplied when the payment was taken.

Example:
mode
enum<string>
required

Whether money moved for real or not, which follows the API key that took the payment: test runs in the payment processor's test environment and never moves money, and live takes an actual payment.

Available options:
live,
test
payment_details
object | null
required

Purchase reference supplied when the payment was taken.

payment_method
object
required

The card the payment was taken from.

processor
enum<string>
required

The payment processor that handled the charge, which is the one configured for the store.

Available options:
datacap
status
enum<string>
required

Where the payment stands: captured once the amount was taken from the card, authorized while the processor only holds it, and failed when the card was refused. A payment the processor has not answered for yet is not served at all: sending the same request again with the same idempotency_key and the same token settles it.

Available options:
authorized,
captured,
failed
store_id
string
required

ID of the store the payment was taken for.

Pattern: ^[0-9]+$
updated_at
string<date-time>
required

When the record was last changed.