Rebilling and Chained payment
Yourpay Chained Payment method is when there are three recipients of funds.
The functionality is commonly used by marketplaces who are carring a transaction for the author and the referee.
To secure both the Author and the marketplace, Yourpay’s unique Chained Payments is automatially splitting the payments into three chained-payments, one for each party in the chain.
The Master (Keyholder) is always able to capture and release the full payment, where the Slaves (Chained) automatially will follow the instructions of The Master.
This guide is split into three steps:
- Chargeing the consumer & creating the payments for each recipient. (Create Payment with multiple recipients)
- Capturing the payment from each recipient.
- Rebilling the consumer based on the ccrg id.
1. Create Payment with multiple recipients
Explanation of the parameters:
- merchant_token = the token of the merchant owning the transaction. This can be find under “account” on admin.yourpay.io
- MerchantNumber = Merchant number of the transaction owner. This can be found under “account”on admin.yourpay.io
- CCRG = enable this, if you want the option to rebill the customer later on (commonly used for subscriptions)
- chainedpayment = set as 1 to enable the chained payment function
- amount = the full amount charged from customer
- chained amount = the amount, that the second recipient will recieve
- chainedmerchantnumber = the merchant number of the second recipient. This can be found under “account” on admin.yourpay.io
- chainedamountthree = the amount, that the third recipient will recieve
- chainedmerchantnumberthree = the merchant number of the third recipient. This can be found under “account” on admin.yourpay.io
2. Capture payment
When you wish to capture the payment from the previus transaction, you can use the API here
In this API you enter the merchant token from the account for wich you wish to capture the transaction, along with the ID and Amount.
When you send this request, the money will be captured from the customer.
Notice: it is also possibly to capture the transactions on admin.yourpay.io
3. Rebilling the consumer
We made it really simple to rebill a consumers credit card. An API example can be found here:
The transaction owner can find the CCRG key in their admin panel under the transaction.
On this site you can make a rebilling by entering the same parameters as before, by entering the token of the owner, and each of the “slaves” of the transaction.
Notice: the amount is the full amount charged from the customer, and amount2, amount3, amount4 is the amount going to the “slaves”.
Now the customers credit card is successfully rebilled, and each merchant can find their payment in “captured payments” in their respective yourpay admin dashboard.