Overview

The P2P object represents a payment from one of your activated direct connections to another. P2P payments must be individually authorized by the sender within 10 minutes of creation, using a verification code sent to their mobile device. Once committed, P2P payments are initiated immediately, and cannot be canceled.

Permission Required

Executing peer to peer transactions requires the payment.debit permission from the source Account Connection and the payment.credit permission from the destination Account Connection. Since peer to peer implementations typically allow free money flow to/from all peers, we recommend requesting both permissions from all users.


Methods

POST  /p2p
Initiate a payment between your Account Connections.

Body Parameters

source
string
required

ID of the Account Connection sending money.

destination
string
required

ID of the Account Connection receiving money.

amount_in_cents
number
required

Amount in cents, e.g. $1.00 would be the number 100.

description
string

Description of payout. (Visible to creators.) Default value: Payment from ${sourceFullName} to ${destinationFullName}

user_data
object

User defined data that can be attached to the object. See the User Data page for details.

Example


Properties

id
string

Identifier for this payout.

source
string

ID of Account Connection sending money.

destination
string

ID of Account Connection receiving money.

amount_in_cents
number

Amount in cents, e.g. $1.00 would be the number 100.

description
string

Description of payout. (Visible to creators.) Default value: Payment from ${sourceFullName} to ${destinationFullName}

status
string

Status of payout. One of:

StatusDescription
createdInitial status after object creation. Requires Commit P2P method to be executed.
pendingP2P has been committed, but payment is not complete.
sentThe payment was completed and the amount is now available in the destination account.
errorThe payment encountered an error during processing. The reasons a payment might be set to error include non-sufficient funds, suspected fraud, or failed validation.
exprires_at
date

When the P2P expires, set to 10 minutes after object creation. Formatted as ISO 8601 date/time string.

failed_commits
number

Count of failed commit attempts. Once a P2P has failed 3 times, it instantly expires.

user_data
object

User defined data that can be attached to the object. See the User Data page for details.