Send a cross-asset swap between own wallets
Cross-asset variant of POST /v1/payments/p2p/own: identical body plus a required receivingAssetCode that must differ from sendingAssetCode. Executed as a strict-send Stellar path payment — amount is denominated in sendingAssetCode and the received amount depends on the live rate at execution time. The destination may be the same wallet (a self-swap). Returns 202.
curl --request POST \
--url https://api.zeam.money/gw/v1/payments/swap/own \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-zeam-auth: <api-key>' \
--data '
{
"transactionId": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"walletId": "66666666-6666-6666-6666-666666666666",
"destinationWalletId": "99999999-9999-9999-9999-999999999999",
"sendingAssetCode": "USDZ",
"receivingAssetCode": "ZARC",
"amount": 100
}
'{
"transactionRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted",
"intentId": "<string>",
"isIdempotent": true,
"message": "<string>"
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Access token issued by POST /v1/auth/token.
Application secret (the apiKey issued at registration), required on every request.
Body
Same-asset transfer between two of the caller's own wallets. Beneficiary fields are not accepted; use POST /v1/payments/p2p/beneficiary instead. transactionId is the only identity field — it is the idempotency key and the reference recorded on the transaction.
Your transaction id. Replaying it returns the original result.
Source wallet.
Destination wallet in your own association.
Asset to send — bare code (e.g. USDZ). The gateway resolves the issuer from the asset registry.
"USDZ"
Amount to send, denominated in sendingAssetCode.
Asset to receive — bare code. Must differ from sendingAssetCode.
"ZARC"
Optional Stellar memo.
Optional sender-side transaction reference, shown on the sender's statement. When supplied: 1-16 characters, letters, digits, and hyphens only. Omit it or send null for no reference.
16^[A-Za-z0-9-]{1,16}$Optional recipient-side transaction reference, shown on the recipient's statement (for withdrawals it is also printed on their bank or mobile-money statement). When supplied: 1-16 characters, letters, digits, and hyphens only. Omit it or send null for no reference.
16^[A-Za-z0-9-]{1,16}$Response
Swap accepted for asynchronous processing.
A 202 means the submission was accepted for asynchronous execution, not that it settled. Track completion with the Transactions routes or webhooks.
The transaction record id, used with GET /v1/transactions/{transactionId}.
Submission status; not a terminal transaction status.
"accepted"
Execution intent id, when present.
True when this response replays a prior submission with the same transactionId.
curl --request POST \
--url https://api.zeam.money/gw/v1/payments/swap/own \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-zeam-auth: <api-key>' \
--data '
{
"transactionId": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"walletId": "66666666-6666-6666-6666-666666666666",
"destinationWalletId": "99999999-9999-9999-9999-999999999999",
"sendingAssetCode": "USDZ",
"receivingAssetCode": "ZARC",
"amount": 100
}
'{
"transactionRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted",
"intentId": "<string>",
"isIdempotent": true,
"message": "<string>"
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "https://errors.zeam.app/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'amount' field must be a positive decimal.",
"instance": "/v1/quotes",
"requestId": "01J8Z6K3QW9F2",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}