Skip to content

Acme API v2024-06 is live — see the changelog for what changed.

Dashboard

Create a payment

POSThttps://api.acme.dev/v1/payments

Creates a payment and attempts to charge the given payment method. Use an Idempotency-Key header to safely retry.

Authentication

AuthorizationBearer

Use your secret key, e.g. sk_live_….

Headers

Idempotency-KeyUUIDOptional

A unique key to make the request idempotent.

Request

This endpoint expects an object.
amountintegerRequired

Amount in the smallest currency unit.

currencystringRequired

Three-letter ISO currency code.

customerstringOptional

ID of an existing customer.

descriptionstringOptional<=500 characters
metadatamap from strings to stringsOptional

Up to 50 key/value pairs.

payment_methodobjectOptional
typeenumRequired
Allowed values:
tokenstringRequired

Token from Acme.js.

Response

The created payment.
idstringOptional
objectenumOptional
Allowed values:
amountintegerOptional
currencystringOptional
statusenumOptional

Lifecycle state of the payment.

Allowed values:
customerobjectOptional
idstringOptional
emailemailOptional
namestringOptional
addressobjectOptional
line1stringOptional
citystringOptional
countrystringOptional
created_atdatetimeOptional
refundslist of objectsOptional
idstringOptional
amountintegerOptional

Errors