Skip to main content
Version: 3.0.0

notify_offchain_funds_received

SEP-6SEP-24

Payment is being processed internally by anchor

Params

(7)

Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array

1. transaction_id (required)

The unique identifier of this transaction.

string

A unique transaction identifier.

2. message

Human readable explanation of transaction status.

string

A human readable message.

3. funds_received_at

The date and time of receiving funds.

string

A date and time.

4. external_transaction_id

The unique identifier of this transaction on the external network.

string

A unique transaction identifier.

5. amount_in (required)

The amount expected in the payment

amount
string
required

A numerical representation of an amount of some asset.

asset
string
required

The asset to be received by the Anchor

6. amount_out (required)

Amount sent by anchor to user

amount
string
required

A numerical representation of an amount of some asset.

asset
string
required

The asset to be sent by anchor to user at end of transaction

7. fee_details (required)

Description of fees charged by the anchor

Description of fee charged by the anchor.

total
number
required
asset
string
required
details
array[object]

Details about fee charged.

name
string
description
string
amount
number

Result

(notify_offchain_funds_receivedResponse)
id
string

A unique transaction identifier.

sep
integer

Protocol of the transaction.

Allowed values:
62431
kind
string

The kind of transaction that is desired.

Allowed values:
undefinedreceivedepositdeposit-exchangewithdrawalwithdrawal-exchange
status
string

Processing status of the transaction.

Allowed values:
pending_anchorpending_trustpending_userpending_user_transfer_startpending_user_transfer_completeincompleteno_markettoo_smalltoo_largepending_senderpending_receiverpending_transaction_info_updatepending_customer_info_updatecompletedrefundedexpirederrorpending_externalpending_stellar
amount_expected
amount_expected

The amount expected in the payment.

amount
string

A stringified amount of an asset.

asset
string

An asset.

amount_in
amount_in

Amount expected/received by anchor.

amount
string

A stringified amount of an asset.

asset
string

An asset.

amount_out
amount_out

The amount expected to be sent by anchor to user at end of transaction.

amount
string

A stringified amount of an asset.

asset
string

An asset.

fee_details
fee_details

Description of fee charged by the anchor.

total
number
required
asset
string
required
details
array[object]

Details about fee charged.

quote_id
string

The id returned from a SEP-38 POST /quote response

started_at
string

Start date and time of transaction.

updated_at
string

The date and time of transaction reaching the current status.

completed_at
string

The date and time of transaction reaching completed or refunded status.

transfer_received_at
string

The date and time of receiving transfer.

message
string

Human readable explanation of transaction status

refunds
refunds

An object describing any on or offchain refund associated with this transaction.

amount_refunded
object

The total amount refunded in units of amount_in_asset.

amount_fee
object

The total amount charged in fees for processing all refund payments, in units of amount_in_asset.

payments
array[object]

A list of objects containing information on the individual payments made back as refunds.

Example

Example request to the notify_offchain_funds_received method.

Request

curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "notify_offchain_funds_received",
"params": {
"transaction_id": "1c186184-09ee-486c-82a7-aa7a0ab1119d",
"message": "Funds received successfully",
"funds_received_at": "2023-07-04T12:34:56Z",
"external_transaction_id": "3320c6faad48c3cf39b6d4ac15ed50b6e5868b62551e69cde15df2d66c8ca360",
"amount_in": {
"amount": 1
},
"amount_out": {
"amount": 0.9
},
"fee_details": {
"total": 0.1,
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"amount_expected": {
"amount": 1
}
}
}' \
https://platform-server.exampleanchor.com | jq

Result

{
"jsonrpc": "2.0",
"id": 8675309,
"result": {
"id": "1c186184-09ee-486c-82a7-aa7a0ab1119d",
"sep": "24",
"kind": "deposit",
"status": "completed",
"amount_expected": {
"amount": "1",
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"amount_in": {
"amount": "1",
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"amount_out": {
"amount": "0.9",
"asset": "iso4217:USD"
},
"fee_details": {
"total": "0.1",
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"started_at": "2023-08-04T10:04:06.280923Z",
"updated_at": "2023-08-04T10:04:15.716233Z",
"message": "Transaction complete",
"source_account": "GB4GJAV4Q7DPGU7WI3H5TMVKEYZJ4JFLFEF3O3TRJKDPXK7NAMRBXWFL",
"destination_account": "GDIN5ZULIOT5YPBIXJXFGNH4TCNTDKIA4ZF6QQE3S2P5P44BHCQQJNDC"
}
}