logoAccess

Create a crypto payment

POST
/api/v1/crypto_payments/

Price an amount in ETB or USD and get the deposit address and exact coin amount the customer must send. Status updates arrive as crypto_payment.* webhook events.

Authorization

apiKeyHeader
headerx-api-key<token>

API key for authentication. Generate from the dashboard or via POST /v1/api-keys.

Header Parameters

x-api-key*string

API key for authentication

Length1 <= length

Request Body

  1. body
amount*|

Price in the smallest unit of currency (e.g. cents in ETB or USD)

Range1 <= value
currency*string
Value in"ETB""USD"
pay_with*string

The coin and network the customer pays with: usdc_bsc, usdt_bsc, usdt_ton, usdc_base, usdt_tron, usdt_solana, usdc_solana, usdt_polygon, usdt_ethereum, usdc_ethereum

customer*string

The customer's id

description?string

An arbitrary string attached to the object (max 500 characters)

Lengthlength <= 500
metadata?

Key-value pairs for storing arbitrary custom metadata

Response Body

Response for status 201

application/json
  1. response
id*string
object*string
status*string

waiting, confirming, finished, failed, expired or refunded

failure_reason*string|null
amount*number

In the smallest unit of currency (e.g. cents in ETB or USD)

currency*string

Three-letter ISO currency code: ETB or USD

pay_with*string
pay_amount*string

Exactly what the customer must send, as a decimal string

pay_address*string
pay_memo*|

Memo or tag the customer must include, for coins that need one

amount_received*string|null
fee*|

Access's fee, in the coin

customer*string
description*string|null
metadata*unknown
expires_at*string|null
paid_at*string|null
created_at*string|null
updated_at*string|null
curl -X POST 'https://api.tryaccess.xyz/api/v1/crypto_payments/' \  -H 'x-api-key: string' \  -H 'Content-Type: application/json' \  -d '{  "amount": 250000,  "currency": "ETB",  "pay_with": "usdt_tron",  "customer": "cus_01J9Z8K2P3Q4R5S6T7U8V9W0X1"}'
{  "id": "cp_01JB2X7Q9R8S6T5U4V3W2X1Y0Z",  "object": "crypto_payment",  "status": "waiting",  "failure_reason": "underpaid",  "amount": 250000,  "currency": "ETB",  "pay_with": "usdt_tron",  "pay_amount": "13.162245",  "pay_address": "string",  "pay_memo": "string",  "amount_received": "string",  "fee": "string",  "customer": "string",  "description": "string",  "metadata": null,  "expires_at": "string",  "paid_at": "string",  "created_at": "string",  "updated_at": "string"}

How is this guide?