Create a payout request allocation
Experimental

Request

Creates an allocation for a payout request.

When an allocation is created, the payout request transitions to the in-progress status, and the allocation starts in the pending status.

The allocation transitions to the processing status when payment processing begins.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Payout request allocation resource.

payoutRequestIdstring, <= 50 charactersrequired

ID of the payout request to allocate.

Example:"pout_req_0YVDMDE2BMC6KBB5MX76RF6T80"
paymentInstrumentIdstring, <= 50 charactersrequired

ID of the payment instrument to allocate.

Example:"inst_0YVB8KPKNXCBR9EDX7JHSED75N"
gatewayAccountIdstring, <= 50 charactersrequired

ID of the gateway account.

Example:"gw_acc_0YVCXMF26DDNKAERE5NW727S34"
amountnumber, (double)required

Amount to allocate to this payment instrument.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/payout-request-allocations \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "payoutRequestId": "pout_req_0YVDMDE2BMC6KBB5MX76RF6T80",
    "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N",
    "gatewayAccountId": "gw_acc_0YVCXMF26DDNKAERE5NW727S34",
    "amount": 0.1
  }'

Responses

Payout request allocation created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the resource.

Example:"pra_0YVDMDE2BMC6KBB5MX76RF6T80"
payoutRequestIdstring, <= 50 charactersread-onlyrequired

ID of the payout request associated with this allocation.

Example:"pout_req_0YVDMDE2BMC6KBB5MX76RF6T80"
batchIdstring or null, <= 50 charactersread-only

ID of the payout request batch that contains the payout request for this allocation.

Example:"preq_batch_0YVDMDE2BMC6KBB5MX76RF6T80"
paymentInstrumentIdstring, <= 50 charactersrequired

ID of the payment instrument allocated to the payout request.

Example:"inst_0YVB8KPKNXCBR9EDX7JHSED75N"
paymentMethodstring(PaymentMethod)read-only

Payment method of the allocation.

Enum:"payment-card""ach""cash""check""paypal""AdvCash""Aera""Affirm""Afterpay""Aircash"
gatewayAccountIdstring, <= 50 charactersrequired

ID of the gateway account to use for processing this allocation.

Example:"gateway_0YVB8KPKNXCBR9EDX7JHSED75N"
gatewayNamestring, <= 50 characters

Name of the gateway account to use for processing this allocation.

Example:"TestProcessor"
gatewayPayoutInstructionstring or nullread-only

Payout configuration of the gateway account that processes this allocation.

Enum ValueDescription
all

Payout any amount from this gateway.

covered-payout

Payout from this gateway if it previously processed a payment for the same, or a greater, amount.

approved-payment

Payout any amount from this gateway if it processed an earlier payment. The customer must have a previously approved transaction, in the same currency, on this gateway.

none

Do not allow any payouts with this gateway.

Example:"covered-payout"
amountnumber, (double)required

Amount allocated to this payment instrument.

exposureAmountnumber, (double)read-only

Total approved sales and captures minus approved payouts for the customer, gateway account, and payment instrument, in the allocation currency.

Example:2
currencystring, = 3 characters(CurrencyCode)required

Currency of the payout request allocation.

Example:"USD"
statusstring

Status of this payout request allocation.

Enum ValueDescription
pending

Allocation was created and is waiting to be processed.

queued

Allocation is queued for processing.

processing

Allocation is being processed and a transaction is being created.

waiting-completion

Allocation transaction is processing asynchronously and has not yet reached a terminal state.

completed

Allocation was successfully processed and the transaction was approved.

failed

Allocation was not processed because of an error.

canceled

Allocation was canceled before processing.

declined

Allocation was declined by the gateway.

transactionIdstring or null, <= 50 charactersread-only

ID of the transaction that is created when processing this allocation, if applicable.

Example:"txn_0YVB8KPKNXCBR9EDX7JHSED75N"
transactionResultstring or nullread-only

Result of the transaction created for this allocation, if applicable.

Enum:"abandoned""approved""canceled""declined""unknown"null
transactionStatusstring or nullread-only

Status of the transaction created for this allocation, if applicable.

Enum:"completed""conn-error""disputed""never-sent""offsite""partially-refunded""pending""refunded""sending""timeout"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the allocation for the payout request was created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

Response
{ "id": "pra_0YVDMDE2BMC6KBB5MX76RF6T80", "payoutRequestId": "pout_req_0YVDMDE2BMC6KBB5MX76RF6T80", "batchId": "preq_batch_0YVDMDE2BMC6KBB5MX76RF6T80", "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N", "paymentMethod": "payment-card", "gatewayAccountId": "gateway_0YVB8KPKNXCBR9EDX7JHSED75N", "gatewayName": "TestProcessor", "gatewayPayoutInstruction": "covered-payout", "amount": 0.1, "exposureAmount": 2, "currency": "USD", "status": "pending", "transactionId": "txn_0YVB8KPKNXCBR9EDX7JHSED75N", "transactionResult": "abandoned", "transactionStatus": "completed", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }