Partial authorization
Allow a payment to be authorized and processed for an amount less than requested
Partial authorizations can be utilized to reduce the occurrence of payments failing due to insufficient funds. If the payment is allowed to be partially authorized, then the issuing bank will authorize and process the available amount, instead of declining the payment.
Limitations
There are a few limitations to consider with partial authorizations:
- There is no guarantee that the issuing bank supports partial authorization
- Partial authorization is mainly supported for Visa and Mastercard
- Partial authorization is not supported with amount splits
- Additional logic will be required by the platform to ensure the remaining balance is processed
Enable partial authorization
Partial authorization is configured by setting the allow_partial_authorization
boolean on the create payin config request.
{
"merchant_id": "{{merchant_id}}",
"idempotency_key": "{{idempotency_key}}",
"amount": 10000,
"currency_code": "USD",
+ "allow_partial_authorization": true
}
Know if the payment was partially authorized
Rainforest will return the following fields to indicate if a payment was authorized and processed for a partial amount.
Field | Description |
---|---|
amount | The amount authorized and processed. The amount will be less than the amount requested in the payin config if partially authorized. |
is_partially_authorized | Boolean indicating if the payin was authorized for a partial amount. |
payin_config.amount | The total amount requested for processing in the payin config. The amount will be greater than the amount processed if partially authorized. |
For example, if a payin was configured for $10, but partially authorized for $5, the payin response would look like the following:
{
"payin_id": "pyi_123",
...
+ "amount": 500,
"currency_code": "USD",
+ "is_partially_authorized": true,
"status": "PROCESSING",
...
"payin_config": {
"payin_config_id": "cfg_123",
+ "amount": 1000,
"currency_code": "USD",
}
}
If the payment was for a partial amount, you should direct the customer accordingly to process the remaining balance. If the customer chooses to exit the payment flow, the partially authorized payin will need to be voided resulting in a payin status of Canceled
.
Listen to Payment Component events
The payment component will emit the approved
event and the event data will include the fields returned by the get payin endpoint, which includes the fields defined above.
Listen to webhooks
The payin webhook for payin.processing
will include the fields defined above.
Query the API
The get payin endpoint will include the fields defined above.
View in the components
The Payin Details in the Payment Report Component displays a "Partially Authorization" indicator next to the payin status and the full amount requested in the "Related Info" section.
Simulate partial authorization scenarios in sandbox
Utilize the test cards in sandbox to simulate various partial authorization scenarios depending on if the allow_partial_authorization
boolean is set in the payin config.
Scenario | Payin Status | Allow Partial Authorization | Description |
---|---|---|---|
Authorize partial amount | Processing | true | Any of the test cards in the Partial Authorization section will result in a processed payin for half the amount requested in the payin config. |
Decline with insufficient funds | Failed | false | Any of the test cards in the Partial Authorization section will result in a failed payin with the refusal code of INSUFFICIENT_FUNDS . |
Authorize full amount | Processing | true | Any of the test cards in the Approved sections will result in a processed payin for the full amount requested. |
Decline | Failed | true | Any of the test cards in the Declined section will result in a failed payin with the refusal code defined for the test card number. |
Updated 7 days ago