# Credit cards

Version: 1.0

## Servers

Sandbox
```
https://api.solaris-sandbox.de
```

Production
```
https://api.solarisbank.de
```

## Download OpenAPI description

[Credit cards](https://docs.solarisgroup.com/_bundle/api-reference/digital-banking/credit-cards.yaml)

## Credit cards

### Create a credit card application for a consumer or freelancer

 - [POST /v1/persons/{person_id}/credit_card_applications](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1persons~1%7Bperson_id%7D~1credit_card_applications/post.md): This endpoint creates a credit card application and assigns it to the person with the person_id specified in the request URL. The application includes all the required information about the customer, such as their self-declared financial information, credit card type and requested limit, which Solaris' credit scorer uses to initiate a series of credit checks. Note: Solaris will tell you which fields are mandatory based on your use case.

### Create a credit card application for a business

 - [POST /v1/businesses/{business_id}/credit_card_applications](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1businesses~1%7Bbusiness_id%7D~1credit_card_applications/post.md): This endpoint creates a credit card application and assigns it to the business with the business_id specified in the request URL. The application includes all the required information about the customer, such as their self-declared financial information, credit card type and requested limit, which Solaris' credit scorer uses to initiate a series of credit checks. Note: Solaris will tell you which fields are mandatory based on your use case.

### Accept and finalize credit card application

 - [POST /v1/credit_card_applications/{id}/finalize](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_applications~1%7Bid%7D~1finalize/post.md): Finalizes the credit card application specified in the request URL. If the request succeeds, then Solaris will create a credit card account for the customer. Note: Call this endpoint only after the customer has successfully completed the KYC process.

### Set limit for credit card account

 - [PATCH /v1/credit_card_applications/{id}/limit](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_applications~1%7Bid%7D~1limit/patch.md): Attaches a credit limit to the credit card account specified in the request URL by its ID. Note: You must attach a limit that is less than or equal to the limit approved by Solaris.

### Get a list of credit card applications

 - [GET /v1/credit_card_applications](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_applications/get.md): Returns an array containing all credit card applications created for your customers.

### Get a credit card application

 - [GET /v1/credit_card_applications/{id}](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_applications~1%7Bid%7D/get.md): Returns the credit card application specified in the request URL by its ID.

### Update repayment option for a credit card

 - [PATCH /v1/credit_card_applications/{id}](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_applications~1%7Bid%7D/patch.md): This endpoint changes the repayment option (i.e., from charge to revolving, or vice versa) for the credit card specified in the request URL by the respective application ID.
Note: The change will only take effect in the next billing cycle.

The API applies the following validation logic:

| current_type | upcoming_type | minimum_amount & minimum_percentage | logic description |
|--------------|---------------|-------------------------------------|-------------------|
| FULL         | FULL          | Absent or null                      | - |
| FULL         | PARTIAL       | Passed or already set               | Allowed to be done any time in the billing cycle.A customer must have QES and be not in Dunning.latest_repayment_type_switch_date will be set to the current date.Interest calculation for this account will start from the date of the switch.current_type & upcoming_type will be set to PARTIALIf there is a PENDING bill then:it will be closed and a new one is generated for the same bill start_date and end_date.a new PDF statement is also generated. |
| PARTIAL      | PARTIAL       | Passed or already set               | - |
| PARTIAL      | FULL          | Passed or already set               | Allowed only once in a billing cycle.A customer must have QES and be not in Dunning.A switch is not allowed if repayment_type_switch_available_date is not today or older.The upcoming_type will be set to FULL. |

### Get a credit card bill

 - [GET /v1/credit_card_bills/{bill_id}](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_bills~1%7Bbill_id%7D/get.md): Returns the credit card bill specified in the request URL.

### List all credit card bills

 - [GET /v1/credit_card_bills](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/credit-cards/paths/~1v1~1credit_card_bills/get.md): Returns an array containing all credit card bills for all of your customers.

## Termination requests

### Create credit card termination request

 - [POST /v1/credit_card_applications/{application_id}/termination_requests](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/termination-requests/paths/~1v1~1credit_card_applications~1%7Bapplication_id%7D~1termination_requests/post.md): Creates a termination request for the credit card application specified in the request URL. See the credit cards guide for more information on how the termination process works.

### Get all credit card termination requests

 - [GET /v1/credit_card_terminations](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/termination-requests/paths/~1v1~1credit_card_terminations/get.md): Returns a list of all credit card termination requests.

### Get credit card termination request

 - [GET /v1/credit_card_terminations/{id}](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/termination-requests/paths/~1v1~1credit_card_terminations~1%7Bid%7D/get.md): Returns the credit card termination request specified in the request URL.

### Revoke a termination request

 - [POST /v1/credit_card_terminations/{id}/revoke](https://docs.solarisgroup.com/api-reference/digital-banking/credit-cards/termination-requests/paths/~1v1~1credit_card_terminations~1%7Bid%7D~1revoke/post.md): Revokes the credit card termination request specified in the request URL. Note that you may only revoke a termination request within 5 business days of its creation.

