Creating a submerchant and adding a bank account

Du er her:
Anslået læsetid: 2 min

This guide is split into two segments:

1. Creating the submerchant.

2. Adding the bank account.

Creating the submerchant

For this step you need to use our API endpoint ‘create_merchant’. An example of this can be found here.

TIP You can open the file with notepad, if you do not have an editor for viewing source code.

When you run the code you’re presented with the following input form:

create_submerchant_form.PNG

If you’re unsure how to fill in the form, please refer to the table below:

Request parameter names are written in italic

Name Description
CVR/SE/VAT (CompanyVAT) The CVR/SE/VAT number of the merchants company.
Name of Merchant (CompanyName) The company name of the merchant.
Address (CompanyAddress) The address of the company.
Postal code (CompanyPostal) The postal code of the companys city or district.
City (CompanyCity) City of the company.
Company Phone (CompanyPhone) Phone number of the contact person.
Combined MerchantID (merchantidCombined) If you wish to link this merchant to another as a sub, then provide the merchantid of the master account to link with.
Contact name (PersonalName) The name of the contact person
Merchant Email (PersonalEmail) The Email address of the contact person
Merchant Comments (MerchantComments) Should always be ChainedPayments when using this code.

When you submit, you will get a JSON response with the following data:

Name Description
success ‘1’ if the call succeeded, ‘0’ if it failed.
merchantid The merchantid of the created merchant.
prod_merchantid Will always be ‘0’ as you need to go through Yourpays onboarding process to receive a production merchantid.
user_id User id of the merchant. Used in various API calls
username This is the username the merchant should use to login to our admin portal.
pwd The assigned password for the merchant
CompanyDetails The comments about the merchant that you input in the form.
token The merchant token. You need this if you’re using our plugins. It can also be found by logging into our admin portal with username & password.

Adding the bank account

For this step you need to use our API endpoint “create_funds_account”. An example can be found here.

TIP You can open the file with notepad, if you do not have an editor for viewing source code.

When you run the code you’re presented with the following input form:

create_funds_account_form.PNG

If you are unsure how to fill in the form, please refer to the table below:

Request parameter names are written in italic

Name Description
CVR/SE/VAT (CompanyVAT) The CVR/SE/VAT number of the merchants company.
Merchantid (merchantid) Your merchantid at yourpay.
Token (merchant_token) Found by logging into our admin portal with username & password.
Bank Name (bankname) Name of your bank
Bank Registration Number (bank_regnr) The registration number of your bank. Can be found on the backside of your credit card.
Account Number (bank_acc) Your bank account number. Can be found on the backside of your credit card.

When you submit the form, you will get a JSON response with a status “ACK” if the call succeeded or “NOK” if failed.